160 likes | 165 Views
Escidoc build and development environment. Content. Overview of the new build infrastructure A closer look on maven Workshop. Goals to achieve. Code traceability through a Version Control System
E N D
Content • Overview of the new build infrastructure • A closer look on maven • Workshop 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.) 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
Repository layout Common services Solutions common pubman faces manages dependencies between repositories MAVEN CORE 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 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 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 Seite 8
What is Maven? A build tool! A dependency management tool! A documentation tool! 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>Accessto the framework</name> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <dependencies/> <build/>[…] Seite 11
Common directory organization • src/ • main/ • java/ • resources/ • webapp/ • application/ • test/ • java/ • resources/ • site/ 4 nestedprojects Other projects Seite 12
Build lifecycle Web Server M2 generate-sources plugin compile plugin test plugin package integration-test user plugin install plugin deploy Well-known phases Seite 13
Dependency management « use only version 2.1.1 » • Maven uses binary dependencies <dependencies> <dependency> <groupId>de.mpg</groupId> <artifactId>B</artifactId> <version>2.1.1</version> <scope>compile</scope> </dependency></dependencies> A B C ARCHIVA BuildC Look for A & B 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> Seite 15
Questions? Seite 16