-
Notifications
You must be signed in to change notification settings - Fork 5
Seedstack Developer Guide
Developments on Seedstack are made on forked copies of main repository.
Please see Github recommendations here
-
update project version in pom.xml files, if required
Example:
mvn versions:set versions:commit -DnewVersion=19.11-SNAPSHOT
-
update CHANGELOG.md file
-
For an addon, update seed.version and parent-internal to the latest versions
Integration tests can be run using:
mvn integration-test
You can also create a test project. For an add-on, the project could become a sample. Create a test project In you test project, override the dependency version to the module you are updating.
For example:
<dependency>
<groupId>org.seedstack.seed</groupId>
<artifactId>seed-rest-jersey2</artifactId>
<version>3.8.1-SNAPSHOT</version>
</dependency>
Run you Maven install using quality profile to execute SpotBugs checks.
Undertow applications can be launched using command: mvn seedstack:watch, in parallel with Chrome plugin LiveReload. (new plugin for source change detection). See here for more information.
Example with MongoDB for application called hseed, having
domain package:
- class Client (extends BaseAggregateRoot),
- class ClientId (extends BaseValueObject),
- interface ClientRepository (extends Repository<Client, ClientId>)
interface package:
- class ClientRepositoryImpl (extends BaseMorphiaRepository<Client, ClientId> and implements ClientRepository)
infrastructure package:
- class ClientDto (POJO) with DataSet annotation, where
- group = "hseed":
- name = "client" : associated object
- class ClientDtoImporter : extends BaseDataImporter
Method importData is overridden, for example with:
dtos.forEach(dto -> repository.add(new Client(new ClientId(dto.getId()), dto.getCode())));
test/resources/META-INF/data/hseed/client.json : file containing data to load.
In application.yaml or preferably application.override.yaml, properties can be set for DataConfig object. Available properties are
- importOnStart (default = true)
- clearBeforeImport (default = true)
- forceImport (default = true)
For example:
business:
data:
forceImport: true
Enables developer to link configuration properties (in application.yaml) with associated classes.
See: