...
To allow local and solobuilds the there must be a pom.xml on the main level of the project. In the following there is an example from odysseus_core.
...
The are different parts in this maven pom. On the top there is the base information:. For your project you must change the <artifactId> the to a unique name.
In the parent clause the parent is defined. In this the parent things such things as the target platform and the different base configurations are handled.
...
Replace ${PLATFORMTARGETFILE} with the required PLATFORMTARGETFILE.For odysseus_core e.g.:
Here are some examples
Code Block |
---|
// Odysseus core
mvn clean verify -Dtargetfilename=platform_core |
The build typically takes some time as dependencies are resolved and the artifacts are build.
// Stable development build
mvn clean verify -Dtargetfilename=platform_development_stable
// All master build
mvn clean verify -Dtargetfilename=platform_master_all |
The build typically takes some time as dependencies are resolved and the artifacts are build.
After this, After this, you will find the p2 based update site under: releng/de.uniol.inf.is.odysseus.update/target/repository
...
Attention: The are no blancs in the "P-section"!
See The Odysseus Operator Test Framework for information how to create integration tests for your module.
Global build
If you want to combine different modules to a global build (e.g. as we do in jenkins to create all odysseus_stable and incubation modules) you need to do the following:
0) Create a new git project
1) Create a root folder with a root pom
Here are some example
Code Block |
---|
// Odysseus core
mvn clean verify -Pproduct,solobuild,currentOS -Dtargetfilename=platform_core
// Stable development build
mvn clean verify -Pproduct,solobuild,currentOS -Dtargetfilename=platform_development_stable
// All master build
mvn clean verify -Pproduct,solobuild,currentOS -Dtargetfilename=platform_master_all |
See The Odysseus Operator Test Framework for information how to create integration tests for your module.
Global build
If you want to combine different modules to a global build (e.g. as we do in jenkins to create all odysseus_stable and incubation modules) you need to do the following:
0) Create a new git project
1) Create a root folder with a root pom
Code Block |
---|
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>de.uniol.inf.is.odysseus</groupId>
<artifactId>de.uniol.inf.is.odysseus.odysseus_all</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
<groupId>de.uniol.inf.is.odysseus.tycho</groupId>
<artifactId>de.uniol.inf.is.odysseus.tycho.configuration</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modules>
<module>stable</module>
<module>incubation</module>
<module>odysseus_dev</module>
</modules>
</project> |
2) Add odysseus_dev as submodule
Code Block |
---|
git submodule add https://mgrawunder@git.swl.informatik.uni-oldenburg.de/scm/ody/odysseus_dev.git |
3) Add all required modules as submodules
4) Do something like in the following:
Code Block |
---|
# Install the parent
cd ${WORKSPACE}/odysseus_dev/de |
Code Block |
<project> <modelVersion>4.0.0</modelVersion> <groupId>de.uniol.inf.is.odysseus</groupId> <artifactId>de.uniol.inf.is.odysseus.odysseus_all</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <parent> <groupId>de.uniol.inf.is.odysseus.tycho</groupId> <artifactId>detycho.configuration mvn clean install # Do processing cd ${WORKSPACE} # Combine all category.xml of the submodules to a new category.xml rm -rf tooling git clone https://git.swl.informatik.uni-oldenburg.de/scm/ODYJENK/tooling.git javac "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.tycho.configuration</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> <modules> <module>stable</module> <module>incubation</module> <module>odysseus_dev</module> </modules> </project> |
2) Add odysseus_dev as submodule
Code Block |
---|
git submodule add https://mgrawunder@git.swl.informatik.uni-oldenburg.de/scm/ody/odysseus_dev.git |
3) Add all required modules as submodules
4) Do something like in the following:
Code Block |
---|
# Install the parent cd ${WORKSPACE}/odysseus_devcreatermap/src/de/uniol/inf/is/odysseus/creatermap/CreateRMap.java" java -cp "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.creatermap/src" de.uniol.inf.is.odysseus.creatermap.CreateRMap "${WORKSPACE}" "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.tycho.configuration mvn clean install # Do processing cd ${WORKSPACE} # Combine all category.xml of the submodules to a new category.xml rm -rf tooling git clone https://git.swl.informatik.uni-oldenburg.de/scm/ODYJENK/tooling.git javacupdatesite" "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.update.p2" cp "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.creatermap/src/de/uniol/inf/is/odysseus/creatermap/CreateRMap.java" java -cp "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.creatermap/src" de.uniol.inf.is.odysseus.creatermap.CreateRMap "${WORKSPACE}" "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.updatesite" "${WORKSPACE}/tooling/ci/update.p2/category.xml" ${WORKSPACE}/releng/de.uniol.inf.is.odysseus.update/ #Run the build mvn clean verify -P!\solobuild -Dtargetfilename=platform_core |
Install Features via Command Line
It is possible to install features without starting the product (e.g. to create a docker image with a distinct combination of features), e.g.:
Code Block |
---|
eclipsec.exe -application org.eclipse.equinox.p2.director -repository https://odysseus.informatik.uni-oldenburg.de/updatesite/odysseus_all_new/stable/origin/master/latest/ -installIU de.uniol.inf.is.odysseus.update.p2" cp "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.update.p2/category.xml" ${WORKSPACE}/relengwrapper.rabbitmq.feature.feature.group -destination H:/git/odysseus_core/odysseus_dev/products/monolithic/target/products/de.uniol.inf.is.odysseus.update/ #Run the build mvn clean verify -P!\solobuild -Dtargetfilename=platform_core studio.product.monolithic/win32/win32/x86_64 -profile SDKProfile |
See: https://help.eclipse.org/2020-03/index.jsp for further information.