...
There are two maven profiles below the modules section
TODO: CREATE ECLIPSE PROJECT ...
- solobuild: This profile is used by default and will be used if the module is build allone. In case of a global build, the given maven modules are not used.
- test: This profile is used the create a test product
As you can see, there is a module named If you want to create an update site, create a new folder " releng/de.uniol.inf.is.odysseus.update. update"This is used to create an update site for this Odysseus module. This can be copied to a web-server and can be used to install new features in Odysseus.
This folder is not available by default, so you will need to create it.
Add the following pom to this folder. It is important to update the artifactId. This must be the same name as given above.Add a pom to this folder
Code Block | ||
---|---|---|
| ||
<project> <modelVersion>4.0.0</modelVersion> <parent> <groupId>de.uniol.inf.is.odysseus</groupId> <artifactId>de.uniol.inf.is.odysseus_core.odysseus<root</artifactId> <version>1.0.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> <artifactId>de.uniol.inf.is.odysseus_core.update</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>eclipse-repository</packaging> </project> |
You need to add a file named category.xmlCreate a root pom.xml similar to:
Code Block | ||
---|---|---|
| ||
<project> <modelVersion>4.0.0</modelVersion> <groupId>de.uniol.inf.is.odysseus</groupId> <artifactId>de<?xml version="1.0" encoding="UTF-8"?> <site> <feature id="de.uniol.inf.is.odysseus.common.feature"> <category name="common"/> </feature> <feature id="de.uniol.inf.is.odysseus.keyvalue.datahandler.feature"> <category name="common"/> </feature> <feature id="de.uniol.inf.is.odysseus.keyvalue.datatype.feature"> <category name="common"/> </feature> <feature id="de.uniol.inf.is.odysseus.slf4j.feature"> <category name="common"/> </feature> <feature id="de.uniol.inf.is.odysseus.cache.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.core.server.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.memstore.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.server.platform.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.security.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.server.fragmentation.base.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.keyvalue.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.latency.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.planmgmt.standard.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <parent> <groupId>de.odysseus.relational.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.rest.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.scheduling.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.tycho</groupId> <artifactId>descript.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.usermanagement.tycho.configuration</artifactId> <version>1.0.0-SNAPSHOT</version> <relativePath>./odysseus_dev/store.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.monolithic.feature"> <category name="monolithic"/> </feature> <feature id="de.uniol.inf.is.odysseus.monolithic.sdp.feature"> <category name="monolithic"/> </feature> <feature id="de.uniol.inf.is.odysseus.monolithic.studio.feature"> <category name="monolithic"/> </feature> <feature id="de.uniol.inf.is.odysseus.tycho.configuration/</relativePath> </parent> <modules> <module>odysseus_dev</module> <module>releng/client.feature"> <category name="client"/> </feature> <feature id="de.uniol.inf.is.odysseus.client.platform.feature"> <category name="client"/> </feature> <feature id="de.uniol.inf.is.odysseus.client.studio.feature"> <category name="client"/> </feature> <feature id="de.uniol.inf.is.odysseus.rcp.dashboard.colors.feature"> <category name="client"/> </feature> <feature id="de.uniol.inf.is.odysseus.update</module> <module>server/.rcp.dashboard.feature"> <category name="client"/> </feature> <feature id="de.uniol.inf.is.odysseus.wsenrich</module> <module>server/.rcp.dashboard.soccer.feature"> <category name="client"/> </feature> <feature id="de.uniol.inf.is.odysseus.wsenrich.feature</module> </modules> </project> |
The modules section can also reference to a folder with another pom that defines the modules inside this folder. E.g.:
Code Block | ||
---|---|---|
| ||
<modules> <module>odysseus_dev</module> <module>integration.testing</module> <module>releng/rcp.dashboard.windrose.feature"> <category name="client"/> </feature> <feature id="de.uniol.inf.is.odysseus.server.feature"> <category name="server"/> </feature> <feature id="de.uniol.inf.is.odysseus.studio.feature"> <category name="client"/> </feature> <feature id="de.uniol.inf.is.odysseus.datarate.feature"> <category name="common"/> </feature> <feature id="de.uniol.inf.is.odysseus.update</module> </modules> |
and the folder (here integration.testing) must contain a pom.xml similar to this:
.wrapper.json.feature">
<category name="wrapper"/>
</feature>
<category-def name="wrapper" label="wrapper"/>
<category-def name="odysseus_core" label="odysseus_core"/>
<category-def name="client" label="client">
<category name="odysseus_core"/>
</category-def>
<category-def name="common" label="common">
<category name="odysseus_core"/>
</category-def>
<category-def name="server" label="server">
<category name="odysseus_core"/>
</category-def>
<category-def name="monolithic" label="monolithic">
<category name="odysseus_core"/>
</category-def>
</site> |
This file should contain any feature of your project that should be available on the update site. Each feature should have a category. The categories are defined in the lower part of the file.
Define poms in modules
For each element in the <modules> section of the root pom there must be a definition of the real plugins and features that can be found in the folder.
Here is an example of the common folder of odysseus_core
Code Block |
---|
<project>
|
Code Block |
project> <modelVersion>4.0.0</modelVersion> <groupId>de.uniol.inf.is.odysseus</groupId> <artifactId>de.uniol.inf.is.odysseus_core.integration.testing<common</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <parent> <groupId>de.uniol.inf.is.odysseus</groupId> <artifactId>de.uniol.inf.is.odysseus<odysseus_core.root</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> <modules> <module>compile.feature</module> <modules> <module>core</module> <module>bugreport</module> <module>compiler</module> <module>datatype.interval</module> <module>de.uniol.inf.is.odysseus.testcommon.component.compile<feature</module> <module>de.uniol.inf.is.odysseus.testconsole.component.jira<executor</module> <module>de.uniol.inf.is.odysseus.test.component.keyvalue<report</module> <module>de.uniol.inf.is.odysseus.test.component.keyvalue.feature<report.executor</module> <module>de.uniol.inf.is.odysseus.testreport.component.nexmark<general</module> <module>de.uniol.inf.is.odysseus.test.component.operator<slf4j</module> <module>de.uniol.inf.is.odysseus.testslf4j.component.parallelization<feature</module> <module>de.uniol.inf.is.odysseus.test.component.parser.cql<sweeparea</module> <module>de.uniol.inf.is.odysseus.test.component.probabilistic<datarate</module> <module>de.uniol.inf.is.odysseus.test.feature</module> <module>jiradatarate.feature</module> <module>intervalapproach</module> <module>keyvalue.datahandler</module> <module>keyvalue.datahandler.feature</module> <module>nexmark.feature</module> <module>operator <module>keyvalue.datatype</module> <module>keyvalue.datatype.feature</module> <module>test</module> <module>xml</module> <module>xml.feature</module> <module>keyvalue.mep</module> <module>mep</module> <module>mep.matrix</module> </modules> </project> |
As you can see, there are different places where you need to adapt the file to your situation:
First of all, there must be a unique name for this pom (<artifactId>), but the name is not important. To avoid problems in the global build, the artifactId should start with the name of global artifact. If there is a plugin with the same name as the folder (e.g. common) you could name this pom e.g. ...common.project to avoid the same name.
As second, you must update the <artifactId> in the <parent> clause. This must be the same as in the root pom.
Finally, you need to add the folders where the eclipse plugins and features can be found. There is no pom in this folders needed, because a pom-less build is defined (see above). Of course, you can also structure this modules further (i.e. create subfolders for combined elements). In this case you need to add another pom.xml to the subfolder similar to the one in this folder.
Building
After you defined every necessary pom you can create a build with maven:
Code Block |
---|
mvn clean verify -Dtargetfilename=${PLATFORMTARGETFILE} |
Replace ${PLATFORMTARGETFILE} with the required PLATFORMTARGETFILE.
For odysseus_core e.g.:
Code Block |
---|
mvn clean verify -Dtargetfilename=platform_core.target |
The build typically takes some time as dependencies are resolved and the artifacts are build.
After this, you will find the p2 based update site under: releng/de.uniol.inf.is.odysseus.update/target/repository
Creating Server, Client and Monolithic product
You can use the maven build to create products that can be installed and that contains already all required features. To do this, you need to add you features top the product files that are provided in odysseus_dev/products.
E.g. add a feature to de.uniol.inf.is.odysseus.monolithic.product.product. This can e.g. be done with eclipse
After that you can build the products with the following maven call
Code Block |
---|
mvn clean verify -Pproduct -Dtargetfilename=${PLATFORMTARGETFILE} |
Here all version for all supported platform are created. You can create the products for the current platform only, by calling
Code Block |
---|
mvn clean verify -Pproduct,solobuild,currentOS -Dtargetfilename=${PLATFORMTARGETFILE} |
Attention: The are no blancs in the "P-section"!
See The Odysseus Operator Test Framework for information how to create integration tests for your moduletodo ...