-
Notifications
You must be signed in to change notification settings - Fork 4
Conventions
When developing on the project make sure you abide by the following conventions. ( The following assumes that you are up to par with the tools used in the project.
All maven sub-modules root poms should have the following parent definintion
<parent>
<groupId>eu.alert-project.iccs.stardom</groupId>
<artifactId>core</artifactId>
<version>[current-version]</version>
</parent>
The subfolder where the modules are located under the eu.alert-project.iccs.stardom.core root folder should have the following name convention
eu.alert-project.iccs.stardom.[module-name]
The pom declaration of the project should ommit the groupId and the version declaration since they will be inherited by the root pom.xml
<modelVersion>4.0.0</modelVersion>
<artifactId>_[module-name]_</artifactId>
NO DEPENDENCY VERSIONS SHOULD BE ADDED TO SUB-MODULES POMs
Any information regarding the version of a dependency should be declared in the root pom, under the node.
Dependencies in submodules should be declared without version.
Furthermore it will be good if dependencies where only handled by Fotis Paraskevopoulos
All package names should be prefixed using eu.alertproject.iccs.stardom
Each sub-module should have an internal package that reflects the [module-name], for example if we have a submodule called
There are 2 mandatory subpackages in which you will be working on. One is the api and the other the internal package.
The reason for having both packages in the conventions is to assure a future transition to OSGi.
The api package should contain mostly interfaces, and nothing more. There may be some exceptions where concrete classes such as domain objects, can be created under the api package. Just make sure when making a decission that the api doesn't contain any concrete implementations, or functionality that the external user of the module has no use for, or shouldn't have access to.
The internal package contains all the core implementation of the interfaces in the api package, and any internal classes, or utilites that are specific to the module, and there is no reason to export them.
Under these packages it is entirely normal to create further subpackages as you see fit.
Say we have a module called orm that needed to be created.
The root folder of the module will be eu.alert-project.iccs.stardom.core/eu.alert-project.iccs.stardom.orm
The pom declaration of the project will be
<modelVersion>4.0.0</modelVersion>
<artifactId>**orm**</artifactId>
The internal packages will be
- eu.alertproject.iccs.stardom.orm.api
- eu.alertproject.iccs.stardom.orm.internal