Changes for page Build Management
Last modified by Richard Kreissig on 2023/09/14 08:50
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -14,7 +14,7 @@ 14 14 15 15 = Software We Use = 16 16 17 -To implement our automatic builds, we use the popular [[Maven>>url:http://maven.apache.org/||shape="rect"]] tool in conjunction with [[Tycho>>url:http://eclipse.org/tycho/||shape="rect"]], a set of Maven plug-ins that allow Maven to build Eclipse projects. To implement our continuous integration builds, we use [[Atlassian Bamboo>>url:http://www.atlassian.com/software/bamboo/overview||shape="rect"]]. 17 +To implement our automatic builds, we use the popular [[Maven>>url:http://maven.apache.org/||shape="rect"]] tool in conjunction with [[Tycho>>url:http://eclipse.org/tycho/||shape="rect"]], a set of Maven plug-ins that allow Maven to build Eclipse projects. Our KLay layouters library is built using [[Apache Ant>>url:http://ant.apache.org/||shape="rect"]]. To implement our continuous integration builds, we use [[Atlassian Bamboo>>url:http://www.atlassian.com/software/bamboo/overview||shape="rect"]]. 18 18 19 19 == Maven / Tycho == 20 20 ... ... @@ -24,6 +24,10 @@ 24 24 25 25 Tycho is a set of Maven plugins that handles compiling and dependency management as well as bundling of Eclipse plug-ins. Tycho understands Eclipse metadata files such as {{code language="none"}}plugin.xml{{/code}} or {{code language="none"}}feature.xml{{/code}}, provides dependency information extracted from those files, and provides an Eclipse instance for compiling and packaging Eclipse bundles. 26 26 27 +== Apache Ant == 28 + 29 +Ant is a very popular Java build tool. While Maven wants to know metadata about a project and then knows what to do to build it, Ant works by specifying exactly what to do to build a project. These steps are configured in a {{code language="none"}}build.xml{{/code}} file. We try to avoid using Ant, but still have Ant build files around for jobs too specialized to be properly handled by Maven. 30 + 27 27 == Bamboo == 28 28 29 29 While Maven and Tycho know how to compile KIELER, Bamboo knows when to compile KIELER and what to do with the compiled project. Bamboo has access to our source code repositories and triggers continuous integration builds every time someone pushes new code into a repository. It also does a full build every night and copies the results onto our nightly build update site to be accessed by people all around the world. And beyond. Tell your friends! ... ... @@ -30,42 +30,64 @@ 30 30 31 31 = The Automatic Build Process = 32 32 33 - ===Maven andTycho in KIELER===37 +This section describes how our POM files are distributed throughout the repository structure, and how you can trigger an automatic build of KIELER. 34 34 35 - In KIELER there is a parent POM located in {{code language="none"}}build/de.cau.cs.kieler.parent{{/code}}, there are mid-level POMs in {{code language="none"}}features{{/code}}and {{code language="none"}}plugins{{/code}} and finally each plugin and feature directory contains aPOMfile.Furthermore to handle building an EclipseP2 repositoryand the KIELER RCA there is a special repository project with its own POM in {{code language="none"}}build/de.cau.cs.kieler.repository{{/code}}. As KIELER is built against a P2 repository generated from our Eclipse reference installation, the following magic command updates the P2 build repository after changes to the installation.39 +== POM Files == 36 36 37 -{{code}} 38 -java@aeon:~$ java -jar eclipse_3.8/plugins/org.eclipse.equinox.launcher_*.jar \ 41 +The basic structure of the POM files can be seen below: 42 + 43 +[[image:attach:pomfiles.png]] 44 + 45 +Each plug-in and feature has a corresponding (usually rather small) POM file. The POM files in the {{code language="none"}}features{{/code}} and {{code language="none"}}plugins{{/code}} directories know about the different features and plug-ins. The parent POM file, which all other POM files copy basic configuration from, knows about the feature and plug-in POM files. In addition, the {{code language="none"}}build{{/code}} directory also contains a bunch of subdirectories. These also contain POM files specialized for building the P2 repositories necessary to publish our Eclipse features. 46 + 47 +== Using the KIELER Maven Build == 48 + 49 +Using the KIELER Maven build requires knowledge about two aspects: necessary configuration / required libraries and invoking Maven. 50 + 51 +=== Necessary Configuration === 52 + 53 +KIELER needs to be built against a P2 repository generated from our Eclipse reference installation. The path to this repository is found in the parent POM file and must be changed if the repository location changes. Also, when changing the reference installation, the repository has to be updated using the following magic command (adapted accordingly): 54 + 55 +{{code language="none"}} 56 +java -jar eclipse_3.8/plugins/org.eclipse.equinox.launcher_*.jar \ 39 39 -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher \ 40 40 -metadataRepository file:/home/java/repository/juno382 \ 41 41 -artifactRepository file:/home/java/repository/juno382 \ 42 42 -source /home/java/eclipse_3.8/ \ 43 43 -publishArtifacts 62 +{{/code}} 44 44 64 +=== Invoking Maven === 45 45 66 +To actually build KIELER once all preliminaries are done, navigate to the {{code language="none"}}/build/de.cau.cs.kieler.parent{{/code}} directory and run the following command line: 67 + 68 +{{code language="none"}} 69 +mvn clean package -P <profile> # For a list of available profiles, see parent pom.xml 46 46 {{/code}} 47 47 48 - ===Thingsto be awareof===72 +If you are trying to build KIELER on our server, you first have to setup the Java environment, if you haven't already done so. The command line thus becomes: 49 49 50 -{{ warning}}51 - *Eclipse metadata and pom.xml filesare notautomatically synced. If you change for exampleversion numbers, you have to modify pom.xml52 - *There are files intheparentprojectwhichcanbealsofoundin thebranding plugin.Keepthem insync!53 -{{/ warning}}74 +{{code language="none"}} 75 +. /home/java/java-env 76 +mvn clean package -P <profile> # For a list of available profiles, see parent pom.xml 77 +{{/code}} 54 54 55 - 79 +Once Maven has finished, the different build artifacts may be found in the {{code language="none"}}/build/de.cau.cs.kieler.*.repository/target{{/code}} directories. 56 56 57 -== =BuildingKieleronthecommand line ===81 +== What to Be Aware of == 58 58 59 - AfullKIELERbuild onthecommandlineisdoneasfollows83 +There are some things that people need to be aware of to keep the build files in a valid state. 60 60 61 -{{code title="Full Build" linenumbers="true" language="bash"}} 62 -. /home/java/java-env #sets environment variables for java and maven 63 -cd build/de.cau.cs.kieler.parent 64 -mvn clean package -P <profile> # Available profiles include indigo, juno38, juno42 65 -{{/code}} 85 +1. Eclipse metadata and POM files are not synchronized. Thus, if the version of an Eclipse plug-in changes, its {{code language="none"}}pom.xml{{/code}} needs to be updated accordingly. 86 +1. The repository POM directories contain product files and product icons. These are copies of the files found in the corresponding branding plug-ing (such as {{code language="none"}}de.cau.cs.kieler.core.product{{/code}}) and have to be manually synchronized. 66 66 67 - Afterwardstheassembled RCA and P2repository may be found in {{code language="none"}}build/de.cau.cs.kieler.repository/target{{/code}}.Similarlysinglepluginsorfeaturesare found{{codelanguage="none"}}target{{/code}}subdirectoryof the respective package.88 +== The Curious Case of Building the KLay Library == 68 68 90 +We distribute our KLay layout algorithms in two library files: one that contains just our algorithms, and another one that also contains dependencies such as required EMF classes. To build the KLay libraries, navigate to the {{code language="none"}}/build/de.cau.cs.kieler.klay.libraries{{/code}} directory and do the following: 91 + 92 +1. Set the {{code language="none"}}PRODUCT{{/code}} environment variable to point to a complete installation of KIELER. You can get one by using the automatic Maven build. 93 +1. Run Ant on the {{code language="none"}}build.xml{{/code}} file. This will produce both versions of the KLay layout library. 94 + 69 69 = Continuous and Nightly Builds = 70 70 71 71 There are basically three different build plans for each of the KIELER projects:
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -61604 091 +6160412 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/61604 09/Build Management1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/6160412/Build Management