Created
April 19, 2016 20:51
-
-
Save spullara/40618d147ecf9718c7a4fc9d58e10500 to your computer and use it in GitHub Desktop.
How to organize a mono-java-repo with Maven.
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
| <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>com.yourpackage</groupId> | |
| <artifactId>parentartifactofeverything</artifactId> | |
| <version>1.0-SNAPSHOT</version> | |
| <modules> | |
| <module>module1</module> | |
| <module>module2</module> | |
| <module>module3</module> | |
| <module>module4</module> | |
| <module>etc</module> | |
| </modules> | |
| <packaging>pom</packaging> | |
| <name>My Project</name> | |
| <properties> | |
| <!-- Force encoding to UTF-8 (bug in OS X)--> | |
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
| <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |
| <!-- Testing library versions --> | |
| <junit.version>4.12</junit.version> | |
| <slf4j.version>1.7.13</slf4j.version> | |
| <log4j.version>2.4.1</log4j.version> | |
| <java.version>1.8</java.version> | |
| <commons.math.version>3.5</commons.math.version> | |
| <jackson.version>2.7.1</jackson.version> | |
| <jetty.version>9.2.14.v20151106</jetty.version> | |
| <javax.mail.version>1.5.4</javax.mail.version> | |
| <nimbus.jwt.version>4.5</nimbus.jwt.version> | |
| <httpasyncclient.version>4.1.1</httpasyncclient.version> | |
| <apache.commons.net.version>3.3</apache.commons.net.version> | |
| <dropwizard.version>0.9.2</dropwizard.version> | |
| <avro.version>1.7.7</avro.version> | |
| <scala.version>2.10.6</scala.version> | |
| <wavefront.public.version>3.10</wavefront.public.version> | |
| <antlr.version>4.5.2-1</antlr.version> | |
| </properties> | |
| <dependencyManagement> | |
| <dependencies> | |
| <dependency> | |
| <groupId>commons-net</groupId> | |
| <artifactId>commons-net</artifactId> | |
| <version>${apache.commons.net.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>javax.mail</groupId> | |
| <artifactId>mail-api</artifactId> | |
| <version>${javax.mail.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.nimbusds</groupId> | |
| <artifactId>nimbus-jose-jwt</artifactId> | |
| <version>${nimbus.jwt.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.httpcomponents</groupId> | |
| <artifactId>httpasyncclient</artifactId> | |
| <version>${httpasyncclient.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-annotations</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-servlets</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-continuation</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-deploy</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-http</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-io</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-jmx</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-plus</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-security</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-servlet</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-server</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-util</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-webapp</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.eclipse.jetty</groupId> | |
| <artifactId>jetty-xml</artifactId> | |
| <version>${jetty.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.github.ben-manes.caffeine</groupId> | |
| <artifactId>caffeine</artifactId> | |
| <version>2.2.3</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.commons</groupId> | |
| <artifactId>commons-math3</artifactId> | |
| <version>${commons.math.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>commons-io</groupId> | |
| <artifactId>commons-io</artifactId> | |
| <version>2.4</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>javax.ws.rs</groupId> | |
| <artifactId>javax.ws.rs-api</artifactId> | |
| <version>2.0.1</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.fasterxml.jackson.core</groupId> | |
| <artifactId>jackson-core</artifactId> | |
| <version>${jackson.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.fasterxml.jackson.core</groupId> | |
| <artifactId>jackson-annotations</artifactId> | |
| <version>${jackson.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.fasterxml.jackson.core</groupId> | |
| <artifactId>jackson-databind</artifactId> | |
| <version>${jackson.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.fasterxml.jackson.module</groupId> | |
| <artifactId>jackson-module-afterburner</artifactId> | |
| <version>${jackson.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.rubiconproject.oss</groupId> | |
| <artifactId>jchronic</artifactId> | |
| <version>0.2.6</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.netty</groupId> | |
| <artifactId>netty-handler</artifactId> | |
| <version>4.0.33.Final</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.google.guava</groupId> | |
| <artifactId>guava</artifactId> | |
| <version>19.0</version> | |
| </dependency> | |
| AND SO ON... | |
| </dependencies> | |
| </dependencyManagement> | |
| <build> | |
| <pluginManagement> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-dependency-plugin</artifactId> | |
| <version>2.10</version> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.avro</groupId> | |
| <artifactId>avro-maven-plugin</artifactId> | |
| <version>1.7.7</version> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-shade-plugin</artifactId> | |
| <version>2.3</version> | |
| </plugin> | |
| <plugin> | |
| <artifactId>maven-assembly-plugin</artifactId> | |
| <version>2.4</version> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.codehaus.mojo</groupId> | |
| <artifactId>cobertura-maven-plugin</artifactId> | |
| <version>2.7</version> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.antlr</groupId> | |
| <artifactId>antlr4-maven-plugin</artifactId> | |
| <version>${antlr.version}</version> | |
| </plugin> | |
| </plugins> | |
| </pluginManagement> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.codehaus.mojo</groupId> | |
| <artifactId>cobertura-maven-plugin</artifactId> | |
| <configuration> | |
| <check/> | |
| <formats> | |
| <format>html</format> | |
| <format>xml</format> | |
| </formats> | |
| <instrumentation> | |
| <ignores> | |
| <ignore>sunnylabs.*</ignore> | |
| </ignores> | |
| <excludes> | |
| <exclude>sunnylabs/**/*.class</exclude> | |
| <exclude>sunnylabs/**/*Test.class</exclude> | |
| </excludes> | |
| </instrumentation> | |
| <aggregate>true</aggregate> | |
| </configuration> | |
| <executions> | |
| <execution> | |
| <goals> | |
| <goal>clean</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-dependency-plugin</artifactId> | |
| <version>2.10</version> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-surefire-plugin</artifactId> | |
| <version>2.19</version> | |
| <configuration> | |
| <forkCount>4</forkCount> | |
| <reuseForks>false</reuseForks> | |
| <argLine>-Xmx2G</argLine> | |
| <rerunFailingTestsCount>3</rerunFailingTestsCount> | |
| </configuration> | |
| </plugin> | |
| <plugin> | |
| <artifactId>maven-compiler-plugin</artifactId> | |
| <version>3.3</version> | |
| <configuration> | |
| <source>${java.version}</source> | |
| <target>${java.version}</target> | |
| </configuration> | |
| </plugin> | |
| <plugin> | |
| <artifactId>maven-release-plugin</artifactId> | |
| <version>2.5</version> | |
| <configuration> | |
| <!-- we have all our submodules at the same version --> | |
| <autoVersionSubmodules>true</autoVersionSubmodules> | |
| </configuration> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-enforcer-plugin</artifactId> | |
| <version>1.0.1</version> | |
| <executions> | |
| <execution> | |
| <id>enforce</id> | |
| <configuration> | |
| <rules> | |
| <DependencyConvergence/> | |
| </rules> | |
| </configuration> | |
| <goals> | |
| <goal>enforce</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| </plugins> | |
| </build> | |
| <distributionManagement> | |
| <repository> | |
| <id>sunnylabs-releases</id> | |
| <name>Release Repository</name> | |
| <url>https://repo.wavefront.com/content/repositories/releases/</url> | |
| </repository> | |
| <snapshotRepository> | |
| <id>sunnylabs-snapshots</id> | |
| <name>Snapshot Repository</name> | |
| <url>https://repo.wavefront.com/content/repositories/snapshots/</url> | |
| </snapshotRepository> | |
| </distributionManagement> | |
| <repositories> | |
| <repository> | |
| <id>your-public</id> | |
| <name>Your Internal Repository</name> | |
| <url>https://repo.yourdomain.com/content/groups/public/</url> | |
| <snapshots> | |
| <enabled>true</enabled> | |
| </snapshots> | |
| <releases> | |
| <enabled>true</enabled> | |
| </releases> | |
| </repository> | |
| <repository> | |
| <snapshots> | |
| <enabled>false</enabled> | |
| </snapshots> | |
| <id>bintray-nitram509-jbrotli</id> | |
| <name>bintray</name> | |
| <url>http://dl.bintray.com/nitram509/jbrotli</url> | |
| </repository> | |
| </repositories> | |
| <pluginRepositories> | |
| <pluginRepository> | |
| <id>your-repo</id> | |
| <name>Your Internal Repository</name> | |
| <url>https://repo.yourdomain.com/content/groups/public/</url> | |
| <snapshots> | |
| <enabled>true</enabled> | |
| </snapshots> | |
| <releases> | |
| <enabled>true</enabled> | |
| </releases> | |
| </pluginRepository> | |
| </pluginRepositories> | |
| <scm> | |
| <connection>scm:git:ssh://[email protected]/yourname/yourproject.git</connection> | |
| <tag>HEAD</tag> | |
| </scm> | |
| </project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment