Last active
November 6, 2016 09:31
-
-
Save glts/5b69a1a4eb8add63d10f to your computer and use it in GitHub Desktop.
A basic Maven POM for reproducible builds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Useful commands for Maven POM maintenance. | |
- mvn dependency:analyze | |
- mvn dependency:tree | |
- mvn dependency:tree -Dverbose | |
- mvn versions:display-dependency-updates | |
- mvn versions:display-plugin-updates |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>ch.glts.groupid</groupId> | |
<artifactId>artifactid</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>Artifact ID</name> | |
<url>https://github.com/glts/artifactid</url> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<jdk.version>1.8</jdk.version> | |
</properties> | |
<dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>com.google.guava</groupId> | |
<artifactId>guava</artifactId> | |
<version>19.0</version> | |
</dependency> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>4.12</version> | |
</dependency> | |
<dependency> | |
<groupId>org.hamcrest</groupId> | |
<artifactId>hamcrest-all</artifactId> | |
<version>1.3</version> | |
</dependency> | |
</dependencies> | |
</dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>com.google.guava</groupId> | |
<artifactId>guava</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>org.hamcrest</groupId> | |
<artifactId>hamcrest-all</artifactId> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
<build> | |
<pluginManagement> | |
<plugins> | |
<plugin> | |
<artifactId>maven-clean-plugin</artifactId> | |
<version>3.0.0</version> | |
</plugin> | |
<plugin> | |
<artifactId>maven-resources-plugin</artifactId> | |
<version>2.7</version> | |
</plugin> | |
<plugin> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.5</version> | |
</plugin> | |
<plugin> | |
<artifactId>maven-surefire-plugin</artifactId> | |
<version>2.19.1</version> | |
</plugin> | |
<plugin> | |
<artifactId>maven-jar-plugin</artifactId> | |
<version>2.6</version> | |
</plugin> | |
<plugin> | |
<artifactId>maven-source-plugin</artifactId> | |
<version>2.4</version> | |
</plugin> | |
<plugin> | |
<artifactId>maven-javadoc-plugin</artifactId> | |
<version>2.10.3</version> | |
</plugin> | |
<plugin> | |
<artifactId>maven-install-plugin</artifactId> | |
<version>2.5.2</version> | |
</plugin> | |
<plugin> | |
<artifactId>maven-deploy-plugin</artifactId> | |
<version>2.8.2</version> | |
</plugin> | |
<plugin> | |
<artifactId>maven-site-plugin</artifactId> | |
<version>3.4</version> | |
</plugin> | |
<plugin> | |
<artifactId>maven-project-info-reports-plugin</artifactId> | |
<version>2.8.1</version> | |
</plugin> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>versions-maven-plugin</artifactId> | |
<version>2.2</version> | |
</plugin> | |
</plugins> | |
</pluginManagement> | |
<plugins> | |
<plugin> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<configuration> | |
<source>${jdk.version}</source> | |
<target>${jdk.version}</target> | |
<showWarnings>true</showWarnings> | |
<compilerArgs> | |
<arg>-Xlint:all</arg> | |
<arg>-Werror</arg> | |
</compilerArgs> | |
</configuration> | |
</plugin> | |
<plugin> | |
<artifactId>maven-jar-plugin</artifactId> | |
<configuration> | |
<archive> | |
<addMavenDescriptor>false</addMavenDescriptor> | |
</archive> | |
</configuration> | |
</plugin> | |
<plugin> | |
<artifactId>maven-source-plugin</artifactId> | |
<executions> | |
<execution> | |
<id>attach-sources</id> | |
<goals> | |
<goal>jar-no-fork</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<artifactId>maven-javadoc-plugin</artifactId> | |
<executions> | |
<execution> | |
<id>attach-javadoc</id> | |
<goals> | |
<goal>jar</goal> | |
</goals> | |
</execution> | |
</executions> | |
<configuration> | |
<quiet>true</quiet> | |
<additionalJOption>-Xdoclint:all</additionalJOption> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
<reporting> | |
<plugins> | |
<plugin> | |
<artifactId>maven-javadoc-plugin</artifactId> | |
<configuration> | |
<linksource>true</linksource> | |
<quiet>true</quiet> | |
</configuration> | |
</plugin> | |
</plugins> | |
</reporting> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment