Example Maven pom.xml File
Here you find an example pom.xml file that contains the various elements mentioned below.
You might like to take this as a template for your own Maven projects.
Continuous Integration Server
For managing software projects at:
and for automatically deploying builds to our maven repository.
Please add the following fragment to your pom.xml:
<ciManagement>
<system>Continuum</system>
<url>http://www.infosys.tuwien.ac.at/ci</url>
<notifiers>
<notifier>
<type>mail</type>
<sendOnError>true</sendOnError>
<sendOnFailure>true</sendOnFailure>
<sendOnSuccess>false</sendOnSuccess>
<sendOnWarning>false</sendOnWarning>
<configuration><address>YOUR_EMAIL-ADDRESS</address></configuration>
</notifier>
</notifiers>
</ciManagement>
Projects Sites
The continuous integration server automatically can upload generated sites for maven projects to
Maven Repository
For using the Maven repository please include a
repository and/or pluginRepository entry in your
pom.xml and/or settings.xml with:
<id>infosys.tuwien.ac.at</id>
<name>Maven Repository @ InfoSys.TUWien.ac.at</name>
<url>http://www.infosys.tuwien.ac.at/maven/repo/</url>
as a mirror
For using the Maven repository as a proxy,
include the above lines as a mirror entry in your ${user.home}/.m2/settings.xml such as follows:
<mirror>
<id>infosys.tuwien.ac.at</id>
<name>Maven Repository @ InfoSys.TUWien.ac.at</name>
<url>http://www.infosys.tuwien.ac.at/maven/repo/</url>
<mirrorOf>*</mirrorOf>
</mirror>
If you need our mirror to access and cache additional repositories please send our sysadmin a snipplet (to be included into $ARTIFACTORY_HOME/etc/artifactory.config.xml) such as
<remoteRepository>
<key>eclipse.mirrors.tds.net</key>
<description>eclipse.mirrors.tds.net Maven2 Repository</description>
<handleReleases>true</handleReleases>
<handleSnapshots>true</handleSnapshots>
<type>maven2</type>
<url>http://eclipse.mirrors.tds.net/tools/emf/maven2</url>
</remoteRepository>
Deploying builds to the repository
If you wish (the continuous integration server) to install builds to the maven repository and to upload the maven project website to the webserver please add the following fragments to your pom.xml:
<distributionManagement>
<repository>
<id>infosys.tuwien.ac.at</id>
<name>Maven Repository @ InfoSys.TUWien.ac.at</name>
<url>dav:http://www.infosys.tuwien.ac.at/maven/libs-releases-local/</url>
</repository>
<snapshotRepository>
<id>infosys.tuwien.ac.at</id>
<name>Maven Snapshot Repository @ InfoSys.TUWien.ac.at</name>
<url>dav:http://www.infosys.tuwien.ac.at/maven/libs-snapshots-local/</url>
</snapshotRepository>
<site>
<id>infosys.tuwien.ac.at</id>
<name>Project Website for ${project.name}</name>
<url>dav:http://www.infosys.tuwien.ac.at/m2projects/${project.groupId}/${project.artifactId}</url>
</site>
</distributionManagement>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav</artifactId>
<version>1.0-beta-2</version>
</extension>
</extensions>
</build>
The continuous integration server will automatically deploy your builds and project websites to the maven repository and webserver.
If you wish to manually deploy from your workstation please create a server entry in your ${user.home}/.m2/settings.xml:
<server>
<id>infosys.tuwien.ac.at</id>
<username>YOUR_USERNAME</username>
<password>YOUR_PASSWORD</username>
</server>
|