FANDOM


(Simple POM)
(Typical POM for Spring Boot Project)
(33 intermediate revisions by one user not shown)
Line 83: Line 83:
   
 
* '''Build Helper Plugin'''
 
* '''Build Helper Plugin'''
** http://mojo.codehaus.org/build-helper-maven-plugin/
+
** https://www.mojohaus.org/build-helper-maven-plugin/
   
 
* '''Build Number Plugin'''
 
* '''Build Number Plugin'''
Line 98: Line 98:
   
 
* '''Properties Plugin'''
 
* '''Properties Plugin'''
** http://mojo.codehaus.org/properties-maven-plugin/
+
** https://www.mojohaus.org/properties-maven-plugin/
 
** Provides goals to read and write properties from and to files.
 
** Provides goals to read and write properties from and to files.
   
Line 125: Line 125:
 
* '''FindBugs Plugin'''
 
* '''FindBugs Plugin'''
 
** http://gleclaire.github.io/findbugs-maven-plugin/
 
** http://gleclaire.github.io/findbugs-maven-plugin/
 
 
** [http://gleclaire.github.io/findbugs-maven-plugin/examples/multi-module-config.html Multimodule Configuration]
 
** [http://gleclaire.github.io/findbugs-maven-plugin/examples/multi-module-config.html Multimodule Configuration]
 
** [http://gleclaire.github.io/findbugs-maven-plugin/faq.html#Aggregate_Reporting Is there an easy way to generate the aggregate report ?] : ''Unfortunately ...''
 
** [http://gleclaire.github.io/findbugs-maven-plugin/faq.html#Aggregate_Reporting Is there an easy way to generate the aggregate report ?] : ''Unfortunately ...''
Line 206: Line 205:
 
** http://scala-tools.org/mvnsites/maven-scala-plugin/
 
** http://scala-tools.org/mvnsites/maven-scala-plugin/
 
** Desc. : used for compiling/testing/running/documenting scala code in maven.
 
** Desc. : used for compiling/testing/running/documenting scala code in maven.
  +
  +
* '''mvn-golang'''
  +
** https://github.com/raydac/mvn-golang
  +
** Desc.: A Maven plugin allows to build Go applications with maven
  +
** Readings
  +
*** [https://github.com/raydac/mvn-golang/wiki/PluginConfigParameters Configuration parameters of the mvn-golang-wrapper plugin]
   
 
* '''Frontend Maven Plugin'''
 
* '''Frontend Maven Plugin'''
Line 215: Line 220:
   
 
===Application frameworks support===
 
===Application frameworks support===
  +
  +
* '''Spring Boot Maven Plugin'''
  +
** https://docs.spring.io/spring-boot/docs/current/maven-plugin/
  +
** provides Spring Boot support in Maven, allowing you to package executable jar or war archives and run an application “in-place”
   
 
* '''AspectJ Plugin'''
 
* '''AspectJ Plugin'''
Line 328: Line 337:
 
* [https://issues.apache.org/jira/browse/MSITE-443 add a reportingManagement section]
 
* [https://issues.apache.org/jira/browse/MSITE-443 add a reportingManagement section]
 
** reporting plugin and <code><pluginManagement></code>
 
** reporting plugin and <code><pluginManagement></code>
  +
* [https://stackoverflow.com/questions/33866209/linking-to-javadoc-io-using-javadoc-link-option Linking to javadoc.io using Javadoc -link option](Nov 23 '15)
   
 
===Maven assemblies===
 
===Maven assemblies===
Line 350: Line 360:
   
 
===Site process===
 
===Site process===
*[http://maven.apache.org/guides/mini/guide-site.html Creating a site]
+
*[http://maven.apache.org/doxia/doxia-sitetools/doxia-decoration-model/decoration.html XML Schema Reference for the site descriptor]
+
* [http://maven.apache.org/guides/mini/guide-site.html Creating a site]
*[http://maven.apache.org/plugins/maven-site-plugin/examples/sitedescriptor.html Configuring the site descriptor]
+
* [http://maven.apache.org/doxia/doxia-sitetools/doxia-decoration-model/decoration.html XML Schema Reference for the site descriptor]
*[http://maven.apache.org/plugins/maven-project-info-reports-plugin/ Maven Project Info Reports Plugin]
+
* [http://maven.apache.org/plugins/maven-site-plugin/examples/sitedescriptor.html Configuring the site descriptor]
*[http://www.sonatype.com/books/mvnref-book/reference/site-generation-sect-site-appearance.html Customizing Site Appearance]
+
* [http://maven.apache.org/plugins/maven-project-info-reports-plugin/ Maven Project Info Reports Plugin]
*[http://maven.apache.org/doxia/modules/ Doxia Modules Guide]
+
* [http://www.sonatype.com/books/mvnref-book/reference/site-generation-sect-site-appearance.html Customizing Site Appearance]
*[http://code.google.com/p/doxia-module-markdown/ doxia-module-markdown]
+
* [http://maven.apache.org/doxia/modules/ Doxia Modules Guide]
*[http://maven.40175.n5.nabble.com/How-to-use-confluence-format-td326724.html How to use confluence format? (in Maven site generation)]
+
* [http://code.google.com/p/doxia-module-markdown/ doxia-module-markdown]
  +
* [http://maven.40175.n5.nabble.com/How-to-use-confluence-format-td326724.html How to use confluence format? (in Maven site generation)]
  +
* [https://maven.apache.org/plugins/maven-site-plugin/examples/multimodule.html Building multi-module sites]
  +
* [https://maven.apache.org/plugins/maven-site-plugin/faq.html#Use_of_url '''How does the Site Plugin use the <url> element in the POM?''']
  +
** ''In a multi module build it is important for the parent and child modules to have different URLs. ...''
   
 
===Release process===
 
===Release process===
*[http://www.sonatype.com/people/2011/01/using-the-maven-release-plugin-things-to-know/ Using the Maven Release plugin: Things to know]
+
*[https://cwiki.apache.org/confluence/display/ARCHIVA/Archiva+Release+Process Archiva Release Process (Real-world sample of Maven release plugin)]
+
* [http://www.sonatype.com/people/2011/01/using-the-maven-release-plugin-things-to-know/ Using the Maven Release plugin: Things to know]
*[http://maven.40175.n5.nabble.com/Deploying-same-version-overwrites-existing-release-td94691.html Deploying same version overwrites existing release]
+
* [https://cwiki.apache.org/confluence/display/ARCHIVA/Archiva+Release+Process Archiva Release Process (Real-world sample of Maven release plugin)]
  +
* [http://maven.40175.n5.nabble.com/Deploying-same-version-overwrites-existing-release-td94691.html Deploying same version overwrites existing release]
  +
* [https://devcenter.heroku.com/articles/using-a-custom-maven-settings-xml Using a Custom Maven Settings File] (08 December 2014)
   
 
===Property and Interpolation===
 
===Property and Interpolation===
Line 386: Line 396:
 
project.reporting.outputDirectory
 
project.reporting.outputDirectory
 
project.parent.basedir
 
project.parent.basedir
  +
currentYear
   
 
env.PATH
 
env.PATH
Line 417: Line 428:
 
* [https://maven.apache.org/enforcer/enforcer-rules/requireJavaVersion.html How to enforces certain Java JDK versions]
 
* [https://maven.apache.org/enforcer/enforcer-rules/requireJavaVersion.html How to enforces certain Java JDK versions]
   
==HOWTOs==
+
==Tips and Tricks==
   
 
===Simple POM===
 
===Simple POM===
   
<syntaxhighlight lang="xml" line enclose='div'>
+
<syntaxhighlight lang="xml" line enclose='div' style="margin-left:40px">
 
<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">
 
<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>
 
<modelVersion>4.0.0</modelVersion>
Line 435: Line 446:
 
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  +
<!-- control build behavior -->
 
<skipTests>false</skipTests>
 
<skipTests>false</skipTests>
 
<maven.deploy.skip>true</maven.deploy.skip>
 
<maven.deploy.skip>true</maven.deploy.skip>
Line 445: Line 457:
 
<checkstyle.skip>true</checkstyle.skip>
 
<checkstyle.skip>true</checkstyle.skip>
 
<dependencies.release.updatePolicy>never</dependencies.release.updatePolicy>
 
<dependencies.release.updatePolicy>never</dependencies.release.updatePolicy>
<java.version>1.8</java.version>
+
<!-- versions for Java SDK and dependencies -->
<jsr305.version>3.0.1</jsr305.version>
+
<java.version>1.9</java.version>
  +
<jsr305.version>3.0.2</jsr305.version> <!-- https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305 -->
  +
<validation-api.version>2.0.1.Final</validation-api.version> <!-- https://mvnrepository.com/artifact/javax.validation/validation-api -->
  +
<hibernate-validator.version>6.0.16.Final</hibernate-validator.version> <!-- https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator -->
 
<slf4j.version>1.7.21</slf4j.version>
 
<slf4j.version>1.7.21</slf4j.version>
 
<logback.version>1.1.7</logback.version>
 
<logback.version>1.1.7</logback.version>
<junit.version>4.8.2</junit.version>
+
<junit.version>4.12</junit.version>
<testng.version>6.9.10</testng.version>
+
<junit5.version>5.5.1</junit5.version> <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
  +
<testng.version>6.14.3</testng.version> <!-- https://mvnrepository.com/artifact/org.testng/testng -->
 
<mockito.version>2.6.9</mockito.version>
 
<mockito.version>2.6.9</mockito.version>
 
<commons.lang3.version>3.5</commons.lang3.version>
 
<commons.lang3.version>3.5</commons.lang3.version>
  +
<typesafe-config.version>1.3.1</typesafe-config.version>
  +
<jackson.version>2.7.4</jackson.version>
 
<swagger.version>1.5.12</swagger.version>
 
<swagger.version>1.5.12</swagger.version>
 
<spring.version>4.3.5.RELEASE</spring.version>
 
<spring.version>4.3.5.RELEASE</spring.version>
<mybatis.version>3.4.0</mybatis.version>
+
<mybatis.version>3.5.1</mybatis.version> <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
<jackson.version>2.7.4</jackson.version>
+
<!-- version for Maven plugins -->
<maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
+
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
<maven-site-plugin.version>3.6</maven-site-plugin.version>
+
<maven-site-plugin.version>3.7.1</maven-site-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-site-plugin -->
 
<swagger-maven-plugin.version>3.1.4</swagger-maven-plugin.version>
 
<swagger-maven-plugin.version>3.1.4</swagger-maven-plugin.version>
 
<swagger-codegen-maven-plugin.version>2.2.1</swagger-codegen-maven-plugin.version>
 
<swagger-codegen-maven-plugin.version>2.2.1</swagger-codegen-maven-plugin.version>
<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
+
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
<maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
+
<maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
 
<findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
 
<findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
 
<maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
 
<maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
Line 549: Line 563:
 
<reporting>
 
<reporting>
 
<plugins>
 
<plugins>
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-project-info-reports-plugin</artifactId>
  +
<reportSets>
  +
<reportSet>
  +
<reports>
  +
<report>index</report>
  +
<!-- <report>dependencies</report> -->
  +
<!-- <report>project-team</report> -->
  +
<!-- <report>mailing-list</report> -->
  +
<!-- <report>cim</report> -->
  +
<!-- <report>issue-tracking</report> -->
  +
<!-- <report>license</report> -->
  +
<!-- <report>scm</report> -->
  +
</reports>
  +
</reportSet>
  +
</reportSets>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-jxr-plugin</artifactId>
  +
<reportSets>
  +
<reportSet>
  +
<id>aggregate</id>
  +
<reports>
  +
<report>aggregate</report>
  +
<report>test-aggregate</report>
  +
</reports>
  +
</reportSet>
  +
</reportSets>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-javadoc-plugin</artifactId>
  +
<reportSets>
  +
<reportSet>
  +
<id>aggregate</id>
  +
<reports>
  +
<report>aggregate</report>
  +
</reports>
  +
</reportSet>
  +
</reportSets>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-pmd-plugin</artifactId>
  +
<configuration>
  +
<!-- For more, refer https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html -->
  +
<aggregate>true</aggregate>
  +
<linkXRef>true</linkXRef>
  +
<includeXmlInSite>true</includeXmlInSite>
  +
<skipEmptyReport>true</skipEmptyReport>
  +
<skipPmdError>true</skipPmdError>
  +
</configuration>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.codehaus.mojo</groupId>
  +
<artifactId>findbugs-maven-plugin</artifactId>
  +
</plugin>
 
</plugins>
 
</plugins>
 
</reporting>
 
</reporting>
Line 700: Line 773:
 
<link>http://docs.spring.io/spring-boot/docs/1.5.x/api/</link>
 
<link>http://docs.spring.io/spring-boot/docs/1.5.x/api/</link>
 
</links>
 
</links>
<show>projected</show>
+
<show>protected</show>
 
<splitindex>true</splitindex>
 
<splitindex>true</splitindex>
 
</configuration>
 
</configuration>
Line 846: Line 919:
 
<groupId>javax.validation</groupId>
 
<groupId>javax.validation</groupId>
 
<artifactId>validation-api</artifactId>
 
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
+
<version>${validation-api.version}</version>
 
</dependency>
 
</dependency>
 
<dependency>
 
<dependency>
Line 852: Line 925:
 
<groupId>org.hibernate</groupId>
 
<groupId>org.hibernate</groupId>
 
<artifactId>hibernate-validator</artifactId>
 
<artifactId>hibernate-validator</artifactId>
<version>5.2.4.Final</version>
+
<version>${hibernate-validator.version}</version>
 
</dependency>
 
</dependency>
 
<dependency>
 
<dependency>
Line 862: Line 935:
 
<groupId>org.slf4j</groupId>
 
<groupId>org.slf4j</groupId>
 
<artifactId>jcl-over-slf4j</artifactId>
 
<artifactId>jcl-over-slf4j</artifactId>
  +
<version>${slf4j.version}</version>
  +
<scope>runtime</scope>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.slf4j</groupId>
  +
<artifactId>jul-to-slf4j</artifactId>
 
<version>${slf4j.version}</version>
 
<version>${slf4j.version}</version>
 
</dependency>
 
</dependency>
Line 896: Line 975:
 
<artifactId>commons-lang3</artifactId>
 
<artifactId>commons-lang3</artifactId>
 
<version>${commons.lang3.version}</version>
 
<version>${commons.lang3.version}</version>
  +
</dependency>
  +
<!-- For more typesafe config, refer https://github.com/typesafehub/config -->
  +
<dependency>
  +
<groupId>com.typesafe</groupId>
  +
<artifactId>config</artifactId>
  +
<version>${typesafe-config.version}</version>
  +
</dependency>
  +
</dependencies>
  +
</project>
  +
</syntaxhighlight>
  +
  +
===Typical POM for Spring Boot Project===
  +
  +
<syntaxhighlight lang="xml" line enclose="div" style="margin-left:40px">
  +
<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>
  +
<!-- POM for Spring Boot 2.1 : https://docs.spring.io/spring-boot/docs/2.1.x/reference/htmlsingle/#getting-started-maven-installation -->
  +
<parent>
  +
<groupId>org.springframework.boot</groupId>
  +
<artifactId>spring-boot-starter-parent</artifactId>
  +
<version>2.1.6.RELEASE</version>
  +
</parent>
  +
<groupId>mygroup</groupId>
  +
<artifactId>mygroup.myproject</artifactId>
  +
<version>0.0.1-SNAPSHOT</version>
  +
  +
<name>myproject</name>
  +
<description>...</description>
  +
  +
<prerequisites>
  +
<maven>3.0</maven>
  +
</prerequisites>
  +
  +
<properties>
  +
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  +
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  +
<!-- control build behavior -->
  +
<skipTests>false</skipTests>
  +
<maven.deploy.skip>true</maven.deploy.skip>
  +
<maven.site.skip>false</maven.site.skip> <!-- consumed by maven-site-plugin -->
  +
<maven.site.deploy.skip>true</maven.site.deploy.skip> <!-- consumed by maven-site-plugin -->
  +
<generateProjectInfo>false</generateProjectInfo> <!-- consumed by maven-site-plugin -->
  +
<generateReports>true</generateReports> <!-- consumed by maven-site-plugin -->
  +
<maven.javadoc.skip>false</maven.javadoc.skip>
  +
<findbugs.skip>true</findbugs.skip>
  +
<checkstyle.skip>true</checkstyle.skip>
  +
<dependencies.release.updatePolicy>never</dependencies.release.updatePolicy>
  +
<!-- versions for Java SDK and dependencies -->
  +
<java.version>1.9</java.version>
  +
<jsr305.version>3.0.2</jsr305.version> <!-- https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305 -->
  +
<validation-api.version>2.0.1.Final</validation-api.version> <!-- https://mvnrepository.com/artifact/javax.validation/validation-api -->
  +
<hibernate-validator.version>6.1.2.Final</hibernate-validator.version> <!-- https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator -->
  +
<slf4j.version>1.7.30</slf4j.version> <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
  +
<logback.version>1.2.3</logback.version> <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
  +
<janino.version>3.1.0</janino.version> <!-- https://mvnrepository.com/artifact/org.codehaus.janino/janino -->
  +
<junit.version>4.12</junit.version>
  +
<junit5.version>5.6.1</junit5.version> <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine -->
  +
<testng.version>6.9.10</testng.version>
  +
<mockito.version>3.1.0</mockito.version> <!-- affect the dependency version of spring-starter-test module -->
  +
<commons-lang3.version>3.9</commons-lang3.version> <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
  +
<commons-validator.version>1.6</commons-validator.version> <!-- https://mvnrepository.com/artifact/commons-validator/commons-validator -->
  +
<commons-collections4.version>4.4</commons-collections4.version> <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-collections4 -->
  +
<typesafe-config.version>1.3.1</typesafe-config.version>
  +
<swagger.version>2.0.8</swagger.version> <!-- https://mvnrepository.com/artifact/io.swagger.core.v3 -->
  +
<springfox-swagger2.version>2.9.2</springfox-swagger2.version> <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 -->
  +
<mybatis.version>3.5.1</mybatis.version> <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
  +
<jjwt.version>0.10.7</jjwt.version> <!-- https://mvnrepository.com/artifact/io.jsonwebtoken -->
  +
<web3j.version>4.5.17</web3j.version> <!-- https://mvnrepository.com/artifact/org.web3j -->
  +
<!-- version for Maven plugins -->
  +
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
  +
<maven-site-plugin.version>3.9.0</maven-site-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-site-plugin -->
  +
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
  +
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
  +
<findbugs-maven-plugin.version>3.0.5</findbugs-maven-plugin.version> <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/findbugs-maven-plugin -->
  +
<maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-checkstyle-plugin -->
  +
<duplicate-finder-maven-plugin.version>1.4.0</duplicate-finder-maven-plugin.version> <!-- https://mvnrepository.com/artifact/org.basepom.maven/duplicate-finder-maven-plugin -->
  +
<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-eclipse-plugin -->
  +
<swagger-maven-plugin.version>3.1.8</swagger-maven-plugin.version> <!-- https://github.com/kongchen/swagger-maven-plugin -->
  +
<swagger-codegen-maven-plugin.version>3.0.0-rc1</swagger-codegen-maven-plugin.version> <!-- https://mvnrepository.com/artifact/io.swagger/swagger-codegen-maven-plugin -->
  +
<swagger-codegen-maven-plugin.v3.version>3.0.10</swagger-codegen-maven-plugin.v3.version> <!-- https://mvnrepository.com/artifact/io.swagger.codegen.v3/swagger-codegen-maven-plugin -->
  +
<web3j-maven-plugin.version>4.5.11</web3j-maven-plugin.version> <!-- https://mvnrepository.com/artifact/org.web3j/web3j-maven-plugin -->
  +
<exec-maven-plugin>1.6.0</exec-maven-plugin>
  +
<maven.compiler.source>${java.version}</maven.compiler.source>
  +
<maven.compiler.target>${java.version}</maven.compiler.target>
  +
</properties>
  +
  +
<repositories>
  +
<!-- For more repositories, refer https://mvnrepository.com/repos -->
  +
<repository>
  +
<id>central1</id>
  +
<url>http://repo1.maven.org/maven2/</url>
  +
<releases>
  +
<updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  +
</releases>
  +
<snapshots>
  +
<enabled>false</enabled>
  +
</snapshots>
  +
</repository>
  +
<repository>
  +
<id>central2</id>
  +
<url>http://repo2.maven.org/maven2/</url>
  +
<releases>
  +
<updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  +
</releases>
  +
<snapshots>
  +
<enabled>false</enabled>
  +
</snapshots>
  +
</repository>
  +
<repository>
  +
<id>java.net.public</id>
  +
<url>https://maven.java.net/content/groups/public/</url>
  +
<releases>
  +
<updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  +
</releases>
  +
<snapshots>
  +
<enabled>true</enabled>
  +
</snapshots>
  +
</repository>
  +
<repository>
  +
<id>jcenter-snapshots</id>
  +
<name>jcenter</name>
  +
<url>https://jcenter.bintray.com/</url>
  +
</repository>
  +
</repositories>
  +
  +
<pluginRepositories>
  +
<pluginRepository>
  +
<id>central1</id>
  +
<url>http://repo1.maven.org/maven2/</url>
  +
<releases>
  +
<updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  +
</releases>
  +
<snapshots>
  +
<enabled>false</enabled>
  +
</snapshots>
  +
</pluginRepository>
  +
<pluginRepository>
  +
<id>central2</id>
  +
<url>http://repo2.maven.org/maven2/</url>
  +
<releases>
  +
<updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  +
</releases>
  +
<snapshots>
  +
<enabled>false</enabled>
  +
</snapshots>
  +
</pluginRepository>
  +
</pluginRepositories>
  +
  +
<reporting>
  +
<plugins>
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-project-info-reports-plugin</artifactId>
  +
<reportSets>
  +
<reportSet>
  +
<reports>
  +
<report>index</report>
  +
<!-- <report>dependencies</report> -->
  +
<!-- <report>project-team</report> -->
  +
<!-- <report>mailing-list</report> -->
  +
<!-- <report>cim</report> -->
  +
<!-- <report>issue-tracking</report> -->
  +
<!-- <report>license</report> -->
  +
<!-- <report>scm</report> -->
  +
</reports>
  +
</reportSet>
  +
</reportSets>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-jxr-plugin</artifactId>
  +
<reportSets>
  +
<reportSet>
  +
<id>aggregate</id>
  +
<reports>
  +
<report>aggregate</report>
  +
<report>test-aggregate</report>
  +
</reports>
  +
</reportSet>
  +
</reportSets>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-javadoc-plugin</artifactId>
  +
<reportSets>
  +
<reportSet>
  +
<id>aggregate</id>
  +
<reports>
  +
<report>aggregate</report>
  +
</reports>
  +
</reportSet>
  +
</reportSets>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-pmd-plugin</artifactId>
  +
<configuration>
  +
<!-- For more, refer https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html -->
  +
<aggregate>true</aggregate>
  +
<linkXRef>true</linkXRef>
  +
<includeXmlInSite>true</includeXmlInSite>
  +
<skipEmptyReport>true</skipEmptyReport>
  +
<skipPmdError>true</skipPmdError>
  +
</configuration>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.codehaus.mojo</groupId>
  +
<artifactId>findbugs-maven-plugin</artifactId>
  +
</plugin>
  +
</plugins>
  +
</reporting>
  +
  +
<build>
  +
<plugins>
  +
<plugin>
  +
<groupId>org.springframework.boot</groupId>
  +
<artifactId>spring-boot-maven-plugin</artifactId>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.basepom.maven</groupId>
  +
<artifactId>duplicate-finder-maven-plugin</artifactId>
  +
<version>${duplicate-finder-maven-plugin.version}</version>
  +
<executions>
  +
<execution>
  +
<id>find-duplicate-classes</id>
  +
<phase>prepare-package</phase>
  +
<goals>
  +
<goal>check</goal>
  +
</goals>
  +
</execution>
  +
</executions>
  +
<configuration>
  +
<!-- For more, refer https://github.com/basepom/duplicate-finder-maven-plugin/wiki -->
  +
<skip>false</skip>
  +
<checkCompileClasspath>false</checkCompileClasspath>
  +
<checkRuntimeClasspath>true</checkRuntimeClasspath>
  +
<checkTestClasspath>false</checkTestClasspath>
  +
<ignoredResourcePatterns>
  +
<ignoredResourcePattern>about\.html</ignoredResourcePattern>
  +
</ignoredResourcePatterns>
  +
<ignoredClassPatterns>
  +
<ignoredClassPattern>META-INF\.versions\.9\.module-info</ignoredClassPattern>
  +
</ignoredClassPatterns>
  +
<ignoredDependencies>
  +
<dependency>
  +
<groupId>org.slf4j</groupId>
  +
<artifactId>jcl-over-slf4j</artifactId>
  +
</dependency>
  +
</ignoredDependencies>
  +
</configuration>
  +
</plugin>
  +
<plugin>
  +
<groupId>com.github.kongchen</groupId>
  +
<artifactId>swagger-maven-plugin</artifactId>
  +
<version>${swagger-maven-plugin.version}</version>
  +
<executions>
  +
<execution>
  +
<phase>compile</phase>
  +
<goals>
  +
<goal>generate</goal>
  +
</goals>
  +
<configuration>
  +
<apiSources>
  +
<apiSource>
  +
<springmvc>true</springmvc>
  +
<locations>
  +
<location>myprogram.controllers</location>
  +
</locations>
  +
<schemes>
  +
<scheme>http</scheme>
  +
</schemes>
  +
<host>localhost:8080</host>
  +
<basePath>/myappl/v1</basePath>
  +
<info>
  +
<title>REST API of My Program</title>
  +
<version>v1</version>
  +
<description>
  +
...
  +
</description>
  +
</info>
  +
<swaggerDirectory>${project.build.directory}/generated/swagger</swaggerDirectory>
  +
<swaggerFileName>api</swaggerFileName>
  +
<outputFormats>json,yaml</outputFormats>
  +
<!-- <templatePath>${basedir}/src/templates/swagger/strapdown.html.hbs</templatePath> -->
  +
<!-- <outputPath>${project.build.directory}/generated/swagger/api.html</outputPath> -->
  +
<!-- <attachSwaggerArtifact>true</attachSwaggerArtifact> -->
  +
<modelConverters>io.swagger.validator.BeanValidator</modelConverters>
  +
</apiSource>
  +
</apiSources>
  +
</configuration>
  +
</execution>
  +
</executions>
  +
</plugin>
  +
<plugin>
  +
<!-- For more, refer followings
  +
https://github.com/swagger-api/swagger-codegen/tree/3.0.0
  +
https://github.com/swagger-api/swagger-codegen/tree/3.0.0/modules/swagger-codegen-maven-plugin
  +
-->
  +
<groupId>io.swagger.codegen.v3</groupId>
  +
<artifactId>swagger-codegen-maven-plugin</artifactId>
  +
<version>${swagger-codegen-maven-plugin.v3.version}</version>
  +
<executions>
  +
<execution>
  +
<id>generate-rest-api-doc-v3</id>
  +
<phase>process-classes</phase>
  +
<goals>
  +
<goal>generate</goal>
  +
</goals>
  +
<configuration>
  +
<inputSpec>${project.build.directory}/generated/swagger/api.json</inputSpec>
  +
<language>html2</language>
  +
<output>${project.build.directory}/generated/swagger/html2</output>
  +
<generateApis>true</generateApis>
  +
</configuration>
  +
</execution>
  +
</executions>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.web3j</groupId>
  +
<artifactId>web3j-maven-plugin</artifactId>
  +
<version>${web3j-maven-plugin.version}</version>
  +
</plugin>
  +
</plugins>
  +
<pluginManagement>
  +
<plugins>
  +
<!-- core -->
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-compiler-plugin</artifactId>
  +
<version>${maven-compiler-plugin.version}</version>
  +
<inherited>true</inherited>
  +
<configuration>
  +
<source>${java.version}</source>
  +
<target>${java.version}</target>
  +
</configuration>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-site-plugin</artifactId>
  +
<version>${maven-site-plugin.version}</version>
  +
<dependencies>
  +
<dependency>
  +
<groupId>org.apache.maven.wagon</groupId>
  +
<artifactId>wagon-ssh</artifactId>
  +
<version>2.12</version>
  +
</dependency>
  +
</dependencies>
  +
</plugin>
  +
<!-- sources -->
  +
<plugin>
  +
<!-- For more, refer followings
  +
https://github.com/swagger-api/swagger-codegen
  +
https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin
  +
-->
  +
<groupId>io.swagger</groupId>
  +
<artifactId>swagger-codegen-maven-plugin</artifactId>
  +
<version>${swagger-codegen-maven-plugin.version}</version>
  +
</plugin>
  +
<!-- packaging -->
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-jar-plugin</artifactId>
  +
<version>${maven-jar-plugin.version}</version>
  +
<configuration>
  +
<!-- For more on Maven archiver, refer http://maven.apache.org/shared/maven-archiver/index.html -->
  +
<archive>
  +
<addMavenDescriptor>false</addMavenDescriptor>
  +
<forced>true</forced>
  +
<index>true</index>
  +
<manifest>
  +
<addClasspath>false</addClasspath>
  +
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  +
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
  +
<addExtensions>false</addExtensions>
  +
<classpathLayoutType>simple</classpathLayoutType>
  +
</manifest>
  +
<manifestEntries>
  +
<Source-Revision>${project.svn.revision}</Source-Revision>
  +
</manifestEntries>
  +
</archive>
  +
</configuration>
  +
</plugin>
  +
<!-- reporting -->
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-javadoc-plugin</artifactId>
  +
<version>${maven-javadoc-plugin.version}</version>
  +
<configuration>
  +
<additionalJOptions>
  +
<!-- causes error with JDK 8 <additionalJOption>-Xms128m</additionalJOption> -->
  +
</additionalJOptions>
  +
<failOnError>false</failOnError>
  +
<docencoding>${project.reporting.outputEncoding}</docencoding>
  +
<encoding>${project.build.sourceEncoding}</encoding>
  +
<doctitle>${project.name} ${project.version} API</doctitle>
  +
<windowtitle>${project.name} ${project.version} API</windowtitle>
  +
<links>
  +
<link>https://docs.oracle.com/javase/9/docs/api/</link>
  +
<link>https://docs.oracle.com/javaee/7/api/</link>
  +
<link>http://www.javadoc.io/doc/com.google.code.findbugs/jsr305/${jsr305.version}</link>
  +
<link>http://docs.jboss.org/hibernate/beanvalidation/spec/2.0/api/</link>
  +
<link>http://docs.jboss.org/hibernate/validator/6.0/api/</link>
  +
<link>https://www.slf4j.org/apidocs/</link>
  +
<link>http://junit.org/junit4/javadoc/${junit.version}/</link>
  +
<link>http://commons.apache.org/proper/commons-lang/javadocs/api-${commons-lang3.version}/</link>
  +
<link>http://commons.apache.org/proper/commons-collections/javadocs/api-release/</link>
  +
<link>http://docs.swagger.io/swagger-core/v1.5.X/apidocs/</link>
  +
<link>http://springfox.github.io/springfox/javadoc/${springfox-swagger2.version}/</link>
  +
<link>https://docs.spring.io/spring/docs/5.1.x/javadoc-api/</link>
  +
<link>https://docs.spring.io/spring-boot/docs/2.1.x/api/</link>
  +
</links>
  +
<show>protected</show>
  +
<splitindex>true</splitindex>
  +
</configuration>
  +
</plugin>
  +
<plugin>
  +
<!-- For more, refer http://gleclaire.github.io/findbugs-maven-plugin/ -->
  +
<groupId>org.codehaus.mojo</groupId>
  +
<artifactId>findbugs-maven-plugin</artifactId>
  +
<version>${findbugs-maven-plugin.version}</version>
  +
<configuration>
  +
<effort>Max</effort>
  +
<threshold>Low</threshold>
  +
<!-- findbugs-maven-plugin doesn't provide aggregate goal or mode -->
  +
<includeFilterFile>src/config/findbugs/findbugs-exclude.xml</includeFilterFile>
  +
<plugins>
  +
<plugin>
  +
<groupId>com.mebigfatguy.fb-contrib</groupId>
  +
<artifactId>fb-contrib</artifactId>
  +
<version>6.8.3</version>
  +
</plugin>
  +
</plugins>
  +
</configuration>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-checkstyle-plugin</artifactId>
  +
<version>${maven-checkstyle-plugin.version}</version>
  +
</plugin>
  +
<!-- tools supporting -->
  +
<plugin>
  +
<!-- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html -->
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-eclipse-plugin</artifactId>
  +
<version>${maven-eclipse-plugin.version}</version>
  +
<configuration>
  +
<!-- the next two item doesn't work on m2e. m2e has its own confgiruation in Eclipse preferences -->
  +
<downloadJavadocs>true</downloadJavadocs>
  +
<downloadSources>true</downloadSources>
  +
<forceRecheck>false</forceRecheck>
  +
</configuration>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.eclipse.m2e</groupId>
  +
<artifactId>lifecycle-mapping</artifactId>
  +
<version>1.0.0</version>
  +
<configuration>
  +
<lifecycleMappingMetadata>
  +
<pluginExecutions>
  +
<pluginExecution>
  +
<pluginExecutionFilter>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-dependency-plugin</artifactId>
  +
<versionRange>[1.0.0,)</versionRange>
  +
<goals>
  +
<goal>copy-dependencies</goal>
  +
</goals>
  +
</pluginExecutionFilter>
  +
<action>
  +
<ignore />
  +
</action>
  +
</pluginExecution>
  +
<pluginExecution>
  +
<pluginExecutionFilter>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-antrun-plugin</artifactId>
  +
<versionRange>[1.0.0,)</versionRange>
  +
<goals>
  +
<goal>run</goal>
  +
</goals>
  +
</pluginExecutionFilter>
  +
<action>
  +
<ignore />
  +
</action>
  +
</pluginExecution>
  +
<pluginExecution>
  +
<pluginExecutionFilter>
  +
<groupId>org.codehaus.mojo</groupId>
  +
<artifactId>aspectj-maven-plugin</artifactId>
  +
<versionRange>[1.0.0,)</versionRange>
  +
<goals>
  +
<goal>compile</goal>
  +
<goal>test-compile</goal>
  +
</goals>
  +
</pluginExecutionFilter>
  +
<action>
  +
<ignore />
  +
</action>
  +
</pluginExecution>
  +
<pluginExecution>
  +
<pluginExecutionFilter>
  +
<groupId>org.codehaus.mojo</groupId>
  +
<artifactId>build-helper-maven-plugin</artifactId>
  +
<versionRange>[1.0.0,)</versionRange>
  +
<goals>
  +
<goal>parse-version</goal>
  +
</goals>
  +
</pluginExecutionFilter>
  +
<action>
  +
<ignore />
  +
</action>
  +
</pluginExecution>
  +
<pluginExecution>
  +
<pluginExecutionFilter>
  +
<groupId>net.alchim31.maven</groupId>
  +
<artifactId>scala-maven-plugin</artifactId>
  +
<versionRange>[1.0.0,)</versionRange>
  +
<goals>
  +
<goal>add-source</goal>
  +
<goal>compile</goal>
  +
<goal>testCompile</goal>
  +
</goals>
  +
</pluginExecutionFilter>
  +
<action>
  +
<ignore />
  +
</action>
  +
</pluginExecution>
  +
<pluginExecution>
  +
<pluginExecutionFilter>
  +
<groupId>io.swagger.core.v3</groupId>
  +
<artifactId>swagger-maven-plugin</artifactId>
  +
<versionRange>[1.0.0,)</versionRange>
  +
<goals>
  +
<goal>resolve</goal>
  +
</goals>
  +
</pluginExecutionFilter>
  +
<action>
  +
<ignore>
  +
<message>swagger-maven-plugin (goal "resolve") is ignored by m2e.</message>
  +
</ignore>
  +
</action>
  +
</pluginExecution>
  +
<pluginExecution>
  +
<pluginExecutionFilter>
  +
<groupId>io.swagger.codegen.v3</groupId>
  +
<artifactId>swagger-codegen-maven-plugin</artifactId>
  +
<versionRange>[1.0.0,)</versionRange>
  +
<goals>
  +
<goal>generate</goal>
  +
</goals>
  +
</pluginExecutionFilter>
  +
<action>
  +
<ignore>
  +
<message>swagger-codegen-maven-plugin (goal "generate") is ignored by m2e.</message>
  +
</ignore>
  +
</action>
  +
</pluginExecution>
  +
<pluginExecution>
  +
<pluginExecutionFilter>
  +
<groupId>com.github.kongchen</groupId>
  +
<artifactId>swagger-maven-plugin</artifactId>
  +
<versionRange>[1.0.0,)</versionRange>
  +
<goals>
  +
<goal>generate</goal>
  +
</goals>
  +
</pluginExecutionFilter>
  +
<action>
  +
<ignore>
  +
<message>wagger-maven-plugin (goal "generate") is ignored by m2e.</message>
  +
</ignore>
  +
</action>
  +
</pluginExecution>
  +
</pluginExecutions>
  +
</lifecycleMappingMetadata>
  +
</configuration>
  +
</plugin>
  +
</plugins>
  +
</pluginManagement>
  +
</build>
  +
  +
<dependencies>
  +
<dependency>
  +
<!-- JSR 305: Annotations for Software Defect Detection (https://jcp.org/en/jsr/detail?id=305) -->
  +
<groupId>com.google.code.findbugs</groupId>
  +
<artifactId>jsr305</artifactId>
  +
<version>${jsr305.version}</version>
  +
</dependency>
  +
<dependency>
  +
<!-- JSR 330: Dependency Injection for Java -->
  +
<groupId>javax.inject</groupId>
  +
<artifactId>javax.inject</artifactId>
  +
<version>1</version>
  +
</dependency>
  +
<dependency>
  +
<!-- JSR 349: Bean Validation 1.1 (https://jcp.org/en/jsr/detail?id=349) -->
  +
<groupId>javax.validation</groupId>
  +
<artifactId>validation-api</artifactId>
  +
<version>${validation-api.version}</version>
  +
</dependency>
  +
<dependency>
  +
<!-- Hibernate Validator -->
  +
<groupId>org.hibernate.validator</groupId>
  +
<artifactId>hibernate-validator</artifactId>
  +
<version>${hibernate-validator.version}</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.slf4j</groupId>
  +
<artifactId>slf4j-api</artifactId>
  +
<version>${slf4j.version}</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.slf4j</groupId>
  +
<artifactId>jcl-over-slf4j</artifactId>
  +
<version>${slf4j.version}</version>
  +
<scope>runtime</scope>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.slf4j</groupId>
  +
<artifactId>jul-to-slf4j</artifactId>
  +
<version>${slf4j.version}</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>ch.qos.logback</groupId>
  +
<artifactId>logback-classic</artifactId>
  +
<version>${logback.version}</version>
  +
</dependency>
  +
<dependency>
  +
<!-- to support conditional processing of Logback config. : https://logback.qos.ch/setup.html#janino -->
  +
<groupId>org.codehaus.janino</groupId>
  +
<artifactId>janino</artifactId>
  +
<version>${janino.version}</version>
  +
</dependency>
  +
<dependency>
  +
<!-- https://junit.org/junit5/docs/current/user-guide/#running-tests-build-maven -->
  +
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine/5.5.1 -->
  +
<!-- 'junit-jupiter-engine' depends on 'junit-jupiter-api' -->
  +
<groupId>org.junit.jupiter</groupId>
  +
<artifactId>junit-jupiter-engine</artifactId>
  +
<version>${junit5.version}</version>
  +
<scope>test</scope>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.testng</groupId>
  +
<artifactId>testng</artifactId>
  +
<version>${testng.version}</version>
  +
<scope>test</scope>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.mockito</groupId>
  +
<artifactId>mockito-core</artifactId>
  +
<version>${mockito.version}</version>
  +
<scope>test</scope>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.apache.commons</groupId>
  +
<artifactId>commons-lang3</artifactId>
  +
<version>${commons-lang3.version}</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.apache.commons</groupId>
  +
<artifactId>commons-collections4</artifactId>
  +
<version>${commons-collections4.version}</version>
  +
</dependency>
  +
<dependency>
  +
<!-- For more typesafe config, refer https://github.com/typesafehub/config -->
  +
<groupId>com.typesafe</groupId>
  +
<artifactId>config</artifactId>
  +
<version>${typesafe-config.version}</version>
  +
</dependency>
  +
<!-- Either web or webflux -->
  +
<dependency>
  +
<groupId>org.springframework.boot</groupId>
  +
<artifactId>spring-boot-starter-web</artifactId>
  +
</dependency>
  +
<!-- <dependency> -->
  +
<!-- <groupId>org.springframework.boot</groupId> -->
  +
<!-- <artifactId>spring-boot-starter-webflux</artifactId> -->
  +
<!-- </dependency> -->
  +
<dependency>
  +
<groupId>org.springframework.boot</groupId>
  +
<artifactId>spring-boot-starter-actuator</artifactId>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.springframework.boot</groupId>
  +
<artifactId>spring-boot-starter-security</artifactId>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.springframework.boot</groupId>
  +
<artifactId>spring-boot-devtools</artifactId>
  +
<scope>runtime</scope>
  +
</dependency>
  +
<dependency>
  +
<!-- https://docs.spring.io/spring-boot/docs/2.1.x/reference/htmlsingle/#boot-features-testing -->
  +
<groupId>org.springframework.boot</groupId>
  +
<artifactId>spring-boot-starter-test</artifactId>
  +
<scope>test</scope>
  +
<exclusions>
  +
<exclusion>
  +
<groupId>junit</groupId>
  +
<artifactId>junit</artifactId>
  +
</exclusion>
  +
</exclusions>
  +
</dependency>
  +
<dependency>
  +
<groupId>io.swagger.core.v3</groupId>
  +
<artifactId>swagger-core</artifactId>
  +
<version>${swagger.version}</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>javax.ws.rs</groupId>
  +
<artifactId>javax.ws.rs-api</artifactId>
  +
<version>2.1</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>io.swagger</groupId>
  +
<artifactId>swagger-hibernate-validations</artifactId>
  +
<version>1.5.22</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>io.springfox</groupId>
  +
<artifactId>springfox-swagger2</artifactId>
  +
<version>${springfox-swagger2.version}</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>io.springfox</groupId>
  +
<artifactId>springfox-swagger-ui</artifactId>
  +
<version>${springfox-swagger2.version}</version>
  +
</dependency>
  +
<dependency>
  +
<!-- Springfox Support for JSR-303 : https://springfox.github.io/springfox/docs/2.9.2/#springfox-support-for-jsr-303 -->
  +
<groupId>io.springfox</groupId>
  +
<artifactId>springfox-bean-validators</artifactId>
  +
<version>${springfox-swagger2.version}</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.web3j</groupId>
  +
<artifactId>core</artifactId>
  +
<version>${web3j.version}</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.web3j</groupId>
  +
<artifactId>codegen</artifactId>
  +
<version>${web3j.version}</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.web3j</groupId>
  +
<artifactId>pantheon</artifactId>
  +
<version>4.5.1</version>
 
</dependency>
 
</dependency>
 
</dependencies>
 
</dependencies>

Revision as of 00:50, March 31, 2020

Overview

Maven Repositories

Maven Plug-ins

Utilities

Source configuration management tools support

Code analysis tools support

  • PMD Plugin
    • http://maven.apache.org/plugins/maven-pmd-plugin/
    • allows you to automatically run the PMD code analysis tool on your project's source code and generate a site report with its results.
    • also supports the separate Copy/Paste Detector tool (or CPD) distributed with PMD.

Continuous integration tools support

Collaboration tools support

Packaging tools support

Programming languages support

Application frameworks support

Application servers support

Eclipse support

misc

Maven Skins

Readings

Sonatype books

Multi module project

Testing

Reporting

Maven assemblies

Maven snapshot repositories

Deployment process and security

Site process

Release process

Property and Interpolation

  • Built-in properties
project.groupId
project.artifactId
project.version
project.name
project.description
project.baseUri
project.build.sourceDirectory     // src/main/java
project.build.scriptSourceDirectory   // src/main/script
project.build.testSourceDirectory     // src/test/java
project.build.outputDirectory         // target/classes
project.build.testOutputDirectory     // target/test-classes
project.build.directory               // target
project.reporting.outputDirectory
project.parent.basedir
currentYear
 
env.PATH
env.HOME
env.JAVA_HOME

m2e

misc

Tips and Tricks

Simple POM

  1. <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">
  2.   <modelVersion>4.0.0</modelVersion>
  3.   <groupId>thirdstage.exercise</groupId>
  4.   <artifactId>rest</artifactId>
  5.   <version>0.0.1-SNAPSHOT</version>
  6.  
  7.   <prerequisites>
  8.     <maven>3.0</maven>
  9.   </prerequisites>
  10.  
  11.   <properties>
  12.     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  13.     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  14.     <!-- control build behavior -->
  15.     <skipTests>false</skipTests>
  16.     <maven.deploy.skip>true</maven.deploy.skip>
  17.     <maven.site.skip>false</maven.site.skip> <!-- consumed by maven-site-plugin -->
  18.     <maven.site.deploy.skip>true</maven.site.deploy.skip> <!-- consumed by maven-site-plugin -->
  19.     <generateProjectInfo>false</generateProjectInfo> <!-- consumed by maven-site-plugin -->
  20.     <generateReports>true</generateReports> <!-- consumed by maven-site-plugin -->
  21.     <maven.javadoc.skip>false</maven.javadoc.skip>
  22.     <findbugs.skip>true</findbugs.skip>
  23.     <checkstyle.skip>true</checkstyle.skip>
  24.     <dependencies.release.updatePolicy>never</dependencies.release.updatePolicy>
  25.     <!-- versions for Java SDK and dependencies -->
  26.     <java.version>1.9</java.version>
  27.     <jsr305.version>3.0.2</jsr305.version> <!-- https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305 -->
  28.     <validation-api.version>2.0.1.Final</validation-api.version> <!-- https://mvnrepository.com/artifact/javax.validation/validation-api -->
  29.     <hibernate-validator.version>6.0.16.Final</hibernate-validator.version> <!-- https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator -->
  30.     <slf4j.version>1.7.21</slf4j.version>
  31.     <logback.version>1.1.7</logback.version>
  32.     <junit.version>4.12</junit.version>
  33.     <junit5.version>5.5.1</junit5.version> <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
  34.     <testng.version>6.14.3</testng.version> <!-- https://mvnrepository.com/artifact/org.testng/testng -->
  35.     <mockito.version>2.6.9</mockito.version>
  36.     <commons.lang3.version>3.5</commons.lang3.version>
  37.     <typesafe-config.version>1.3.1</typesafe-config.version>
  38.     <jackson.version>2.7.4</jackson.version>
  39.     <swagger.version>1.5.12</swagger.version>
  40.     <spring.version>4.3.5.RELEASE</spring.version>
  41.     <mybatis.version>3.5.1</mybatis.version> <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
  42.     <!-- version for Maven plugins -->
  43.     <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
  44.     <maven-site-plugin.version>3.7.1</maven-site-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-site-plugin -->
  45.     <swagger-maven-plugin.version>3.1.4</swagger-maven-plugin.version>
  46.     <swagger-codegen-maven-plugin.version>2.2.1</swagger-codegen-maven-plugin.version>
  47.     <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
  48.     <maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
  49.     <findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
  50.     <maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
  51.     <duplicate-finder-maven-plugin.version>1.2.1</duplicate-finder-maven-plugin.version>
  52.     <maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
  53.   </properties>
  54.  
  55.   <repositories>
  56.     <!-- For more repositories, refer https://mvnrepository.com/repos -->
  57.     <repository>
  58.       <id>central1</id>
  59.       <url>http://repo1.maven.org/maven2/</url>
  60.       <releases>
  61.         <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  62.       </releases>
  63.       <snapshots>
  64.         <enabled>false</enabled>
  65.       </snapshots>
  66.     </repository>
  67.     <repository>
  68.       <id>central2</id>
  69.       <url>http://repo2.maven.org/maven2/</url>
  70.       <releases>
  71.         <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  72.       </releases>
  73.       <snapshots>
  74.         <enabled>false</enabled>
  75.       </snapshots>
  76.     </repository>
  77.     <repository>
  78.       <id>java.net.public</id>
  79.       <url>https://maven.java.net/content/groups/public/</url>
  80.       <releases>
  81.         <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  82.       </releases>
  83.       <snapshots>
  84.         <enabled>true</enabled>
  85.       </snapshots>
  86.     </repository>
  87.   </repositories>
  88.  
  89.   <pluginRepositories>
  90.     <pluginRepository>
  91.       <id>central1</id>
  92.       <url>http://repo1.maven.org/maven2/</url>
  93.       <releases>
  94.         <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  95.       </releases>
  96.       <snapshots>
  97.         <enabled>false</enabled>
  98.       </snapshots>
  99.     </pluginRepository>
  100.     <pluginRepository>
  101.       <id>central2</id>
  102.       <url>http://repo2.maven.org/maven2/</url>
  103.       <releases>
  104.         <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  105.       </releases>
  106.       <snapshots>
  107.         <enabled>false</enabled>
  108.       </snapshots>
  109.     </pluginRepository>
  110.     <!-- codehaus.org has been effectively shut down as an artifact repository. -->
  111.     <!-- <pluginRepository> -->
  112.     <!-- <id>mojo-release</id> -->
  113.     <!-- <url>http://repository.codehaus.org/</url> -->
  114.     <!-- <releases> -->
  115.     <!-- <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy> -->
  116.     <!-- </releases> -->
  117.     <!-- <snapshots> -->
  118.     <!-- <enabled>false</enabled> -->
  119.     <!-- </snapshots> -->
  120.     <!-- </pluginRepository> -->
  121.     <!-- <pluginRepository> -->
  122.     <!-- <id>mojo-snapshot</id> -->
  123.     <!-- <url>http://snapshots.repository.codehaus.org/</url> -->
  124.     <!-- <releases> -->
  125.     <!-- <enabled>false</enabled> -->
  126.     <!-- </releases> -->
  127.     <!-- <snapshots> -->
  128.     <!-- <enabled>true</enabled> -->
  129.     <!-- </snapshots> -->
  130.     <!-- </pluginRepository> -->
  131.   </pluginRepositories>
  132.  
  133.   <reporting>
  134.     <plugins>
  135.       <plugin>
  136.         <groupId>org.apache.maven.plugins</groupId>
  137.         <artifactId>maven-project-info-reports-plugin</artifactId>
  138.         <reportSets>
  139.           <reportSet>
  140.             <reports>
  141.               <report>index</report>
  142. <!--               <report>dependencies</report> -->
  143. <!--               <report>project-team</report> -->
  144. <!--               <report>mailing-list</report> -->
  145. <!--               <report>cim</report> -->
  146. <!--               <report>issue-tracking</report> -->
  147. <!--               <report>license</report> -->
  148. <!--               <report>scm</report> -->
  149.             </reports>
  150.           </reportSet>
  151.         </reportSets>
  152.       </plugin>
  153.       <plugin>
  154.         <groupId>org.apache.maven.plugins</groupId>
  155.         <artifactId>maven-jxr-plugin</artifactId>
  156.         <reportSets>
  157.           <reportSet>
  158.             <id>aggregate</id>
  159.             <reports>
  160.               <report>aggregate</report>
  161.               <report>test-aggregate</report>
  162.             </reports>
  163.           </reportSet>
  164.         </reportSets>
  165.       </plugin>
  166.       <plugin>
  167.         <groupId>org.apache.maven.plugins</groupId>
  168.         <artifactId>maven-javadoc-plugin</artifactId>
  169.         <reportSets>
  170.           <reportSet>
  171.             <id>aggregate</id>
  172.             <reports>
  173.               <report>aggregate</report>
  174.             </reports>
  175.           </reportSet>
  176.         </reportSets>
  177.       </plugin>
  178.       <plugin>
  179.         <groupId>org.apache.maven.plugins</groupId>
  180.         <artifactId>maven-pmd-plugin</artifactId>
  181.         <configuration>
  182.           <!-- For more, refer https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html -->
  183.           <aggregate>true</aggregate>
  184.           <linkXRef>true</linkXRef>
  185.           <includeXmlInSite>true</includeXmlInSite>
  186.           <skipEmptyReport>true</skipEmptyReport>
  187.           <skipPmdError>true</skipPmdError>
  188.         </configuration>
  189.       </plugin>
  190.       <plugin>
  191.         <groupId>org.codehaus.mojo</groupId>
  192.         <artifactId>findbugs-maven-plugin</artifactId>
  193.       </plugin>
  194.     </plugins>
  195.   </reporting>
  196.  
  197.   <build>
  198.     <plugins>
  199.       <plugin>
  200.         <groupId>org.basepom.maven</groupId>
  201.         <artifactId>duplicate-finder-maven-plugin</artifactId>
  202.         <executions>
  203.           <execution>
  204.             <id>find-duplicate-classes</id>
  205.             <phase>prepare-package</phase>
  206.             <goals>
  207.               <goal>check</goal>
  208.             </goals>
  209.           </execution>
  210.         </executions>
  211.         <configuration>
  212.           <!-- For more, refer https://github.com/basepom/duplicate-finder-maven-plugin/wiki -->
  213.           <skip>false</skip>
  214.           <checkCompileClasspath>false</checkCompileClasspath>
  215.           <checkRuntimeClasspath>true</checkRuntimeClasspath>
  216.           <checkTestClasspath>false</checkTestClasspath>
  217.           <ignoredResourcePatterns>
  218.             <ignoredResourcePattern>about.html</ignoredResourcePattern>
  219.           </ignoredResourcePatterns>
  220.           <ignoredDependencies>
  221.             <dependency>
  222.               <groupId>org.slf4j</groupId>
  223.               <artifactId>jcl-over-slf4j</artifactId>
  224.             </dependency>
  225.           </ignoredDependencies>
  226.         </configuration>
  227.       </plugin>
  228.     </plugins>
  229.     <pluginManagement>
  230.       <plugins>
  231.         <!-- core -->
  232.         <plugin>
  233.           <groupId>org.apache.maven.plugins</groupId>
  234.           <artifactId>maven-compiler-plugin</artifactId>
  235.           <version>${maven-compiler-plugin.version}</version>
  236.           <inherited>true</inherited>
  237.           <configuration>
  238.             <source>${java.version}</source>
  239.             <target>${java.version}</target>
  240.           </configuration>
  241.         </plugin>
  242.         <plugin>
  243.           <groupId>org.apache.maven.plugins</groupId>
  244.           <artifactId>maven-site-plugin</artifactId>
  245.           <version>${maven-site-plugin.version}</version>
  246.           <dependencies>
  247.             <dependency>
  248.               <groupId>org.apache.maven.wagon</groupId>
  249.               <artifactId>wagon-ssh</artifactId>
  250.               <version>2.12</version>
  251.             </dependency>
  252.           </dependencies>
  253.         </plugin>
  254.         <!-- sources -->
  255.         <plugin>
  256.           <!-- For more, refer https://github.com/kongchen/swagger-maven-plugin -->
  257.           <groupId>com.github.kongchen</groupId>
  258.           <artifactId>swagger-maven-plugin</artifactId>
  259.           <version>${swagger-maven-plugin.version}</version>
  260.           <executions>
  261.             <execution>
  262.               <id>generate-swagger-api</id>
  263.               <phase>process-classes</phase>
  264.               <goals>
  265.                 <goal>generate</goal>
  266.               </goals>
  267.             </execution>
  268.           </executions>
  269.         </plugin>
  270.         <plugin>
  271.           <!-- For more, refer followings
  272.            https://github.com/swagger-api/swagger-codegen
  273.            https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin
  274.          -->
  275.           <groupId>io.swagger</groupId>
  276.           <artifactId>swagger-codegen-maven-plugin</artifactId>
  277.           <version>${swagger-codegen-maven-plugin.version}</version>
  278.           <executions>
  279.             <execution>
  280.               <id>generate-rest-api-doc</id>
  281.               <phase>process-classes</phase>
  282.               <goals>
  283.                 <goal>generate</goal>
  284.               </goals>
  285.               <configuration>
  286.                 <inputSpec>${project.build.directory}/swagger.json</inputSpec>
  287.                 <language>html2</language>
  288.                 <output>${project.build.directory}/generated-sources/swagger/html2</output>
  289.               </configuration>
  290.             </execution>
  291.           </executions>
  292.         </plugin>
  293.         <!-- packaging -->
  294.         <plugin>
  295.           <groupId>org.apache.maven.plugins</groupId>
  296.           <artifactId>maven-jar-plugin</artifactId>
  297.           <version>${maven-jar-plugin.version}</version>
  298.           <configuration>
  299.                   <!-- For more on Maven archiver, refer http://maven.apache.org/shared/maven-archiver/index.html -->
  300.             <archive>
  301.               <addMavenDescriptor>false</addMavenDescriptor>
  302.               <forced>true</forced>
  303.               <index>true</index>
  304.               <manifest>
  305.                 <addClasspath>false</addClasspath>
  306.                 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  307.                 <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
  308.                 <addExtensions>false</addExtensions>
  309.                 <classpathLayoutType>simple</classpathLayoutType>
  310.               </manifest>
  311.               <manifestEntries>
  312.                 <Source-Revision>${project.svn.revision}</Source-Revision>
  313.               </manifestEntries>
  314.             </archive>
  315.           </configuration>
  316.         </plugin>
  317.         <!-- reporting -->
  318.         <plugin>
  319.           <groupId>org.apache.maven.plugins</groupId>
  320.           <artifactId>maven-javadoc-plugin</artifactId>
  321.           <version>${maven-javadoc-plugin.version}</version>
  322.           <configuration>
  323.             <additionalJOptions>
  324.               <!-- causes error with JDK 8 <additionalJOption>-Xms128m</additionalJOption> -->
  325.             </additionalJOptions>
  326.             <failOnError>false</failOnError>
  327.             <docencoding>${project.reporting.outputEncoding}</docencoding>
  328.             <encoding>${project.build.sourceEncoding}</encoding>
  329.             <doctitle>${project.name} ${project.version} API</doctitle>
  330.             <windowtitle>${project.name} ${project.version} API</windowtitle>
  331.             <links>
  332.               <link>http://docs.oracle.com/javase/8/docs/api/</link>
  333.               <link>http://docs.oracle.com/javaee/6/api/</link>
  334.               <link>http://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1</link>
  335.               <link>http://docs.jboss.org/hibernate/beanvalidation/spec/1.1/api/</link>
  336.               <link>http://docs.jboss.org/hibernate/validator/5.2/api/</link>
  337.               <link>https://www.slf4j.org/apidocs/</link>
  338.               <link>http://junit.org/junit4/javadoc/${junit.version}/</link>
  339.               <link>http://commons.apache.org/proper/commons-lang/javadocs/api-${commons.lang3.version}/</link>
  340.               <link>http://commons.apache.org/proper/commons-collections/javadocs/api-release/</link>
  341.               <link>http://docs.swagger.io/swagger-core/v1.5.0/apidocs/</link>
  342.               <link>http://docs.spring.io/spring/docs/4.3.x/javadoc-api/</link>
  343.               <link>http://docs.spring.io/spring-boot/docs/1.5.x/api/</link>
  344.             </links>
  345.             <show>protected</show>
  346.             <splitindex>true</splitindex>
  347.           </configuration>
  348.         </plugin>
  349.         <plugin>
  350.           <!-- For more, refer http://gleclaire.github.io/findbugs-maven-plugin/ -->
  351.           <groupId>org.codehaus.mojo</groupId>
  352.           <artifactId>findbugs-maven-plugin</artifactId>
  353.           <version>${findbugs-maven-plugin.version}</version>
  354.           <configuration>
  355.             <effort>Max</effort>
  356.             <threshold>Low</threshold>
  357.             <!-- findbugs-maven-plugin doesn't provide aggregate goal or mode -->
  358.             <includeFilterFile>src/config/findbugs/findbugs-exclude.xml</includeFilterFile>
  359.             <plugins>
  360.               <plugin>
  361.                 <groupId>com.mebigfatguy.fb-contrib</groupId>
  362.                 <artifactId>fb-contrib</artifactId>
  363.                 <version>6.8.3</version>
  364.               </plugin>
  365.             </plugins>
  366.           </configuration>
  367.         </plugin>
  368.         <plugin>
  369.           <groupId>org.apache.maven.plugins</groupId>
  370.           <artifactId>maven-checkstyle-plugin</artifactId>
  371.           <version>${maven-checkstyle-plugin.version}</version>
  372.         </plugin>
  373.         <plugin>
  374.           <groupId>org.basepom.maven</groupId>
  375.           <artifactId>duplicate-finder-maven-plugin</artifactId>
  376.           <version>${duplicate-finder-maven-plugin.version}</version>
  377.         </plugin>
  378.         <!-- tools supporting -->
  379.         <plugin>
  380.           <!-- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html -->
  381.           <groupId>org.apache.maven.plugins</groupId>
  382.           <artifactId>maven-eclipse-plugin</artifactId>
  383.           <version>${maven-eclipse-plugin.version}</version>
  384.           <configuration>
  385.             <!-- the next two item doesn't work on m2e. m2e has its own confgiruation in Eclipse preferences -->
  386.             <downloadJavadocs>true</downloadJavadocs>
  387.             <downloadSources>true</downloadSources>
  388.             <forceRecheck>false</forceRecheck>
  389.           </configuration>
  390.         </plugin>
  391.         <plugin>
  392.           <groupId>org.eclipse.m2e</groupId>
  393.           <artifactId>lifecycle-mapping</artifactId>
  394.           <version>1.0.0</version>
  395.           <configuration>
  396.             <lifecycleMappingMetadata>
  397.               <pluginExecutions>
  398.                 <pluginExecution>
  399.                   <pluginExecutionFilter>
  400.                     <groupId>org.apache.maven.plugins</groupId>
  401.                     <artifactId>maven-dependency-plugin</artifactId>
  402.                     <versionRange>[1.0.0,)</versionRange>
  403.                     <goals>
  404.                       <goal>copy-dependencies</goal>
  405.                     </goals>
  406.                   </pluginExecutionFilter>
  407.                   <action>
  408.                     <ignore/>
  409.                   </action>
  410.                 </pluginExecution>
  411.                 <pluginExecution>
  412.                   <pluginExecutionFilter>
  413.                     <groupId>org.apache.maven.plugins</groupId>
  414.                     <artifactId>maven-antrun-plugin</artifactId>
  415.                     <versionRange>[1.0.0,)</versionRange>
  416.                     <goals>
  417.                       <goal>run</goal>
  418.                     </goals>
  419.                   </pluginExecutionFilter>
  420.                   <action>
  421.                     <ignore/>
  422.                   </action>
  423.                 </pluginExecution>
  424.                 <pluginExecution>
  425.                   <pluginExecutionFilter>
  426.                     <groupId>org.codehaus.mojo</groupId>
  427.                     <artifactId>aspectj-maven-plugin</artifactId>
  428.                     <versionRange>[1.0.0,)</versionRange>
  429.                     <goals>
  430.                       <goal>compile</goal>
  431.                       <goal>test-compile</goal>
  432.                     </goals>
  433.                   </pluginExecutionFilter>
  434.                   <action>
  435.                     <ignore/>
  436.                   </action>
  437.                 </pluginExecution>
  438.                 <pluginExecution>
  439.                   <pluginExecutionFilter>
  440.                     <groupId>org.codehaus.mojo</groupId>
  441.                     <artifactId>build-helper-maven-plugin</artifactId>
  442.                     <versionRange>[1.0.0,)</versionRange>
  443.                     <goals>
  444.                       <goal>parse-version</goal>
  445.                     </goals>
  446.                   </pluginExecutionFilter>
  447.                   <action>
  448.                     <ignore/>
  449.                   </action>
  450.                 </pluginExecution>
  451.                 <pluginExecution>
  452.                   <pluginExecutionFilter>
  453.                     <groupId>net.alchim31.maven</groupId>
  454.                     <artifactId>scala-maven-plugin</artifactId>
  455.                     <versionRange>[1.0.0,)</versionRange>
  456.                     <goals>
  457.                       <goal>add-source</goal>
  458.                       <goal>compile</goal>
  459.                       <goal>testCompile</goal>
  460.                     </goals>
  461.                   </pluginExecutionFilter>
  462.                   <action>
  463.                     <ignore/>
  464.                   </action>
  465.                 </pluginExecution>
  466.               </pluginExecutions>
  467.             </lifecycleMappingMetadata>
  468.           </configuration>
  469.         </plugin>
  470.       </plugins>
  471.     </pluginManagement>
  472.   </build>
  473.  
  474.   <dependencies>
  475.     <dependency>
  476.       <!-- JSR 305: Annotations for Software Defect Detection (https://jcp.org/en/jsr/detail?id=305) -->
  477.       <groupId>com.google.code.findbugs</groupId>
  478.       <artifactId>jsr305</artifactId>
  479.       <version>${jsr305.version}</version>
  480.     </dependency>
  481.     <dependency>
  482.       <!-- JSR 330: Dependency Injection for Java -->
  483.       <groupId>javax.inject</groupId>
  484.       <artifactId>javax.inject</artifactId>
  485.       <version>1</version>
  486.     </dependency>
  487.     <dependency>
  488.       <!-- JSR 349: Bean Validation 1.1 (https://jcp.org/en/jsr/detail?id=349) -->
  489.       <groupId>javax.validation</groupId>
  490.       <artifactId>validation-api</artifactId>
  491.       <version>${validation-api.version}</version>
  492.     </dependency>
  493.     <dependency>
  494.       <!-- Hibernate Validator -->
  495.       <groupId>org.hibernate</groupId>
  496.       <artifactId>hibernate-validator</artifactId>
  497.       <version>${hibernate-validator.version}</version>
  498.     </dependency>
  499.     <dependency>
  500.       <groupId>org.slf4j</groupId>
  501.       <artifactId>slf4j-api</artifactId>
  502.       <version>${slf4j.version}</version>
  503.     </dependency>
  504.     <dependency>
  505.       <groupId>org.slf4j</groupId>
  506.       <artifactId>jcl-over-slf4j</artifactId>
  507.       <version>${slf4j.version}</version>
  508.       <scope>runtime</scope>
  509.     </dependency>
  510.     <dependency>
  511.       <groupId>org.slf4j</groupId>
  512.       <artifactId>jul-to-slf4j</artifactId>
  513.       <version>${slf4j.version}</version>
  514.     </dependency>
  515.     <dependency>
  516.       <groupId>ch.qos.logback</groupId>
  517.       <artifactId>logback-classic</artifactId>
  518.       <version>${logback.version}</version>
  519.     </dependency>
  520.     <dependency>
  521.       <groupId>org.codehaus.janino</groupId>
  522.       <artifactId>janino</artifactId>
  523.       <version>2.7.8</version>
  524.     </dependency>
  525.     <dependency>
  526.       <groupId>junit</groupId>
  527.       <artifactId>junit</artifactId>
  528.       <version>${junit.version}</version>
  529.       <scope>test</scope>
  530.     </dependency>
  531.     <dependency>
  532.       <groupId>org.testng</groupId>
  533.       <artifactId>testng</artifactId>
  534.       <version>${testng.version}</version>
  535.       <scope>test</scope>
  536.     </dependency>
  537.     <dependency>
  538.       <groupId>org.mockito</groupId>
  539.       <artifactId>mockito-core</artifactId>
  540.       <version>${mockito.version}</version>
  541.       <scope>test</scope>
  542.     </dependency>
  543.     <dependency>
  544.       <groupId>org.apache.commons</groupId>
  545.       <artifactId>commons-lang3</artifactId>
  546.       <version>${commons.lang3.version}</version>
  547.     </dependency>
  548.     <!-- For more typesafe config, refer https://github.com/typesafehub/config -->
  549.     <dependency>
  550.       <groupId>com.typesafe</groupId>
  551.       <artifactId>config</artifactId>
  552.       <version>${typesafe-config.version}</version>
  553.     </dependency>
  554.   </dependencies>
  555. </project>

Typical POM for Spring Boot Project

  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2.  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3.  
  4.   <modelVersion>4.0.0</modelVersion>
  5.   <!-- POM for Spring Boot 2.1 : https://docs.spring.io/spring-boot/docs/2.1.x/reference/htmlsingle/#getting-started-maven-installation -->
  6.   <parent>
  7.     <groupId>org.springframework.boot</groupId>
  8.     <artifactId>spring-boot-starter-parent</artifactId>
  9.     <version>2.1.6.RELEASE</version>
  10.   </parent>
  11.   <groupId>mygroup</groupId>
  12.   <artifactId>mygroup.myproject</artifactId>
  13.   <version>0.0.1-SNAPSHOT</version>
  14.  
  15.   <name>myproject</name>
  16.   <description>...</description>
  17.  
  18.   <prerequisites>
  19.     <maven>3.0</maven>
  20.   </prerequisites>
  21.  
  22.   <properties>
  23.     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  24.     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  25.     <!-- control build behavior -->
  26.     <skipTests>false</skipTests>
  27.     <maven.deploy.skip>true</maven.deploy.skip>
  28.     <maven.site.skip>false</maven.site.skip> <!-- consumed by maven-site-plugin -->
  29.     <maven.site.deploy.skip>true</maven.site.deploy.skip> <!-- consumed by maven-site-plugin -->
  30.     <generateProjectInfo>false</generateProjectInfo> <!-- consumed by maven-site-plugin -->
  31.     <generateReports>true</generateReports> <!-- consumed by maven-site-plugin -->
  32.     <maven.javadoc.skip>false</maven.javadoc.skip>
  33.     <findbugs.skip>true</findbugs.skip>
  34.     <checkstyle.skip>true</checkstyle.skip>
  35.     <dependencies.release.updatePolicy>never</dependencies.release.updatePolicy>
  36.     <!-- versions for Java SDK and dependencies -->
  37.     <java.version>1.9</java.version>
  38.     <jsr305.version>3.0.2</jsr305.version> <!-- https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305 -->
  39.     <validation-api.version>2.0.1.Final</validation-api.version> <!-- https://mvnrepository.com/artifact/javax.validation/validation-api -->
  40.     <hibernate-validator.version>6.1.2.Final</hibernate-validator.version> <!-- https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator -->
  41.     <slf4j.version>1.7.30</slf4j.version> <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
  42.     <logback.version>1.2.3</logback.version> <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
  43.     <janino.version>3.1.0</janino.version> <!-- https://mvnrepository.com/artifact/org.codehaus.janino/janino -->
  44.     <junit.version>4.12</junit.version>
  45.     <junit5.version>5.6.1</junit5.version> <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine -->
  46.     <testng.version>6.9.10</testng.version>
  47.     <mockito.version>3.1.0</mockito.version> <!-- affect the dependency version of spring-starter-test module -->
  48.     <commons-lang3.version>3.9</commons-lang3.version> <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
  49.     <commons-validator.version>1.6</commons-validator.version> <!-- https://mvnrepository.com/artifact/commons-validator/commons-validator -->
  50.     <commons-collections4.version>4.4</commons-collections4.version> <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-collections4 -->
  51.     <typesafe-config.version>1.3.1</typesafe-config.version>
  52.     <swagger.version>2.0.8</swagger.version> <!-- https://mvnrepository.com/artifact/io.swagger.core.v3 -->
  53.     <springfox-swagger2.version>2.9.2</springfox-swagger2.version> <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 -->
  54.     <mybatis.version>3.5.1</mybatis.version> <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
  55.     <jjwt.version>0.10.7</jjwt.version> <!-- https://mvnrepository.com/artifact/io.jsonwebtoken -->
  56.     <web3j.version>4.5.17</web3j.version> <!-- https://mvnrepository.com/artifact/org.web3j -->
  57.     <!-- version for Maven plugins -->
  58.     <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
  59.     <maven-site-plugin.version>3.9.0</maven-site-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-site-plugin -->
  60.     <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
  61.     <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
  62.     <findbugs-maven-plugin.version>3.0.5</findbugs-maven-plugin.version> <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/findbugs-maven-plugin -->
  63.     <maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-checkstyle-plugin -->
  64.     <duplicate-finder-maven-plugin.version>1.4.0</duplicate-finder-maven-plugin.version> <!-- https://mvnrepository.com/artifact/org.basepom.maven/duplicate-finder-maven-plugin -->
  65.     <maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-eclipse-plugin -->
  66.     <swagger-maven-plugin.version>3.1.8</swagger-maven-plugin.version> <!-- https://github.com/kongchen/swagger-maven-plugin -->
  67.     <swagger-codegen-maven-plugin.version>3.0.0-rc1</swagger-codegen-maven-plugin.version> <!-- https://mvnrepository.com/artifact/io.swagger/swagger-codegen-maven-plugin -->
  68.     <swagger-codegen-maven-plugin.v3.version>3.0.10</swagger-codegen-maven-plugin.v3.version> <!-- https://mvnrepository.com/artifact/io.swagger.codegen.v3/swagger-codegen-maven-plugin -->
  69.     <web3j-maven-plugin.version>4.5.11</web3j-maven-plugin.version> <!-- https://mvnrepository.com/artifact/org.web3j/web3j-maven-plugin -->
  70.     <exec-maven-plugin>1.6.0</exec-maven-plugin>
  71.     <maven.compiler.source>${java.version}</maven.compiler.source>
  72.     <maven.compiler.target>${java.version}</maven.compiler.target>
  73.   </properties>
  74.  
  75.   <repositories>
  76.     <!-- For more repositories, refer https://mvnrepository.com/repos -->
  77.     <repository>
  78.       <id>central1</id>
  79.       <url>http://repo1.maven.org/maven2/</url>
  80.       <releases>
  81.         <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  82.       </releases>
  83.       <snapshots>
  84.         <enabled>false</enabled>
  85.       </snapshots>
  86.     </repository>
  87.     <repository>
  88.       <id>central2</id>
  89.       <url>http://repo2.maven.org/maven2/</url>
  90.       <releases>
  91.         <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  92.       </releases>
  93.       <snapshots>
  94.         <enabled>false</enabled>
  95.       </snapshots>
  96.     </repository>
  97.     <repository>
  98.       <id>java.net.public</id>
  99.       <url>https://maven.java.net/content/groups/public/</url>
  100.       <releases>
  101.         <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  102.       </releases>
  103.       <snapshots>
  104.         <enabled>true</enabled>
  105.       </snapshots>
  106.     </repository>
  107.     <repository>
  108.       <id>jcenter-snapshots</id>
  109.       <name>jcenter</name>
  110.       <url>https://jcenter.bintray.com/</url>
  111.     </repository>
  112.   </repositories>
  113.  
  114.   <pluginRepositories>
  115.     <pluginRepository>
  116.       <id>central1</id>
  117.       <url>http://repo1.maven.org/maven2/</url>
  118.       <releases>
  119.         <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  120.       </releases>
  121.       <snapshots>
  122.         <enabled>false</enabled>
  123.       </snapshots>
  124.     </pluginRepository>
  125.     <pluginRepository>
  126.       <id>central2</id>
  127.       <url>http://repo2.maven.org/maven2/</url>
  128.       <releases>
  129.         <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy>
  130.       </releases>
  131.       <snapshots>
  132.         <enabled>false</enabled>
  133.       </snapshots>
  134.     </pluginRepository>
  135.   </pluginRepositories>
  136.  
  137.   <reporting>
  138.     <plugins>
  139.       <plugin>
  140.         <groupId>org.apache.maven.plugins</groupId>
  141.         <artifactId>maven-project-info-reports-plugin</artifactId>
  142.         <reportSets>
  143.           <reportSet>
  144.             <reports>
  145.               <report>index</report>
  146.               <!-- <report>dependencies</report> -->
  147.               <!-- <report>project-team</report> -->
  148.               <!-- <report>mailing-list</report> -->
  149.               <!-- <report>cim</report> -->
  150.               <!-- <report>issue-tracking</report> -->
  151.               <!-- <report>license</report> -->
  152.               <!-- <report>scm</report> -->
  153.             </reports>
  154.           </reportSet>
  155.         </reportSets>
  156.       </plugin>
  157.       <plugin>
  158.         <groupId>org.apache.maven.plugins</groupId>
  159.         <artifactId>maven-jxr-plugin</artifactId>
  160.         <reportSets>
  161.           <reportSet>
  162.             <id>aggregate</id>
  163.             <reports>
  164.               <report>aggregate</report>
  165.               <report>test-aggregate</report>
  166.             </reports>
  167.           </reportSet>
  168.         </reportSets>
  169.       </plugin>
  170.       <plugin>
  171.         <groupId>org.apache.maven.plugins</groupId>
  172.         <artifactId>maven-javadoc-plugin</artifactId>
  173.         <reportSets>
  174.           <reportSet>
  175.             <id>aggregate</id>
  176.             <reports>
  177.               <report>aggregate</report>
  178.             </reports>
  179.           </reportSet>
  180.         </reportSets>
  181.       </plugin>
  182.       <plugin>
  183.         <groupId>org.apache.maven.plugins</groupId>
  184.         <artifactId>maven-pmd-plugin</artifactId>
  185.         <configuration>
  186.           <!-- For more, refer https://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html -->
  187.           <aggregate>true</aggregate>
  188.           <linkXRef>true</linkXRef>
  189.           <includeXmlInSite>true</includeXmlInSite>
  190.           <skipEmptyReport>true</skipEmptyReport>
  191.           <skipPmdError>true</skipPmdError>
  192.         </configuration>
  193.       </plugin>
  194.       <plugin>
  195.         <groupId>org.codehaus.mojo</groupId>
  196.         <artifactId>findbugs-maven-plugin</artifactId>
  197.       </plugin>
  198.     </plugins>
  199.   </reporting>
  200.  
  201.   <build>
  202.     <plugins>
  203.       <plugin>
  204.         <groupId>org.springframework.boot</groupId>
  205.         <artifactId>spring-boot-maven-plugin</artifactId>
  206.       </plugin>
  207.       <plugin>
  208.         <groupId>org.basepom.maven</groupId>
  209.         <artifactId>duplicate-finder-maven-plugin</artifactId>
  210.         <version>${duplicate-finder-maven-plugin.version}</version>
  211.         <executions>
  212.           <execution>
  213.             <id>find-duplicate-classes</id>
  214.             <phase>prepare-package</phase>
  215.             <goals>
  216.               <goal>check</goal>
  217.             </goals>
  218.           </execution>
  219.         </executions>
  220.         <configuration>
  221.           <!-- For more, refer https://github.com/basepom/duplicate-finder-maven-plugin/wiki -->
  222.           <skip>false</skip>
  223.           <checkCompileClasspath>false</checkCompileClasspath>
  224.           <checkRuntimeClasspath>true</checkRuntimeClasspath>
  225.           <checkTestClasspath>false</checkTestClasspath>
  226.           <ignoredResourcePatterns>
  227.             <ignoredResourcePattern>about\.html</ignoredResourcePattern>
  228.           </ignoredResourcePatterns>
  229.           <ignoredClassPatterns>
  230.             <ignoredClassPattern>META-INF\.versions\.9\.module-info</ignoredClassPattern>
  231.           </ignoredClassPatterns>
  232.           <ignoredDependencies>
  233.             <dependency>
  234.               <groupId>org.slf4j</groupId>
  235.               <artifactId>jcl-over-slf4j</artifactId>
  236.             </dependency>
  237.           </ignoredDependencies>
  238.         </configuration>
  239.       </plugin>
  240.       <plugin>
  241.         <groupId>com.github.kongchen</groupId>
  242.         <artifactId>swagger-maven-plugin</artifactId>
  243.         <version>${swagger-maven-plugin.version}</version>
  244.         <executions>
  245.           <execution>
  246.             <phase>compile</phase>
  247.             <goals>
  248.               <goal>generate</goal>
  249.             </goals>
  250.             <configuration>
  251.               <apiSources>
  252.                 <apiSource>
  253.                   <springmvc>true</springmvc>
  254.                   <locations>
  255.                     <location>myprogram.controllers</location>
  256.                   </locations>
  257.                   <schemes>
  258.                     <scheme>http</scheme>
  259.                   </schemes>
  260.                   <host>localhost:8080</host>
  261.                   <basePath>/myappl/v1</basePath>
  262.                   <info>
  263.                     <title>REST API of My Program</title>
  264.                     <version>v1</version>
  265.                     <description>
  266.                     ...
  267.                     </description>
  268.                   </info>
  269.                   <swaggerDirectory>${project.build.directory}/generated/swagger</swaggerDirectory>
  270.                   <swaggerFileName>api</swaggerFileName>
  271.                   <outputFormats>json,yaml</outputFormats>
  272.                   <!-- <templatePath>${basedir}/src/templates/swagger/strapdown.html.hbs</templatePath> -->
  273.                   <!-- <outputPath>${project.build.directory}/generated/swagger/api.html</outputPath> -->
  274.                   <!-- <attachSwaggerArtifact>true</attachSwaggerArtifact> -->
  275.                   <modelConverters>io.swagger.validator.BeanValidator</modelConverters>
  276.                 </apiSource>
  277.               </apiSources>
  278.             </configuration>
  279.           </execution>
  280.         </executions>
  281.       </plugin>
  282.       <plugin>
  283.         <!-- For more, refer followings
  284.            https://github.com/swagger-api/swagger-codegen/tree/3.0.0
  285.            https://github.com/swagger-api/swagger-codegen/tree/3.0.0/modules/swagger-codegen-maven-plugin
  286.        -->
  287.         <groupId>io.swagger.codegen.v3</groupId>
  288.         <artifactId>swagger-codegen-maven-plugin</artifactId>
  289.         <version>${swagger-codegen-maven-plugin.v3.version}</version>
  290.         <executions>
  291.           <execution>
  292.             <id>generate-rest-api-doc-v3</id>
  293.             <phase>process-classes</phase>
  294.             <goals>
  295.               <goal>generate</goal>
  296.             </goals>
  297.             <configuration>
  298.               <inputSpec>${project.build.directory}/generated/swagger/api.json</inputSpec>
  299.               <language>html2</language>
  300.               <output>${project.build.directory}/generated/swagger/html2</output>
  301.               <generateApis>true</generateApis>
  302.             </configuration>
  303.           </execution>
  304.         </executions>
  305.       </plugin>
  306.       <plugin>
  307.         <groupId>org.web3j</groupId>
  308.         <artifactId>web3j-maven-plugin</artifactId>
  309.         <version>${web3j-maven-plugin.version}</version>
  310.       </plugin>
  311.     </plugins>
  312.     <pluginManagement>
  313.       <plugins>
  314.         <!-- core -->
  315.         <plugin>
  316.           <groupId>org.apache.maven.plugins</groupId>
  317.           <artifactId>maven-compiler-plugin</artifactId>
  318.           <version>${maven-compiler-plugin.version}</version>
  319.           <inherited>true</inherited>
  320.           <configuration>
  321.             <source>${java.version}</source>
  322.             <target>${java.version}</target>
  323.           </configuration>
  324.         </plugin>
  325.         <plugin>
  326.           <groupId>org.apache.maven.plugins</groupId>
  327.           <artifactId>maven-site-plugin</artifactId>
  328.           <version>${maven-site-plugin.version}</version>
  329.           <dependencies>
  330.             <dependency>
  331.               <groupId>org.apache.maven.wagon</groupId>
  332.               <artifactId>wagon-ssh</artifactId>
  333.               <version>2.12</version>
  334.             </dependency>
  335.           </dependencies>
  336.         </plugin>
  337.         <!-- sources -->
  338.         <plugin>
  339.           <!-- For more, refer followings
  340.            https://github.com/swagger-api/swagger-codegen
  341.            https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin
  342.          -->
  343.           <groupId>io.swagger</groupId>
  344.           <artifactId>swagger-codegen-maven-plugin</artifactId>
  345.           <version>${swagger-codegen-maven-plugin.version}</version>
  346.         </plugin>
  347.         <!-- packaging -->
  348.         <plugin>
  349.           <groupId>org.apache.maven.plugins</groupId>
  350.           <artifactId>maven-jar-plugin</artifactId>
  351.           <version>${maven-jar-plugin.version}</version>
  352.           <configuration>
  353.             <!-- For more on Maven archiver, refer http://maven.apache.org/shared/maven-archiver/index.html -->
  354.             <archive>
  355.               <addMavenDescriptor>false</addMavenDescriptor>
  356.               <forced>true</forced>
  357.               <index>true</index>
  358.               <manifest>
  359.                 <addClasspath>false</addClasspath>
  360.                 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  361.                 <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
  362.                 <addExtensions>false</addExtensions>
  363.                 <classpathLayoutType>simple</classpathLayoutType>
  364.               </manifest>
  365.               <manifestEntries>
  366.                 <Source-Revision>${project.svn.revision}</Source-Revision>
  367.               </manifestEntries>
  368.             </archive>
  369.           </configuration>
  370.         </plugin>
  371.         <!-- reporting -->
  372.         <plugin>
  373.           <groupId>org.apache.maven.plugins</groupId>
  374.           <artifactId>maven-javadoc-plugin</artifactId>
  375.           <version>${maven-javadoc-plugin.version}</version>
  376.           <configuration>
  377.             <additionalJOptions>
  378.               <!-- causes error with JDK 8 <additionalJOption>-Xms128m</additionalJOption> -->
  379.             </additionalJOptions>
  380.             <failOnError>false</failOnError>
  381.             <docencoding>${project.reporting.outputEncoding}</docencoding>
  382.             <encoding>${project.build.sourceEncoding}</encoding>
  383.             <doctitle>${project.name} ${project.version} API</doctitle>
  384.             <windowtitle>${project.name} ${project.version} API</windowtitle>
  385.             <links>
  386.               <link>https://docs.oracle.com/javase/9/docs/api/</link>
  387.               <link>https://docs.oracle.com/javaee/7/api/</link>
  388.               <link>http://www.javadoc.io/doc/com.google.code.findbugs/jsr305/${jsr305.version}</link>
  389.               <link>http://docs.jboss.org/hibernate/beanvalidation/spec/2.0/api/</link>
  390.               <link>http://docs.jboss.org/hibernate/validator/6.0/api/</link>
  391.               <link>https://www.slf4j.org/apidocs/</link>
  392.               <link>http://junit.org/junit4/javadoc/${junit.version}/</link>
  393.               <link>http://commons.apache.org/proper/commons-lang/javadocs/api-${commons-lang3.version}/</link>
  394.               <link>http://commons.apache.org/proper/commons-collections/javadocs/api-release/</link>
  395.               <link>http://docs.swagger.io/swagger-core/v1.5.X/apidocs/</link>
  396.               <link>http://springfox.github.io/springfox/javadoc/${springfox-swagger2.version}/</link>
  397.               <link>https://docs.spring.io/spring/docs/5.1.x/javadoc-api/</link>
  398.               <link>https://docs.spring.io/spring-boot/docs/2.1.x/api/</link>
  399.             </links>
  400.             <show>protected</show>
  401.             <splitindex>true</splitindex>
  402.           </configuration>
  403.         </plugin>
  404.         <plugin>
  405.           <!-- For more, refer http://gleclaire.github.io/findbugs-maven-plugin/ -->
  406.           <groupId>org.codehaus.mojo</groupId>
  407.           <artifactId>findbugs-maven-plugin</artifactId>
  408.           <version>${findbugs-maven-plugin.version}</version>
  409.           <configuration>
  410.             <effort>Max</effort>
  411.             <threshold>Low</threshold>
  412.             <!-- findbugs-maven-plugin doesn't provide aggregate goal or mode -->
  413.             <includeFilterFile>src/config/findbugs/findbugs-exclude.xml</includeFilterFile>
  414.             <plugins>
  415.               <plugin>
  416.                 <groupId>com.mebigfatguy.fb-contrib</groupId>
  417.                 <artifactId>fb-contrib</artifactId>
  418.                 <version>6.8.3</version>
  419.               </plugin>
  420.             </plugins>
  421.           </configuration>
  422.         </plugin>
  423.         <plugin>
  424.           <groupId>org.apache.maven.plugins</groupId>
  425.           <artifactId>maven-checkstyle-plugin</artifactId>
  426.           <version>${maven-checkstyle-plugin.version}</version>
  427.         </plugin>
  428.         <!-- tools supporting -->
  429.         <plugin>
  430.           <!-- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html -->
  431.           <groupId>org.apache.maven.plugins</groupId>
  432.           <artifactId>maven-eclipse-plugin</artifactId>
  433.           <version>${maven-eclipse-plugin.version}</version>
  434.           <configuration>
  435.             <!-- the next two item doesn't work on m2e. m2e has its own confgiruation in Eclipse preferences -->
  436.             <downloadJavadocs>true</downloadJavadocs>
  437.             <downloadSources>true</downloadSources>
  438.             <forceRecheck>false</forceRecheck>
  439.           </configuration>
  440.         </plugin>
  441.         <plugin>
  442.           <groupId>org.eclipse.m2e</groupId>
  443.           <artifactId>lifecycle-mapping</artifactId>
  444.           <version>1.0.0</version>
  445.           <configuration>
  446.             <lifecycleMappingMetadata>
  447.               <pluginExecutions>
  448.                 <pluginExecution>
  449.                   <pluginExecutionFilter>
  450.                     <groupId>org.apache.maven.plugins</groupId>
  451.                     <artifactId>maven-dependency-plugin</artifactId>
  452.                     <versionRange>[1.0.0,)</versionRange>
  453.                     <goals>
  454.                       <goal>copy-dependencies</goal>
  455.                     </goals>
  456.                   </pluginExecutionFilter>
  457.                   <action>
  458.                     <ignore />
  459.                   </action>
  460.                 </pluginExecution>
  461.                 <pluginExecution>
  462.                   <pluginExecutionFilter>
  463.                     <groupId>org.apache.maven.plugins</groupId>
  464.                     <artifactId>maven-antrun-plugin</artifactId>
  465.                     <versionRange>[1.0.0,)</versionRange>
  466.                     <goals>
  467.                       <goal>run</goal>
  468.                     </goals>
  469.                   </pluginExecutionFilter>
  470.                   <action>
  471.                     <ignore />
  472.                   </action>
  473.                 </pluginExecution>
  474.                 <pluginExecution>
  475.                   <pluginExecutionFilter>
  476.                     <groupId>org.codehaus.mojo</groupId>
  477.                     <artifactId>aspectj-maven-plugin</artifactId>
  478.                     <versionRange>[1.0.0,)</versionRange>
  479.                     <goals>
  480.                       <goal>compile</goal>
  481.                       <goal>test-compile</goal>
  482.                     </goals>
  483.                   </pluginExecutionFilter>
  484.                   <action>
  485.                     <ignore />
  486.                   </action>
  487.                 </pluginExecution>
  488.                 <pluginExecution>
  489.                   <pluginExecutionFilter>
  490.                     <groupId>org.codehaus.mojo</groupId>
  491.                     <artifactId>build-helper-maven-plugin</artifactId>
  492.                     <versionRange>[1.0.0,)</versionRange>
  493.                     <goals>
  494.                       <goal>parse-version</goal>
  495.                     </goals>
  496.                   </pluginExecutionFilter>
  497.                   <action>
  498.                     <ignore />
  499.                   </action>
  500.                 </pluginExecution>
  501.                 <pluginExecution>
  502.                   <pluginExecutionFilter>
  503.                     <groupId>net.alchim31.maven</groupId>
  504.                     <artifactId>scala-maven-plugin</artifactId>
  505.                     <versionRange>[1.0.0,)</versionRange>
  506.                     <goals>
  507.                       <goal>add-source</goal>
  508.                       <goal>compile</goal>
  509.                       <goal>testCompile</goal>
  510.                     </goals>
  511.                   </pluginExecutionFilter>
  512.                   <action>
  513.                     <ignore />
  514.                   </action>
  515.                 </pluginExecution>
  516.                 <pluginExecution>
  517.                   <pluginExecutionFilter>
  518.                     <groupId>io.swagger.core.v3</groupId>
  519.                     <artifactId>swagger-maven-plugin</artifactId>
  520.                     <versionRange>[1.0.0,)</versionRange>
  521.                     <goals>
  522.                       <goal>resolve</goal>
  523.                     </goals>
  524.                   </pluginExecutionFilter>
  525.                   <action>
  526.                     <ignore>
  527.                       <message>swagger-maven-plugin (goal "resolve") is ignored by m2e.</message>
  528.                     </ignore>
  529.                   </action>
  530.                 </pluginExecution>
  531.                 <pluginExecution>
  532.                   <pluginExecutionFilter>
  533.                     <groupId>io.swagger.codegen.v3</groupId>
  534.                     <artifactId>swagger-codegen-maven-plugin</artifactId>
  535.                     <versionRange>[1.0.0,)</versionRange>
  536.                     <goals>
  537.                       <goal>generate</goal>
  538.                     </goals>
  539.                   </pluginExecutionFilter>
  540.                   <action>
  541.                     <ignore>
  542.                       <message>swagger-codegen-maven-plugin (goal "generate") is ignored by m2e.</message>
  543.                     </ignore>
  544.                   </action>
  545.                 </pluginExecution>
  546.                 <pluginExecution>
  547.                   <pluginExecutionFilter>
  548.                     <groupId>com.github.kongchen</groupId>
  549.                     <artifactId>swagger-maven-plugin</artifactId>
  550.                     <versionRange>[1.0.0,)</versionRange>
  551.                     <goals>
  552.                       <goal>generate</goal>
  553.                     </goals>
  554.                   </pluginExecutionFilter>
  555.                   <action>
  556.                     <ignore>
  557.                       <message>wagger-maven-plugin (goal "generate") is ignored by m2e.</message>
  558.                     </ignore>
  559.                   </action>
  560.                 </pluginExecution>
  561.               </pluginExecutions>
  562.             </lifecycleMappingMetadata>
  563.           </configuration>
  564.         </plugin>
  565.       </plugins>
  566.     </pluginManagement>
  567.   </build>
  568.  
  569.   <dependencies>
  570.     <dependency>
  571.       <!-- JSR 305: Annotations for Software Defect Detection (https://jcp.org/en/jsr/detail?id=305) -->
  572.       <groupId>com.google.code.findbugs</groupId>
  573.       <artifactId>jsr305</artifactId>
  574.       <version>${jsr305.version}</version>
  575.     </dependency>
  576.     <dependency>
  577.       <!-- JSR 330: Dependency Injection for Java -->
  578.       <groupId>javax.inject</groupId>
  579.       <artifactId>javax.inject</artifactId>
  580.       <version>1</version>
  581.     </dependency>
  582.     <dependency>
  583.       <!-- JSR 349: Bean Validation 1.1 (https://jcp.org/en/jsr/detail?id=349) -->
  584.       <groupId>javax.validation</groupId>
  585.       <artifactId>validation-api</artifactId>
  586.       <version>${validation-api.version}</version>
  587.     </dependency>
  588.     <dependency>
  589.       <!-- Hibernate Validator -->
  590.       <groupId>org.hibernate.validator</groupId>
  591.       <artifactId>hibernate-validator</artifactId>
  592.       <version>${hibernate-validator.version}</version>
  593.     </dependency>
  594.     <dependency>
  595.       <groupId>org.slf4j</groupId>
  596.       <artifactId>slf4j-api</artifactId>
  597.       <version>${slf4j.version}</version>
  598.     </dependency>
  599.     <dependency>
  600.       <groupId>org.slf4j</groupId>
  601.       <artifactId>jcl-over-slf4j</artifactId>
  602.       <version>${slf4j.version}</version>
  603.       <scope>runtime</scope>
  604.     </dependency>
  605.     <dependency>
  606.       <groupId>org.slf4j</groupId>
  607.       <artifactId>jul-to-slf4j</artifactId>
  608.       <version>${slf4j.version}</version>
  609.     </dependency>
  610.     <dependency>
  611.       <groupId>ch.qos.logback</groupId>
  612.       <artifactId>logback-classic</artifactId>
  613.       <version>${logback.version}</version>
  614.     </dependency>
  615.     <dependency>
  616.       <!-- to support conditional processing of Logback config. : https://logback.qos.ch/setup.html#janino -->
  617.       <groupId>org.codehaus.janino</groupId>
  618.       <artifactId>janino</artifactId>
  619.       <version>${janino.version}</version>
  620.     </dependency>
  621.     <dependency>
  622.       <!-- https://junit.org/junit5/docs/current/user-guide/#running-tests-build-maven -->
  623.       <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine/5.5.1 -->
  624.       <!-- 'junit-jupiter-engine' depends on 'junit-jupiter-api' -->
  625.       <groupId>org.junit.jupiter</groupId>
  626.       <artifactId>junit-jupiter-engine</artifactId>
  627.       <version>${junit5.version}</version>
  628.       <scope>test</scope>
  629.     </dependency>
  630.     <dependency>
  631.       <groupId>org.testng</groupId>
  632.       <artifactId>testng</artifactId>
  633.       <version>${testng.version}</version>
  634.       <scope>test</scope>
  635.     </dependency>
  636.     <dependency>
  637.       <groupId>org.mockito</groupId>
  638.       <artifactId>mockito-core</artifactId>
  639.       <version>${mockito.version}</version>
  640.       <scope>test</scope>
  641.     </dependency>
  642.     <dependency>
  643.       <groupId>org.apache.commons</groupId>
  644.       <artifactId>commons-lang3</artifactId>
  645.       <version>${commons-lang3.version}</version>
  646.     </dependency>
  647.     <dependency>
  648.       <groupId>org.apache.commons</groupId>
  649.       <artifactId>commons-collections4</artifactId>
  650.       <version>${commons-collections4.version}</version>
  651.     </dependency>
  652.     <dependency>
  653.       <!-- For more typesafe config, refer https://github.com/typesafehub/config -->
  654.       <groupId>com.typesafe</groupId>
  655.       <artifactId>config</artifactId>
  656.       <version>${typesafe-config.version}</version>
  657.     </dependency>
  658.     <!-- Either web or webflux -->
  659.     <dependency>
  660.       <groupId>org.springframework.boot</groupId>
  661.       <artifactId>spring-boot-starter-web</artifactId>
  662.     </dependency>
  663. <!--     <dependency> -->
  664. <!--       <groupId>org.springframework.boot</groupId> -->
  665. <!--       <artifactId>spring-boot-starter-webflux</artifactId> -->
  666. <!--     </dependency> -->
  667.     <dependency>
  668.       <groupId>org.springframework.boot</groupId>
  669.       <artifactId>spring-boot-starter-actuator</artifactId>
  670.     </dependency>
  671.     <dependency>
  672.       <groupId>org.springframework.boot</groupId>
  673.       <artifactId>spring-boot-starter-security</artifactId>
  674.     </dependency>
  675.     <dependency>
  676.       <groupId>org.springframework.boot</groupId>
  677.       <artifactId>spring-boot-devtools</artifactId>
  678.       <scope>runtime</scope>
  679.     </dependency>
  680.     <dependency>
  681.       <!-- https://docs.spring.io/spring-boot/docs/2.1.x/reference/htmlsingle/#boot-features-testing -->
  682.       <groupId>org.springframework.boot</groupId>
  683.       <artifactId>spring-boot-starter-test</artifactId>
  684.       <scope>test</scope>
  685.       <exclusions>
  686.         <exclusion>
  687.           <groupId>junit</groupId>
  688.           <artifactId>junit</artifactId>
  689.         </exclusion>
  690.       </exclusions>
  691.     </dependency>
  692.     <dependency>
  693.       <groupId>io.swagger.core.v3</groupId>
  694.       <artifactId>swagger-core</artifactId>
  695.       <version>${swagger.version}</version>
  696.     </dependency>
  697.     <dependency>
  698.       <groupId>javax.ws.rs</groupId>
  699.       <artifactId>javax.ws.rs-api</artifactId>
  700.       <version>2.1</version>
  701.     </dependency>
  702.     <dependency>
  703.       <groupId>io.swagger</groupId>
  704.       <artifactId>swagger-hibernate-validations</artifactId>
  705.       <version>1.5.22</version>
  706.     </dependency>
  707.     <dependency>
  708.       <groupId>io.springfox</groupId>
  709.       <artifactId>springfox-swagger2</artifactId>
  710.       <version>${springfox-swagger2.version}</version>
  711.     </dependency>
  712.     <dependency>
  713.       <groupId>io.springfox</groupId>
  714.       <artifactId>springfox-swagger-ui</artifactId>
  715.       <version>${springfox-swagger2.version}</version>
  716.     </dependency>
  717.     <dependency>
  718.       <!-- Springfox Support for JSR-303 : https://springfox.github.io/springfox/docs/2.9.2/#springfox-support-for-jsr-303 -->
  719.       <groupId>io.springfox</groupId>
  720.       <artifactId>springfox-bean-validators</artifactId>
  721.       <version>${springfox-swagger2.version}</version>
  722.     </dependency>
  723.     <dependency>
  724.       <groupId>org.web3j</groupId>
  725.       <artifactId>core</artifactId>
  726.       <version>${web3j.version}</version>
  727.     </dependency>
  728.     <dependency>
  729.       <groupId>org.web3j</groupId>
  730.       <artifactId>codegen</artifactId>
  731.       <version>${web3j.version}</version>
  732.     </dependency>
  733.     <dependency>
  734.       <groupId>org.web3j</groupId>
  735.       <artifactId>pantheon</artifactId>
  736.       <version>4.5.1</version>
  737.     </dependency>
  738.   </dependencies>
  739. </project>

Referencing Maven project properties of List type

//@todo

This syntax works within pom.xml and Ant build files using Maven Ant plugin. But this doesn't working with resource filtering of Maven. I can't find any explain or reason for this. Is it a bug?

  1.     ...
  2.     <artifact:pom id="this-pom" file="${basedir}/pom.xml"/>
  3.     <xsddoc out="${this-pom.reporting.outputDirectory}/xsddocs"
  4.        verbose="true">
  5.        <fileset dir="${this-pom.build.resources[0].directory}"
  6.           includes="**/*.xsd"/>
  7.     </xsddoc>
  8.     ...

Build Lifecycle, Build Phase, Plugin and Goal

Maven-buildlifecycle


Guidelines for multi-moduled Maven project

  1. Separate parent project from container project.
  2. Define properties in the parent POM file as possible.
  3. Define the following properties explicitly for clearness and control.
    • Encoding related properties whose default value are dependent on platform.
      • project.build.sourceEncoding
      • project.reporting.outputEncoding
    • Properties to skip situationally unnecessary long running goals.
      • skipTests
      • maven.javadoc.skip
      • maven.deploy.skip
      • findbugs.skip
      • checkstyle.skip
    • Properties to run maven more stable way.
    • Paths for executable programs external to Maven
      • graphviz.home
  1. Define all plugins in the <pluginManagement> element of parent POM file.
    • Don't specify version to plugin definitions in child POM files.
  1. Define repositories in the parent POM file as possible.
  2. Define plugins to analyze or diagnose the sources or resources of the project as a reporting plugin as possible.
  3. Start values for path with ${project.basedir}, ${project.build.directory}, ${project.build.outputDirectory} or so on
    • When just specifying relative path such as 'target/classes', the result directory could be different if you build the project from the enclosing project in multi-module case.
    • If you specify the path with leading ${project.build.directory}, the resulting directory always would be one that is calculated with the current POM's project.
  1. Use resources in target/classes not in src/main/resources, considering resource filtering.

Sample of parent POM in action

  1. <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">
  2.  
  3.   <modelVersion>4.0.0</modelVersion>
  4.   <groupId>thridstage</groupId>
  5.   <artifactId>thridstage-framework-parent</artifactId>
  6.   <version>3.0.0-SNAPSHOT</version>
  7.   <packaging>pom</packaging>
  8.  
  9.   <name>Thirdstage Framework</name>
  10.   <url>...</url>
  11.   <inceptionYear>2012</inceptionYear>
  12.   <organization>
  13.     <name>...</name>
  14.     <url>...</url>
  15.   </organization>
  16.  
  17.   <prerequisites>
  18.     <maven>3.0</maven>
  19.   </prerequisites>
  20.  
  21.   <properties>
  22.     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  23.     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  24.     <graphviz.home>${env.GRAPHVIZ_HOME}</graphviz.home>
  25.     <skipTests>false</skipTests>
  26.     <maven.deploy.skip>true</maven.deploy.skip>
  27.     <maven.javadoc.skip>false</maven.javadoc.skip>
  28.     <maven.site.deploy.skip>true</maven.site.deploy.skip>
  29.     <findbugs.skip>true</findbugs.skip>
  30.     <checkstyle.skip>true</checkstyle.skip>
  31.     <dependency.locations.enabled>false</dependency.locations.enabled>
  32.     <antrun.echos.properties>true</antrun.echos.properties>
  33.     <scm.url.base>...</scm.url.base>
  34.   </properties>
  35.  
  36.   <issueManagement>
  37.     <system>Redmine</system>
  38.     <url>.../issues</url>
  39.   </issueManagement>
  40.   <scm>
  41.     <connection>scm:svn:http:...</connection>
  42.     <url>http:...</url>
  43.   </scm>
  44.   <distributionManagement>
  45.     <repository>
  46.       <id>...</id>
  47.       <name>...</name>
  48.       <url>...</url>
  49.     </repository>
  50.     <snapshotRepository>
  51.       <id>...</id>
  52.       <name>...</name>
  53.       <url>...</url>
  54.     </snapshotRepository>
  55.     <site>
  56.       <id>...</id>
  57.       <url>sftp://.../${project.version}</url>
  58.     </site>
  59.   </distributionManagement>
  60.  
  61.   <repositories>
  62.     <repository>
  63.       <snapshots>
  64.         <enabled>false</enabled>
  65.       </snapshots>
  66.       <id>thirdstag-releases</id>
  67.       <url>...</url>
  68.     </repository>
  69.     <repository>
  70.       <releases>
  71.         <enabled>false</enabled>
  72.       </releases>
  73.       <snapshots>
  74.         <enabled>true</enabled>
  75.       </snapshots>
  76.       <id>thirdstage-snapshots</id>
  77.       <url>...</url>
  78.     </repository>
  79.     <repository>
  80.       <snapshots>
  81.         <enabled>false</enabled>
  82.       </snapshots>
  83.       <id>central2</id>
  84.       <url>http://repo2.maven.org/maven2/</url>
  85.     </repository>
  86.     <repository>
  87.       <snapshots>
  88.         <enabled>false</enabled>
  89.       </snapshots>
  90.       <id>maven2-repository.dev.java.net</id>
  91.       <name>Java.net Repository for Maven</name>
  92.       <url>http://download.java.net/maven/2/</url>
  93.     </repository>
  94.     <repository>
  95.       <snapshots>
  96.         <enabled>false</enabled>
  97.       </snapshots>
  98.       <id>thirdparty</id>
  99.       <name>3rd-party Repository</name>
  100.       <url>http://repo.expertvill.net/nexus/content/repositories/thirdparty</url>
  101.     </repository>
  102.     <repository>
  103.       <id>evolvis-3rdparty</id>
  104.       <url>http://maven-repo.evolvis.org/3rdparty</url>
  105.     </repository>
  106.   </repositories>
  107.   <pluginRepositories>
  108.     <pluginRepository>
  109.       <snapshots>
  110.         <enabled>false</enabled>
  111.       </snapshots>
  112.       <id>central2</id>
  113.       <url>http://repo2.maven.org/maven2/</url>
  114.     </pluginRepository>
  115.     <pluginRepository>
  116.       <snapshots>
  117.         <enabled>false</enabled>
  118.       </snapshots>
  119.       <id>spring-beandoc</id>
  120.       <url>http://spring-beandoc.sourceforge.net/repo</url>
  121.     </pluginRepository>
  122.     <pluginRepository>
  123.       <snapshots>
  124.         <enabled>false</enabled>
  125.       </snapshots>
  126.       <id>tmatesoft-releases</id>
  127.       <url>http://maven.tmatesoft.com/content/repositories/releases/</url>
  128.     </pluginRepository>
  129.     <pluginRepository>
  130.       <releases>
  131.         <enabled>false</enabled>
  132.       </releases>
  133.       <id>tmatesoft-snapshots</id>
  134.       <url>http://maven.tmatesoft.com/content/repositories/snapshots/</url>
  135.     </pluginRepository>
  136.     <pluginRepository>
  137.       <id>evolvis-3rdparty</id>
  138.       <url>http://maven-repo.evolvis.org/3rdparty</url>
  139.     </pluginRepository>
  140.     <pluginRepository>
  141.       <snapshots>
  142.         <enabled>false</enabled>
  143.       </snapshots>
  144.       <id>elca-services</id>
  145.       <url>http://el4.elca-services.ch/el4j/maven2repository</url>
  146.     </pluginRepository>
  147.   </pluginRepositories>
  148.  
  149.   <reporting>
  150.     <plugins>
  151.       <plugin>
  152.         <groupId>org.apache.maven.plugins</groupId>
  153.         <artifactId>maven-checkstyle-plugin</artifactId>
  154.         <configuration>
  155.           <configLocation>../thirdstage.framework.parent/src/main/config/checkstyle/checkstyle.xml</configLocation>
  156.           <propertyExpansion>parent.basedir=../thirdstage.framework.parent</propertyExpansion>
  157.           <failsOnError>false</failsOnError>
  158.         </configuration>
  159.       </plugin>
  160.       <plugin>
  161.         <groupId>org.codehaus.mojo</groupId>
  162.         <artifactId>findbugs-maven-plugin</artifactId>
  163.         <version>2.3.2</version>
  164.         <configuration>
  165.           <effort>Max</effort>
  166.           <threshold>Low</threshold>
  167.           <onlyAnalyze>thirdstage.framework.*</onlyAnalyze>
  168.           <excludeFilterFile>../thirdstage.framework.parent/src/main/config/findbugs/findbugs-exclude.xml</excludeFilterFile>
  169.           <fork>true</fork>
  170.           <timeout>600000</timeout>
  171.           <maxHeap>512</maxHeap>
  172.         </configuration>
  173.       </plugin>
  174.     </plugins>
  175.   </reporting>
  176.  
  177.   <build>
  178.     <plugins>
  179.       <plugin>
  180.         <groupId>org.apache.maven.plugins</groupId>
  181.         <artifactId>maven-antrun-plugin</artifactId>
  182.         <executions>
  183.           <execution>
  184.             <id>validate-properties</id>
  185.             <phase>validate</phase>
  186.             <goals>
  187.               <goal>run</goal>
  188.             </goals>
  189.             <configuration>
  190.               <failOnError>true</failOnError>
  191.               <target name="validate-properties">
  192.                 <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="maven.plugin.classpath" />
  193.  
  194.                 <if name="antrun.echos.properties" value="true">
  195.                   <echo>Head revision of the project "${project.artifactId}" is
  196.                     ${project.svn.revision}.</echo>
  197.                   <echo>project.artifactId : ${project.artifactId}</echo>
  198.                   <echo>project.basedir : ${project.basedir}</echo>
  199.                   <echo>project.resources.0.directory : ${project.resources.0.directory}</echo>
  200.                   <echo>project.resources[0].directory : ${project.resources[0].directory}</echo>
  201.                   <echo>project.parent : ${project.parent}</echo>
  202.                   <echo>project.parent.groupId : ${project.parent.groupId}</echo>
  203.                   <echo>project.parent.artifactId : ${project.parent.artifactId}</echo>
  204.                   <echo>project.parent.relativePath :
  205.                     ${project.parent.relativePath}</echo>
  206.  
  207.                   <pathconvert pathsep="${line.separator}" property="classpath.maven.plugin" refid="maven.plugin.classpath" />
  208.  
  209.                   <pathconvert pathsep="${line.separator}" property="classpath.maven.compile" refid="maven.compile.classpath" />
  210.                   <echo />
  211.                   <echo>Compile-time classpath for Maven :</echo>
  212.                   <echo>${classpath.maven.compile}</echo>
  213.  
  214.                   <pathconvert pathsep="${line.separator}" property="classpath.maven.runtime" refid="maven.runtime.classpath" />
  215.                   <echo />
  216.                   <echo>Run-time classpath for Maven :</echo>
  217.                   <echo>${classpath.maven.runtime}</echo>
  218.  
  219.                   <echo>Check Korean output : 한글이 정상적으로 보이나요?</echo>
  220.                  
  221.                   <!-- echo all properties passed to Ant and environment variables prefixed with 'env' -->
  222.                   <echo>All properties given to Ant are : </echo>
  223.                   <property environment="env" />
  224.                   <echoproperties />
  225.                 </if>
  226.               </target>
  227.             </configuration>
  228.           </execution>
  229.         </executions>
  230.         <dependencies>
  231.           <dependency>
  232.             <groupId>ise.antelope</groupId>
  233.             <artifactId>ant-antelope-tasks</artifactId>
  234.             <version>3.5.0</version>
  235.           </dependency>
  236.         </dependencies>
  237.       </plugin>
  238.       <plugin>
  239.         <groupId>org.apache.maven.plugins</groupId>
  240.         <artifactId>maven-release-plugin</artifactId>
  241.         <configuration>
  242.           <!--
  243.          @fixme javaHome doesn't seem to work as is explained.
  244.          You should specify JAVA_HOME env. variable explicitly in your run configuration when running from
  245.          Eclipse.
  246.           -->
  247.           <!--  <javaHome>c:\lang\jdk1.5</javaHome> -->
  248.          
  249.           <!--  <mavenHome>C:\tools\maven-3.0.3</mavenHome> -->
  250.           <tagBase>${scm.url.base}/main/tags</tagBase>
  251.           <tagNameFormat>@{project.version}</tagNameFormat>
  252.           <username>OhSangMoon</username>
  253.           <autoVersionSubmodules>true</autoVersionSubmodules>
  254.           <pomFileName>pom.xml</pomFileName>
  255.           <arguments>-f pom.xml</arguments>
  256.          
  257.           <!--  not supported by release plugin oer 2.2.2
  258.          <generateReleasePoms>true</generateReleasePoms>
  259.          -->
  260.         </configuration>
  261.       </plugin>
  262.  
  263.     </plugins>
  264.     <pluginManagement>
  265.       <plugins>
  266.         <plugin>
  267.           <groupId>org.apache.maven.plugins</groupId>
  268.           <artifactId>maven-compiler-plugin</artifactId>
  269.           <version>2.3.2</version>
  270.           <inherited>true</inherited>
  271.           <configuration>
  272.             <source>1.5</source>
  273.             <target>1.5</target>
  274.           </configuration>
  275.         </plugin>
  276.         <plugin>
  277.           <groupId>org.apache.maven.plugins</groupId>
  278.           <artifactId>maven-site-plugin</artifactId>
  279.           <version>3.0</version>
  280.           <dependencies>
  281.             <dependency>
  282.               <groupId>org.apache.maven.wagon</groupId>
  283.               <artifactId>wagon-ssh</artifactId>
  284.               <version>2.0</version>
  285.             </dependency>
  286.           </dependencies>
  287.         </plugin>
  288.         <plugin>
  289.           <groupId>org.apache.maven.plugins</groupId>
  290.           <artifactId>maven-jar-plugin</artifactId>
  291.           <version>2.3.2</version>
  292.           <configuration>
  293.             <archive>
  294.               <addMavenDescriptor>false</addMavenDescriptor>
  295.               <forced>true</forced>
  296.               <index>true</index>
  297.               <manifest>
  298.                 <addClasspath>false</addClasspath>
  299.                 <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  300.                 <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
  301.                 <addExtensions>false</addExtensions>
  302.                 <classpathLayoutType>simple</classpathLayoutType>
  303.               </manifest>
  304.               <manifestEntries>
  305.                 <Source-Revision>${project.svn.revision}</Source-Revision>
  306.               </manifestEntries>
  307.             </archive>
  308.           </configuration>
  309.         </plugin>
  310.         <plugin>
  311.           <groupId>org.apache.maven.plugins</groupId>
  312.           <artifactId>maven-assembly-plugin</artifactId>
  313.           <version>2.2.1</version>
  314.         </plugin>
  315.         <plugin>
  316.           <groupId>org.apache.maven.plugins</groupId>
  317.           <artifactId>maven-javadoc-plugin</artifactId>
  318.           <version>2.8</version>
  319.           <configuration>
  320.             <docencoding>${project.reporting.outputEncoding}</docencoding>
  321.             <encoding>${project.build.sourceEncoding}</encoding>
  322.             <links>
  323.               <link>http://download.oracle.com/javase/1.5.0/docs/api/</link>
  324.               <link>http://download.oracle.com/javaee/5/api/</link>
  325.             </links>
  326.             <show>projected</show>
  327.             <splitindex>true</splitindex>
  328.           </configuration>
  329.         </plugin>
  330.         <plugin>
  331.           <groupId>org.apache.maven.plugins</groupId>
  332.           <artifactId>maven-project-info-reports-plugin</artifactId>
  333.           <version>2.4</version>
  334.         </plugin>
  335.         <plugin>
  336.           <groupId>org.apache.maven.plugins</groupId>
  337.           <artifactId>maven-checkstyle-plugin</artifactId>
  338.           <version>2.7</version>
  339.         </plugin>
  340.         <plugin>
  341.           <groupId>org.apache.maven.plugins</groupId>
  342.           <artifactId>maven-antrun-plugin</artifactId>
  343.           <version>1.7</version>
  344.           <dependencies>
  345.             <dependency>
  346.               <groupId>org.apache.ant</groupId>
  347.               <artifactId>ant</artifactId>
  348.               <version>1.8.2</version>
  349.             </dependency>
  350.           </dependencies>
  351.         </plugin>
  352.         <plugin>
  353.           <groupId>org.apache.maven.plugins</groupId>
  354.           <artifactId>maven-release-plugin</artifactId>
  355.           <version>2.2.2</version>
  356.           <configuration>
  357.             <providerImplementations>
  358.               <svn>javasvn</svn>
  359.             </providerImplementations>
  360.           </configuration>
  361.           <dependencies>
  362.             <dependency>
  363.               <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
  364.               <artifactId>maven-scm-provider-svnjava</artifactId>
  365.               <version>1.15</version>
  366.             </dependency>
  367.             <dependency>
  368.               <groupId>org.tmatesoft.svnkit</groupId>
  369.               <artifactId>svnkit</artifactId>
  370.               <version>1.7.0-SNAPSHOT</version>
  371.             </dependency>
  372.           </dependencies>
  373.         </plugin>
  374.         <plugin>
  375.           <groupId>org.apache.maven.plugins</groupId>
  376.           <artifactId>maven-scm-plugin</artifactId>
  377.           <version>1.6</version>
  378.           <configuration>
  379.             <providerImplementations>
  380.               <svn>javasvn</svn>
  381.             </providerImplementations>
  382.           </configuration>
  383.           <dependencies>
  384.             <dependency>
  385.               <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
  386.               <artifactId>maven-scm-provider-svnjava</artifactId>
  387.               <version>1.15</version>
  388.             </dependency>
  389.             <dependency>
  390.               <groupId>org.tmatesoft.svnkit</groupId>
  391.               <artifactId>svnkit</artifactId>
  392.               <version>1.7.0-SNAPSHOT</version>
  393.             </dependency>
  394.           </dependencies>
  395.         </plugin>
  396.  
  397.         <plugin>
  398.           <groupId>org.apache.maven.plugins</groupId>
  399.           <artifactId>maven-dependency-plugin</artifactId>
  400.           <version>2.4</version>
  401.         </plugin>
  402.  
  403.         <plugin>
  404.           <groupId>org.apache.maven.plugins</groupId>
  405.           <artifactId>maven-eclipse-plugin</artifactId>
  406.           <version>2.8</version>
  407.           <configuration>
  408.             <!-- the next two item doesn't work on m2e. m2e has its own confgiruation in Eclipse preferences -->
  409.             <downloadSources>true</downloadSources>
  410.             <downloadJavaDocs>true</downloadJavaDocs>
  411.           </configuration>
  412.         </plugin>
  413.  
  414.         <plugin>
  415.           <groupId>org.codehaus.mojo</groupId>
  416.           <artifactId>properties-maven-plugin</artifactId>
  417.           <version>1.0-alpha-2</version>
  418.         </plugin>
  419.         <plugin>
  420.           <groupId>org.codehaus.mojo</groupId>
  421.           <artifactId>maven-springbeandoc-plugin</artifactId>
  422.           <version>1.0.8-SNAPSHOT</version>
  423.         </plugin>
  424.         <plugin>
  425.           <groupId>com.google.code.maven-svn-revision-number-plugin</groupId>
  426.           <artifactId>maven-svn-revision-number-plugin</artifactId>
  427.           <version>1.7</version>
  428.           <executions>
  429.             <execution>
  430.               <phase>validate</phase>
  431.               <goals>
  432.                 <goal>revision</goal>
  433.               </goals>
  434.               <configuration>
  435.                 <entries>
  436.                   <entry>
  437.                     <path>${project.basedir}</path>
  438.                     <prefix>project.svn</prefix>
  439.                     <depth>infinity</depth>
  440.                     <reportUnversioned>true</reportUnversioned>
  441.                     <reportIgnored>false</reportIgnored>
  442.                     <reportOutOfDate>false</reportOutOfDate>
  443.                   </entry>
  444.                 </entries>
  445.               </configuration>
  446.             </execution>
  447.           </executions>
  448.           <dependencies>
  449.             <dependency>
  450.               <groupId>org.tmatesoft.svnkit</groupId>
  451.               <artifactId>svnkit</artifactId>
  452.               <version>1.7.0-SNAPSHOT</version>
  453.             </dependency>
  454.           </dependencies>
  455.         </plugin>
  456.       </plugins>
  457.     </pluginManagement>
  458.   </build>
  459. </project>

Dependency on local library not in Maven repository and with no POM file

Sometimes your project may have dependency on a JAR file that is not registered to any of Maven repositories and so have no it's own POM file. In this case, you can use <systemPath> element to specify your module's dependency on it.

  1. <dependencies>
  2.   ...
  3.   <dependency>
  4.     <groupId>unknown</groupId>
  5.     <artifactId>abcd</artifactId>
  6.     <version>1.0</version>
  7.     <type>jar</type>
  8.     <scope>system</scope>
  9.     <systemPath>${project.basedir}/lib/abcd.jar</systemPath>
  10.   </dependency>
  11.   ...
  12. </dependencies>

Note that systemPath could be specified only with system scope. You should specify groupId, artifactId, and version 'cause they are mandatory but you can specify any value and don't need pom file.

Escaping expression interpolation

It may necessary not to interpolate Maven expression in resources. In other words, you just want to leave ${some-property} as it is. For this, you can specify the escape string with escapeString parameter of maven-resource-plugin. You can also define maven.resources.escapeString property in your POM file.

For more refer this page : http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#escapeString

Working with Subversion working copy in format of ver. 1.7

The default configuration of Maven release plugin(maven-release-plugin) up to ver. 2.2.2 or Maven scm plugin(maven-scm-plugin) up to ver. 1.6 can't work correctly with Subversion working copy in format of ver. 1.7.
To solve this problem, you should override the configuration of release plugin or scm plugin to use maven-scm-provider-svnjava and svnkit 1.7.

  1. <plugin>
  2.    <groupId>org.apache.maven.plugins</groupId>
  3.    <artifactId>maven-release-plugin</artifactId>
  4.    <version>2.2.2</version>
  5.    <configuration>
  6.       <providerImplementations>
  7.          <svn>javasvn</svn>
  8.       </providerImplementations>
  9.    </configuration>
  10.    <dependencies>
  11.       <dependency>
  12.          <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
  13.          <artifactId>maven-scm-provider-svnjava</artifactId>
  14.          <version>1.15</version>
  15.       </dependency>
  16.       <dependency>
  17.          <groupId>org.tmatesoft.svnkit</groupId>
  18.          <artifactId>svnkit</artifactId>
  19.          <version>1.7.0-SNAPSHOT</version>
  20.       </dependency>                
  21.    </dependencies>
  22. </plugin>
  23. <plugin>
  24.    <groupId>org.apache.maven.plugins</groupId>
  25.    <artifactId>maven-scm-plugin</artifactId>
  26.    <version>1.6</version>
  27.    <configuration>
  28.       <providerImplementations>
  29.          <svn>javasvn</svn>
  30.       </providerImplementations>
  31.    </configuration>
  32.    <dependencies>
  33.       <dependency>
  34.          <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
  35.          <artifactId>maven-scm-provider-svnjava</artifactId>
  36.          <version>1.15</version>
  37.       </dependency>
  38.       <dependency>
  39.          <groupId>org.tmatesoft.svnkit</groupId>
  40.          <artifactId>svnkit</artifactId>
  41.          <version>1.7.0-SNAPSHOT</version>
  42.       </dependency>                
  43.    </dependencies>
  44. </plugin>

For now, svnkit 1.7 has no release and is in snapshot version.

If you let the plugins use svnkit 1.3.x which is default setting as of now, you would meet the exceptions like the following.

Caused by: org.apache.maven.shared.release.scm.ReleaseScmCommandException: Unable to commit files
Provider message:
SVN commit failed.
Command output:
svn: The path ... appears to be part of a Subversion 1.7 or greater working copy.  Please upgrade your Subversion client to use this working copy.
 at org.apache.maven.shared.release.phase.AbstractScmCommitPhase.checkin(AbstractScmCommitPhase.java:168)
 at org.apache.maven.shared.release.phase.AbstractScmCommitPhase.performCheckins(AbstractScmCommitPhase.java:148)
 at org.apache.maven.shared.release.phase.ScmCommitPreparationPhase.runLogic(ScmCommitPreparationPhase.java:75)
 at org.apache.maven.shared.release.phase.AbstractScmCommitPhase.execute(AbstractScmCommitPhase.java:79)
 at org.apache.maven.shared.release.DefaultReleaseManager.rollback(DefaultReleaseManager.java:259)
 at org.apache.maven.shared.release.DefaultReleaseManager.rollback(DefaultReleaseManager.java:238)
 at org.apache.maven.plugins.release.RollbackReleaseMojo.execute(RollbackReleaseMojo.java:56)
 ... 21 more

For more, refer the followings,

Release process

  • overall process
    • prepare-with-pom in dry mode > rollback > prepare > perform


  1. Check whether the free space in file system is enough for the relative servers.
    • server hosting source repository
    • server hosting binary repository
    • server hosting site documentation
  2. Synchronize all project in trunk.
  3. Run release:prepare-with-pom goal in dryRun mode with following options.
    • maven.deploy.skip = false
    • resume = false
    • dryRun = true
    • maven.home = ${env_var:MAVEN_HOME}
  4. Review pom.xml.tag, pom.xml.next, release-pom.xml in each project
    • pom.xml.tag ...
    • pom.xml.next ...
    • release-pom.xml ...
    • fully explicit(with no placeholder) scm information would exist only in pom.xml.tag file of aggregation project and parent project. Url of the scm should end with the name of the project.
  5. Run release:rollback goal with following options.
    • maven.deploy.skip = false
    • <code>resume = false
    • <code>maven.home = ${env_var:MAVEN_HOME}
  6. Check that all pom.xml.tag, pom.xml.next, pom.xml.backup files are deleted.
  7. Run <code>release:prepare goal with following options
    • maven.deploy.skip = false
    • resume = false
    • maven.home = ${env_var:MAVEN_HOME}
  8. Check the new directory for the version and directories for projects under tag directory in source repository.
  9. Run release:perform goal with following options.
    • maven.deploy.skip = false
    • resume = false
    • maven.home = ${env_var:MAVEN_HOME}
  10. Refresh(F5) all projects in Eclipse.
  11. Login on binary repository and check the binaries for projects are uploaded.
  12. Test on the new version

references

Download a specific artifact using mvn command

You can execute dependency plugin even without a pom.xml to download a specific artifact. Note that dependency plugin needs artifact and repoUrl properties specified explicitly.

# mvn org.apache.maven.plugins:maven-dependency-plugin:2.9:get -Dartifact=org.aspectj:aspectjweaver:1.8.1 -DremoteRepositories=central2::::http://repo2.maven.org/maven2/ -Dtransitive=false -Ddest=.

references

Using Maven and Eclipse for Scala/Java mixed project

  • Required tools and plugins
    • Scala IDE
    • m2eclipse-scala
    • scalatest-eclipse-plugin
    • scala-maven-plugin
  • POM
  1.   ...
  2.  
  3.   <properties>
  4.     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  5.     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  6.     <java.version>1.7</java.version>
  7.     <scala.version>2.11</scala.version>
  8.   </properties>
  9.  
  10.   <build>
  11.     <plugins>
  12.       <plugin>
  13.         <groupId>org.apache.maven.plugins</groupId>
  14.         <artifactId>maven-compiler-plugin</artifactId>
  15.       </plugin>
  16.       <plugin>
  17.         <groupId>net.alchim31.maven</groupId>
  18.         <artifactId>scala-maven-plugin</artifactId>
  19.         <executions>
  20.           <execution>
  21.             <id>scala-compile</id>
  22.             <phase>process-resources</phase>
  23.             <goals>
  24.               <goal>add-source</goal>
  25.               <goal>compile</goal>
  26.             </goals>
  27.           </execution>
  28.           <execution>
  29.             <id>scala-test-compile</id>
  30.             <phase>process-test-resources</phase>
  31.             <goals>
  32.               <goal>testCompile</goal>
  33.             </goals>
  34.           </execution>
  35.         </executions>
  36.       </plugin>
  37.     </plugins>
  38.     <pluginManagement>
  39.       <plugins>
  40.         <plugin>
  41.           <groupId>org.apache.maven.plugins</groupId>
  42.           <artifactId>maven-compiler-plugin</artifactId>
  43.           <version>3.5.1</version>
  44.           <configuration>
  45.             <source>${java.version}</source>
  46.             <target>${java.version}</target>
  47.           </configuration>
  48.         </plugin>
  49.         <plugin>
  50.           <groupId>net.alchim31.maven</groupId>
  51.           <artifactId>scala-maven-plugin</artifactId>
  52.           <version>3.2.2</version>
  53.           <configuration>
  54.             <source>${java.version}</source>
  55.             <target>${java.version}</target>
  56.             <scalaVersion>${scala.version}</scalaVersion>
  57.             <sourceDir>${project.build.sourceDirectory}/../scala</sourceDir>
  58.             <testSourceDir>${project.build.testSourceDirectory}/../scala</testSourceDir>
  59.           </configuration>
  60.         </plugin>
  61.         <plugin>
  62.           <groupId>org.eclipse.m2e</groupId>
  63.           <artifactId>lifecycle-mapping</artifactId>
  64.           <version>1.0.0</version>
  65.           <configuration>
  66.             <lifecycleMappingMetadata>
  67.               <pluginExecutions>
  68.                 <pluginExecution>
  69.                   <pluginExecutionFilter>
  70.                     <groupId>net.alchim31.maven</groupId>
  71.                     <artifactId>scala-maven-plugin</artifactId>
  72.                     <versionRange>[1.0.0,)</versionRange>
  73.                     <goals>
  74.                       <goal>add-source</goal>
  75.                       <goal>compile</goal>
  76.                       <goal>testCompile</goal>
  77.                     </goals>
  78.                   </pluginExecutionFilter>
  79.                   <action>
  80.                     <execute>
  81.                       <runOnConfiguration>true</runOnConfiguration>
  82.                       <runOnIncremental>true</runOnIncremental>
  83.                     </execute>
  84.                   </action>
  85.                 </pluginExecution>
  86.               </pluginExecutions>
  87.             </lifecycleMappingMetadata>
  88.           </configuration>
  89.         </plugin>
  90.       </plugins>
  91.     </pluginManagement>
  92.   </build>
  93.  
  94.   <dependencies>
  95.     <dependency>
  96.       <groupId>org.scalactic</groupId>
  97.       <artifactId>scalactic_${scala.version}</artifactId>
  98.       <version>2.2.6</version>
  99.     </dependency>
  100.     <dependency>
  101.       <groupId>org.scalatest</groupId>
  102.       <artifactId>scalatest_${scala.version}</artifactId>
  103.       <version>2.2.6</version>
  104.       <scope>test</scope>
  105.     </dependency>
  106.   </dependencies>
  107.  
  108.   ...

Simple tips and troubleshooting

  • The value of Maven property "project.build.directory" in normal case is ${basedir}/target. You can confirm this using the following command line : "mvn help:evaluate -Dexpression=project.build.directory".
  • Solving "[ERROR Unable to determine if resource ... exists in .." error.]
    Or just add <dependency.locations.enabled>false</dependency.locations.enabled> into the <properties> element of POM file.
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.3.2:jar (default-jar) on project ...: Error assembling JAR
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
  ...
Caused by: org.apache.maven.plugin.MojoExecutionException: Error assembling JAR
  at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:223)
  ...
Caused by: org.codehaus.plexus.archiver.ArchiverException: Problem creating jar: ... (Access is denied)
  at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:892)
 ...
Caused by: java.io.FileNotFoundException: ... (Access is denied)
  at java.io.RandomAccessFile.open(Native Method)
  at java.io.RandomAccessFile.<init>(RandomAccessFile.java:216)
  at org.codehaus.plexus.archiver.zip.ZipFile.<init>(ZipFile.java:150)
Community content is available under CC-BY-SA unless otherwise noted.