Download PDF documentation
Transcript
How To Create an Internal Domain • package - the package for the source code of the domain implementation. Has to be "org.openengsb.domains.<yourDomain>". • implementationName - the name of the implementation module. Has to be "OpenEngSB :: Domains :: <yourDomain> :: Implementation" Where <yourDomain> has to be replaced by your domain name which is usually written in lower case, i.e. report for the report domain. Note that the archetype will use the artifactId to name the project, but the OpenEngSB convention is to use the domain name. Therefore you will have to rename the resulting project. Do not forget to check that the new domain is included in the modules section of the domains pom. 53.2.2. Using mvn openengsb:genDomain Simply invoke mvn openengsb:genDomain from the domains directory in your OpenEngSB repository (alternatively the etc/scripts/gen-domain.sh script can be used which invokes the openengsbmaven-plugin for you). domains $ mvn openengsb:genDomain You'll be asked to fill in a few variables which are needed to create the initial project structure. Based on your input, the mojo tries to guess further values. Guessed values are displayed in brackets. If the guess is correct, simply acknowledge with Return. As example, the following output has been recorded while creating the Test domain: Domain Name [mydomain]: test <Enter> Version [1.0.0-SNAPSHOT]: <Enter> Prefix for project names [OpenEngSB :: Domains :: Test]: <Enter> Only the domain name has been filled in, while the rest has been correctly guessed. After giving the inputs, the Maven archetype gets executed and may ask for further inputs. You can simply hit Return, as the values have been already correctly set. If the mojo finishes successfully two new Maven projects, the domain parent and domain implementation project, have been created and setup with a sample implementation for a domain. 53.2.3. Project structure The newly created domain should have the exact same structure as the following listing: -- src | -- main | -- java | -- org | -- openengsb | -- domain | -- [mydomain] | -- [MyDomain]Domain.java | -- [MyDomain]DomainEvents.java | -- [MyDomain]DomainProvider.java 112