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
-
... ... @@ -1,13 +1,37 @@ 1 -Our goal is to keep Code in the KIELER Mainline as stable as possible. Automatic plugin builds and tests after each commit and nightly RCA builds help to improve source code stability. As headless builds of Eclipse plugins and features are not trivial, the following software is used in KIELER 1 +{{warning}} 2 +This page is currently being updated as we work on a revised build process, which is to be explained here in detail. 3 +{{/warning}} 2 2 3 - =HeadlessBuilds(Maven/Tycho)=5 +In order to keep the KIELER code as stable as possible, we use automatic continuous integration builds. Once you push something into one of the KIELER repositories, you trigger the automatic build process. If the build fails for whatever reason – be it failed unit tests or simply compilation errors – you are notified of the problem. 4 4 5 - Maven is a build tool for Java projects that handles automatic dependency management including in-build dependencies(the order in whichpackagesare compiled) as well asdependencies to third party libraries,which are automatically fetchedfromspecial Maven repositories. A Maven build consists ofseveral phases such as compile, package, etc. Within those phases several Mavenplugins handledifferent tasks (or in maven-speak goals), for examplethe //maven-compile-plugin// compiles.java filesinto .class files. Maven buildsareconfigured in XML files calles {{code language="none"}}pom.xml{{/code}}. Those POM files may inheritconfigurationfrom a parent POM file, each package contains one {{code language="none"}}pom.xml{{/code}} which containespackage specific configuration and a reference to a parent {{codelanguage="none"}}pom.xml. {{/code}}The parentPOM includes, besides common configuration, allmodule names ofchild POMs.7 +This page describes the software and setup we use to implement all of this. 6 6 7 - Tychois a set of Mavenpluginsthat handles compiling and dependency managementas well as bundling of Eclipse plugins. This means Tycho can read and understand Eclipse metadata files such as plugin.xml or feature.xml, provides dependency information extracted from those files and an Eclipse runtime for compiling and packaging of Eclipse bundles.9 +**Content** 8 8 9 -== Maven and Tycho in KIELER == 10 10 12 + 13 +{{toc/}} 14 + 15 += Software We Use = 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"]]. 18 + 19 +== Maven / Tycho == 20 + 21 +Maven is a build tool for Java projects. It takes care of dependency management, including in-build dependencies (the order in which packages are compiled) as well as dependencies to third-party libraries. The latter are automatically fetched from special Maven repositories. Without getting too technical, a Maven build consists of several phases, such as //compile// and //package//. Within each phase, several Maven plug-ins handle different //tasks// (or //goals//, as Maven calls them). The //maven-compile-plugin// for example compiles {{code language="none"}}.java{{/code}} files into {{code language="none"}}.class{{/code}} files. 22 + 23 +To correctly compile a project, Maven needs to be told about the project. While the popular Ant build tool uses {{code language="none"}}build.xml{{/code}} files to describe the steps to be executed for building a project, Maven uses {{code language="none"}}pom.xml{{/code}} files to describe the project and figures out the steps for itself. The POM files may inherit settings from a parent POM file. 24 + 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 + 27 +== Bamboo == 28 + 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 + 31 += The Automatic Build Process = 32 + 33 +=== Maven and Tycho in KIELER === 34 + 11 11 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 a POM file. Furthermore to handle building an Eclipse P2 repository and 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. 12 12 13 13 {{code}} ... ... @@ -42,20 +42,16 @@ 42 42 43 43 Afterwards the assembled RCA and P2 repository may be found in {{code language="none"}}build/de.cau.cs.kieler.repository/target{{/code}}. Similarly single plugins or features are found in the {{code language="none"}}target {{/code}}subdirectory of the respective package. 44 44 45 -= AutomaticBuilds(Bamboo)=69 += The Continuous Integration Build = 46 46 47 -Maven with Tycho only provides the possibility of headless KIELER builds without starting Eclipse. To facilitate automatic builds, further software to monitor source code repositories, start builds after each check-in, notify developers of failed builds, etc. is needed. For KIELER we are using Bamboo by Atlassian 48 - 49 -== Bamboo in KIELER == 50 - 51 51 At the moment there are four jobs configured for KIELER 52 52 53 -=== Juno 4.2 Continuous Plugins === 73 +==== Juno 4.2 Continuous Plugins ==== 54 54 55 55 * Builds and tests KIELER plugins after each commit 56 56 * Sends notifications of failed builds to the responsible developer(s) 57 57 58 -=== Juno 4.2 Product Nightly === 78 +==== Juno 4.2 Product Nightly ==== 59 59 60 60 * Builds all of KIELER including all plugins, features as well as the RCA and the KIELER P2 Repository every night. 61 61 * Deploys RCA and repository to the download server ... ... @@ -62,12 +62,10 @@ 62 62 * Assembles the KLay libraries (with and without EMF included) into jar files and deploys them to the download server 63 63 * Sends notifications about failed commits to the responsible developer(s) and staff members 64 64 65 -=== Kieler Rating Nightly === 85 +==== Kieler Rating Nightly ==== 66 66 67 67 * Builds and deploys the KIELER class rating website with a special javadoc doclet 68 68 69 -=== Nightly QA Build === 89 +==== Nightly QA Build ==== 70 70 71 71 * Runs nightly static code checkers, code metrics as PMD, FindBugs, Checkstyle etc. 72 - 73 -
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -616040 21 +6160404 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/616040 2/Build Management1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/6160404/Build Management