Escidoc build and development environment
Content Overview of the new build infrastructure A closer look on maven Workshop 22.02.2019 Seite 2
Goals to achieve Code traceability through a Version Control System QA improvements: Nightly builds and tests, available code documentation, automatic code analysis etc. Standardised project layout (File structure, documentation etc.) 22.02.2019 Seite 3
Escidoc build infrastructure internet ARCHIVA Holds and fetches ext. Libraries; holds binary releases Source code repositories Deploy server (dev-[project]) MAVEN CORE WORKSTATIONS CONTINUUM Nightly builds, continous testing, releases Development, local testing
manages dependencies between repositories Repository layout Common services Solutions common pubman faces manages dependencies between repositories MAVEN CORE 22.02.2019 Seite 5
Continuum A continuous integration server for building java projects Supports automatic nightly builds and testing Automatic deploy of binary artifacts to various target systems 22.02.2019 Seite 6
Archiva A build artifact repository manager Manages external artifact dependencies on its own Downloads needed libraries automatically from repository servers in the internet 22.02.2019 Seite 7
A typical release time period 1.2 1.3-SNAPSHOT 2006 2007 2008 1.4-SNAPSHOT 1.2-SNAPSHOT 1.3 1.1 22.02.2019 Seite 8
Maven
What is Maven? A build tool! A dependency management tool! A documentation tool! 22.02.2019 Seite 10
Common projects metadata format POM = Project Object Model = pom.xml Contains metadata about the project Location of directories, Developers/Contributors, Issue tracking system, Dependencies, Repositories to use, etc Example: <project> <modelVersion>4.0.0</modelVersion> <groupId>de.mpg.escidoc.service</groupId> <artifactId>framework_access</artifactId> <name>Access to the framework</name> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <dependencies/> <build/> […] 22.02.2019 Seite 11
Common directory organization src/ main/ java/ resources/ webapp/ application/ test/ site/ 4 nested projects Other projects 22.02.2019 Seite 12
Build lifecycle Web Server M2 user Well-known phases generate- sources plugin compile plugin test plugin package integration- test user plugin install plugin deploy Well-known phases 22.02.2019 Seite 13
Dependency management Maven uses binary dependencies « use only version 2.1.1 » A B <dependencies> <dependency> <groupId>de.mpg</groupId> <artifactId>B</artifactId> <version>2.1.1</version> <scope>compile</scope> </dependency> </dependencies> C ARCHIVA Build C Look for A & B 22.02.2019 Seite 14
Site and reports Lots of reports Project information (mailing lists, SCM, dependencies, etc) PMD, Checkstyle, Javadoc, etc Auto deploy to webserver <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> </plugin> […] </plugins> </reporting> 22.02.2019 Seite 15
Questions? 22.02.2019 Seite 16