3rdstage's Wiki
No edit summary
(145 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
<div class="toclimit-3 right">__TOC__</div>
  +
 
<div class='by-3rdstage'>
 
<div class='by-3rdstage'>
   
 
==Overview==
 
==Overview==
* Maven Getting Started Guide : http://maven.apache.org/guides/getting-started/index.html
+
* [http://maven.apache.org/guides/getting-started/index.html Maven Getting Started Guide]
* POM Reference : http://maven.apache.org/pom.html
+
* [http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html Dependency Mechanism]
* Maven Build Lifecycle : http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
+
* [http://maven.apache.org/pom.html POM Reference]
* Maven Plugin List : http://maven.apache.org/plugins/
+
* [http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html Maven Build Lifecycle]
* Maven Shared Components : http://maven.apache.org/shared/
+
* [http://maven.apache.org/plugins/ Maven Plugin List]
  +
* [http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Standard Directory Layout]
* mvn Command Line Options : http://www.sonatype.com/books/mvnref-book/reference/running.html#running-sect-help-option
 
  +
* [http://maven.apache.org/shared/ Maven Shared Components]
  +
* [http://books.sonatype.com/mvnref-book/reference/running-sect-options.html <code>mvn</code> Command Line Options]
  +
* [http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide Maven Properties Guide]
  +
* [http://books.sonatype.com/mvnref-book/reference/resource-filtering-sect-properties.html#resource-filtering-sect-project-properties Maven Project Properties]
   
* [http://maven.apache.org/ref/2.2.1/maven-model/maven.html XML Schema and description for Maven POM file(maven-4.0.0.xsd).]
+
* [http://maven.apache.org/ref/2.2.1/maven-model/maven.html XML Schema and description for Maven POM file(<code>maven-4.0.0.xsd</code>).]
 
* [http://maven.apache.org/ref/3.0/maven-model/apidocs/ Maven Model 3.0 API]
 
* [http://maven.apache.org/ref/3.0/maven-model/apidocs/ Maven Model 3.0 API]
 
* [http://maven.apache.org/ref/3.0/maven-core/apidocs/ Maven Core 3.0 API]
 
* [http://maven.apache.org/ref/3.0/maven-core/apidocs/ Maven Core 3.0 API]
* [http://maven.apache.org/ref/3.0/maven-core/apidocs/index.html?org/apache/maven/project/MavenProject.html API of MavenProject class]
+
* [http://maven.apache.org/ref/3.0/maven-core/apidocs/index.html?org/apache/maven/project/MavenProject.html <code>MavenProject</code> class API]
* [http://cvs.peopleware.be/training/maven/maven2/mvnCommand.html The mvn Command]
+
* [http://cvs.peopleware.be/training/maven/maven2/mvnCommand.html The <code>mvn</code> Command]
 
* [http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html Version Range Specification]
 
* [http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html Version Range Specification]
  +
* [http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html Maven Assembly Descriptor Reference]
* [http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-project-dependencies.html#table-transitive-dep-and-scope How Scope Affects Transitive Dependencies]
 
  +
* [http://maven.apache.org/shared/maven-archiver/index.html Apache Maven Archiver] includes <code>&lt;manifest&gt;</code> element
 
  +
* [http://maven.apache.org/enforcer/enforcer-rules/ Apache Maven Enforcer Rules]
  +
** <code>requireEnvironmentVariable</code>, <code>requireJavaVersion</code>, <code>requireMavenVersion</code>
  +
* [http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-project-dependencies.html Dependencies]
  +
* [http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution Dependency Mediation and Conflict Resolution]
  +
* [http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-project-dependencies.html#table-transitive-dep-and-scope Transitive Dependencies and Scope]
  +
* [https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html How to create a jar containing test classes]
  +
* [http://central.sonatype.org/pages/apache-maven.html OSSRH guides]
   
 
* Maven for C/C++
 
* Maven for C/C++
  +
** [http://maven-nar.github.io/philosophy.html Maven NAR plugin philosophy]
  +
** [http://blog.bigpixel.ro/2012/07/building-cc-applications-with-maven/ Building c/c++ applications with maven](1st July 2012)
 
* Maven for JavaScript
 
* Maven for JavaScript
 
** [http://mojo.codehaus.org/javascript-maven-tools/ Maven tools for JavaScript developers]
 
** [http://mojo.codehaus.org/javascript-maven-tools/ Maven tools for JavaScript developers]
  +
* Maven for Python
  +
* Maven for Scala
  +
** [http://books.sonatype.com/mcookbook/reference/scala.html The Maven Cookbook > Scala and Maven]
   
 
==Maven Repositories==
 
==Maven Repositories==
  +
* '''Central Repository''' : http://search.maven.org/
 
  +
* [https://mvnrepository.com/repos Maven repository list]
  +
* [https://support.sonatype.com/hc/en-us/articles/217611787-codehaus-org-Repositories-Should-Be-Removed-From-Your-Nexus-Instance <code>codehaus.org</code> Repositories Should Be Removed From Your Nexus Instance] (September 27, 2016)
  +
  +
* '''Central Repository''' : http://search.maven.org/#browse
 
* '''Main Repositories''' : http://mvnrepository.com/
 
* '''Main Repositories''' : http://mvnrepository.com/
  +
* '''Java.net'''
  +
** snapshots and releases : https://maven.java.net/content/groups/public/
  +
** releases only : https://maven.java.net/service/local/staging/deploy/maven2/
  +
** snapshots only : https://maven.java.net/content/repositories/snapshots/
  +
** [https://maven2-repository.java.net/ Maven 2 repository for java.net projects]
  +
** [https://java.net/projects/maven2-repository/pages/MigrationAndCleanupRelatedDocumentation Java.net Maven Repository Usage Guide]
 
* '''Apache Maven Repository :
 
* '''Apache Maven Repository :
 
** search : https://repository.apache.org/
 
** search : https://repository.apache.org/
Line 33: Line 61:
 
** [http://www.jboss.org/community/docs/DOC-11381 JBoss Maven Snapshot Repositories]
 
** [http://www.jboss.org/community/docs/DOC-11381 JBoss Maven Snapshot Repositories]
 
** JBoss Maven repsoitories include hibernate releases and snapshots.
 
** JBoss Maven repsoitories include hibernate releases and snapshots.
  +
* '''Spring IO Maven Repositories'''
  +
** libs-release : http://repo.spring.io/libs-release
  +
** libs-snapshot : http://repo.spring.io/libs-snapshot
  +
** plugins-release : http://repo.spring.io/plugins-release
  +
** plugins-snapshot : http://repo.spring.io/plugins-snapshot
  +
* '''Google''' : http://google-maven-repository.googlecode.com/svn/repository/
 
* '''SUN Jars Repository'''
 
* '''SUN Jars Repository'''
 
** http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html
 
** http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html
Line 42: Line 76:
   
 
==Maven Plug-ins==
 
==Maven Plug-ins==
  +
* Resource Plugin : [http://maven.apache.org/plugins/maven-resources-plugin/ http://maven.apache.org/plugins/maven-resources-plugin/]
 
  +
* [http://maven.apache.org/plugins/ Maven Plugin List]
* Build Helper Plugin : http://mojo.codehaus.org/build-helper-maven-plugin/
 
  +
** contains various small independent goals to assist with the Maven build lifecycle.
 
  +
===Utilities===
* Eclipse Plugin : [http://maven.apache.org/plugins/maven-eclipse-plugin/ http://maven.apache.org/plugins/maven-eclipse-plugin/]
 
  +
* Tycho : a set of Maven plugins and extensions for building Eclipse plugins and OSGi bundles with Maven.
 
  +
* '''Resource Plugin'''
** [http://www.eclipse.org/tycho/ http://www.eclipse.org/tycho/]
 
  +
** http://maven.apache.org/plugins/maven-resources-plugin/
** [http://www.eclipse.org/tycho/sitedocs/ http://www.eclipse.org/tycho/sitedocs/]
 
  +
** [http://wiki.eclipse.org/Tycho/Reference_Card Tycho/Reference Card]
 
  +
* '''Build Helper Plugin'''
** [http://wiki.eclipse.org/Tycho/Packaging_Types Tycho/Packaging Types]
 
  +
** https://www.mojohaus.org/build-helper-maven-plugin/
** [http://wiki.eclipse.org/Tycho/FAQ Tycho/FAQ]
 
  +
* P2 Plugin : https://github.com/reficio/p2-maven-plugin
 
  +
* '''Build Number Plugin'''
** responsible for the automation of dependency management in the Eclipse RCP environment.
 
* Doxia Plugin : [http://maven.apache.org/doxia/doxia/doxia-maven-plugin/ http://maven.apache.org/doxia/doxia/doxia-maven-plugin/]
+
** http://mojo.codehaus.org/buildnumber-maven-plugin/
* JBoss Plugin : [http://mojo.codehaus.org/jboss-maven-plugin/ http://mojo.codehaus.org/jboss-maven-plugin/]
 
* Jetty Plugin :
 
** http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
 
** [http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html Configuring the Jetty Maven Plugin] (for Jetty 9 or higher)
 
* IzPack Plugin : [http://izpack.codehaus.org/izpack-maven-plugin/ http://izpack.codehaus.org/izpack-maven-plugin/]
 
* Properties Plugin :
 
** [http://mojo.codehaus.org/properties-maven-plugin/ http://mojo.codehaus.org/properties-maven-plugin/]
 
*** Provides goals to read and write properties from and to files.
 
** [http://site.kuali.org/maven/plugins/properties-maven-plugin/1.3.2/plugin-info.html http://site.kuali.org/maven/plugins/properties-maven-plugin/1.3.2/plugin-info.html]
 
*** Provides goals to read and write properties from files.
 
* Build Number Plugin : [http://mojo.codehaus.org/buildnumber-maven-plugin/ http://mojo.codehaus.org/buildnumber-maven-plugin/]
 
 
** Designed to get a unique build number for each time you build your project.
 
** Designed to get a unique build number for each time you build your project.
  +
* Versions Plugin : [http://mojo.codehaus.org/versions-maven-plugin/ http://mojo.codehaus.org/versions-maven-plugin/]
 
  +
* '''Versions Plugin'''
  +
** http://mojo.codehaus.org/versions-maven-plugin/
 
** Manages the versions of artifacts in a project's POM.
 
** Manages the versions of artifacts in a project's POM.
  +
* Timestamp Plugin : [http://code.google.com/p/maven-timestamp-plugin/ http://code.google.com/p/maven-timestamp-plugin/]
 
  +
* '''Timestamp Plugin'''
  +
** http://code.google.com/p/maven-timestamp-plugin/
 
** Provides formatted timestamps for maven builds.
 
** Provides formatted timestamps for maven builds.
  +
* Spring BeanDoc Plugin : [http://mojo.codehaus.org/maven-springbeandoc-plugin/ http://mojo.codehaus.org/maven-springbeandoc-plugin/]
 
  +
* '''Properties Plugin'''
** Generates pretty reports for Spring configuration files.
 
* Graphviz Plugin : [http://graphviz-maven-plugin.bryon.us/ http://graphviz-maven-plugin.bryon.us/]
+
** https://www.mojohaus.org/properties-maven-plugin/
  +
** Provides goals to read and write properties from and to files.
** Uses the Graphviz library to render .dot files into images.
 
  +
* Replacer Plugin : [http://code.google.com/p/maven-replacer-plugin/ http://code.google.com/p/maven-replacer-plugin/]
 
  +
* '''Properties Plugin'''
  +
** http://site.kuali.org/maven/plugins/properties-maven-plugin/1.3.2/plugin-info.html
  +
** Provides goals to read and write properties from files.
  +
  +
* '''Replacer Plugin'''
  +
** http://code.google.com/p/maven-replacer-plugin/
 
** Replace tokens within a file with a given value and fully supports regular expressions.
 
** Replace tokens within a file with a given value and fully supports regular expressions.
  +
* FreeMarker Pre Processor(FMPP) Plugin : [http://code.google.com/p/freemarkerpp-maven-plugin/ http://code.google.com/p/freemarkerpp-maven-plugin/]
 
  +
* '''Expression Plugin'''
** Allows to process FreeMarker templates, inject data into those templates in order to produce code, artifacts, reports or anything desired.
 
* Expression Plugin : [https://github.com/jdcasey/expression-maven-plugin https://github.com/jdcasey/expression-maven-plugin]
+
** https://github.com/jdcasey/expression-maven-plugin
 
** Allow users to resolve expressions interactively.
 
** Allow users to resolve expressions interactively.
   
===Code analysis tools plug-in===
+
===Source configuration management tools support===
  +
  +
* '''SVN Revision Number Plugin'''
  +
** http://code.google.com/p/maven-svn-revision-number-plugin/
  +
** Retrieves the revision number and the status of the Subversion working copy directory and sets project properties that can be used later in the build process.
  +
** To work with working copy of SVN 1.7 or higher, you should setup dependencies for this plugin to use svnkit 1.7.0-SNAPSHOT.
  +
*** For more : http://code.google.com/p/maven-svn-revision-number-plugin/issues/detail?id=10
  +
  +
===Code analysis tools support===
   
 
* '''FindBugs Plugin'''
 
* '''FindBugs Plugin'''
** http://mojo.codehaus.org/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/faq.html#Aggregate_Reporting Is there an easy way to generate the aggregate report ?] : ''Unfortunately ...''
  +
 
* '''PMD Plugin'''
 
* '''PMD Plugin'''
 
** http://maven.apache.org/plugins/maven-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.
 
** 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.
 
** also supports the separate Copy/Paste Detector tool (or CPD) distributed with PMD.
  +
 
* '''Checkstyle Plugin'''
 
* '''Checkstyle Plugin'''
 
** http://maven.apache.org/plugins/maven-checkstyle-plugin/
 
** http://maven.apache.org/plugins/maven-checkstyle-plugin/
 
** Generates a report regarding the code style used by the developers.
 
** Generates a report regarding the code style used by the developers.
  +
 
* '''JavaNCSS Plugin'''
 
* '''JavaNCSS Plugin'''
 
** http://mojo.codehaus.org/javancss-maven-plugin/
 
** http://mojo.codehaus.org/javancss-maven-plugin/
 
** provides the capability to run the JavaNCSS tool on your Maven 2 project sources and produce an html report.
 
** provides the capability to run the JavaNCSS tool on your Maven 2 project sources and produce an html report.
  +
 
* '''JDepend Plugin'''
 
* '''JDepend Plugin'''
 
** http://mojo.codehaus.org/jdepend-maven-plugin/
 
** http://mojo.codehaus.org/jdepend-maven-plugin/
 
** produces a nicely formatted metrics report based on your project.
 
** produces a nicely formatted metrics report based on your project.
  +
 
* '''Dependency Graph Plugin'''
 
* '''Dependency Graph Plugin'''
 
** http://el4j.sourceforge.net/plugins/maven-depgraph-plugin/
 
** http://el4j.sourceforge.net/plugins/maven-depgraph-plugin/
 
** Draws a dependency graph of the project the mojo is executed in.
 
** Draws a dependency graph of the project the mojo is executed in.
  +
 
* '''Sonar Plugin'''
 
* '''Sonar Plugin'''
 
** http://mojo.codehaus.org/sonar-maven-plugin/
 
** http://mojo.codehaus.org/sonar-maven-plugin/
 
** Enables to analyze and report metrics on source code.
 
** Enables to analyze and report metrics on source code.
  +
 
* '''Rat Plugin'''
 
* '''Rat Plugin'''
 
** http://creadur.apache.org/rat/apache-rat-plugin/
 
** http://creadur.apache.org/rat/apache-rat-plugin/
 
** verifies, whether your source code matches standards like the ASF Source Header and Copyright Notice Policy
 
** verifies, whether your source code matches standards like the ASF Source Header and Copyright Notice Policy
   
  +
* '''m2e-code-quality'''
===Collaboration tools plug-in===
 
  +
** http://m2e-code-quality.github.io/m2e-code-quality/
* Confluence Plugin : [http://code.google.com/p/maven-confluence-plugin/ http://code.google.com/p/maven-confluence-plugin/]
 
  +
** Desc. : A collection of Eclipse plugins for M2Eclipse that carry configuration from the Checkstyle, FindBugs and PMD Maven plugins to their corresponding Eclipse plugins.
** Documents a project (using maven site style) and send result to a live confluence site.
 
  +
** License: Apache-2.0
* Redmine Plugin : [http://www.nuiton.org/embedded/jredmine/maven-jredmine-plugin/ http://www.nuiton.org/embedded/jredmine/maven-jredmine-plugin/]
 
  +
** Sources : https://github.com/m2e-code-quality/m2e-code-quality/
   
===Source configuration management tools plug-in===
+
===Continuous integration tools support===
* SVN Revision Number Plugin : http://code.google.com/p/maven-svn-revision-number-plugin/
 
** Retrieves the revision number and the status of the Subversion working copy directory and sets project properties that can be used later in the build process.
 
** To work with working copy of SVN 1.7 or higher, you should setup dependencies for this plugin to use svnkit 1.7.0-SNAPSHOT. For this refer : http://code.google.com/p/maven-svn-revision-number-plugin/issues/detail?id=10
 
   
  +
* '''Jenkins-maven-plugin'''
===Continuous integration tools plug-in===
 
* Jenkins-maven-plugin : http://evgeny-goldin.com/wiki/Jenkins-maven-plugin
+
** http://evgeny-goldin.com/wiki/Jenkins-maven-plugin
 
** allows to generate Jenkins jobs, one "config.xml" per job, from a simple Maven POM.
 
** allows to generate Jenkins jobs, one "config.xml" per job, from a simple Maven POM.
   
===Non-java build plug-in===
+
===Collaboration tools support===
  +
* Native Maven Plugin : [http://mojo.codehaus.org/maven-native/native-maven-plugin/index.html http://mojo.codehaus.org/maven-native/native-maven-plugin/index.html]
 
  +
* '''Confluence Plugin'''
** Use this plugin to compile c and c++ source under Maven 2 with compilers such as gcc, msvc, gcj etc ...
 
* Maven NAR Plugin : [http://duns.github.com/maven-nar-plugin/ http://duns.github.com/maven-nar-plugin/]
+
** http://code.google.com/p/maven-confluence-plugin/
  +
** Documents a project (using maven site style) and send result to a live confluence site.
** allows you to compile native code (c++, c and fortran) on a number of different architectures (Linux, Windows, MacOSX, Solaris, ...) and with a number of different compilers/linkers (g++, Microsoft Visual C++, CC, ...).
 
  +
  +
* '''Redmine Plugin'''
  +
** http://www.nuiton.org/embedded/jredmine/maven-jredmine-plugin/
  +
  +
===Packaging tools support===
  +
  +
* '''IzPack Plugin'''
  +
** http://izpack.codehaus.org/izpack-maven-plugin/
  +
  +
* '''RPM Maven Plugin'''
  +
** http://mojo.codehaus.org/rpm-maven-plugin/
  +
** allows artifacts from one or more projects to be packaged in an RPM for distribution.
  +
  +
===Programming languages support===
  +
  +
* '''Maven NAR Plugin'''
  +
** http://maven-nar.github.io/
  +
** Desc. : allows you to compile native code (c++, c and fortran) on a number of different architectures (Linux, Windows, MacOSX, Solaris, ...) and with a number of different compilers/linkers (g++, Microsoft Visual C++, CC, ...).
  +
** Sources : https://github.com/maven-nar/nar-maven-plugin
  +
** examples
  +
*** sources : https://github.com/maven-nar/nar-maven-plugin/tree/master/src/it
  +
*** description : http://maven-nar.github.io/examples.html
  +
  +
* '''Native Maven Plugin'''
  +
** http://mojo.codehaus.org/maven-native/native-maven-plugin/index.html
  +
** Desc. : Use this plugin to compile c and c++ source under Maven 2 with compilers such as gcc, msvc, gcj etc ...
  +
  +
* '''Scala Maven Plugin'''
  +
** http://davidb.github.io/scala-maven-plugin/
  +
** Desc. : used for compiling/testing/running/documenting scala code in maven
  +
** Sources : https://github.com/davidB/scala-maven-plugin
  +
** Readings
  +
*** [http://docs.scala-lang.org/tutorials/scala-with-maven.html Scala with Maven]
  +
  +
* '''Maven Scala Plugin'''
  +
** http://scala-tools.org/mvnsites/maven-scala-plugin/
  +
** 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'''
  +
** https://github.com/eirslett/frontend-maven-plugin
  +
** Desc. : downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.
  +
** Sources : https://github.com/eirslett/frontend-maven-plugin
  +
** Readings
  +
*** [http://blog.trifork.com/2014/10/07/setting-up-maven-to-use-gruntnodejs/ Setting up Maven to use Grunt/NodeJS] (October 7th, 2014)
  +
  +
===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'''
  +
** http://www.mojohaus.org/aspectj-maven-plugin/
  +
  +
* '''Spring BeanDoc Plugin'''
  +
** http://mojo.codehaus.org/maven-springbeandoc-plugin/
  +
** Generates pretty reports for Spring configuration files.
  +
  +
* '''FreeMarker Pre Processor(FMPP) Plugin'''
  +
** http://code.google.com/p/freemarkerpp-maven-plugin/
  +
** Allows to process FreeMarker templates, inject data into those templates in order to produce code, artifacts, reports or anything desired.
  +
  +
* '''Bundle Plugin for Maven'''
  +
** http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
  +
  +
===Application servers support===
  +
  +
* '''JBoss Plugin'''
  +
** http://mojo.codehaus.org/jboss-maven-plugin/
  +
  +
* '''Jetty Plugin'''
  +
** http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
  +
** [http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html Configuring the Jetty Maven Plugin] (for Jetty 9 or higher)
  +
  +
===Eclipse support===
  +
  +
* '''M2Eclipse'''
  +
** http://www.eclipse.org/m2e/
  +
** provides tight integration for Apache Maven into the IDE
  +
  +
* '''Eclipse Plugin'''
  +
** http://maven.apache.org/plugins/maven-eclipse-plugin/
  +
  +
* '''Tycho'''
  +
** a set of Maven plugins and extensions for building Eclipse plugins and OSGi bundles with Maven.
  +
** http://www.eclipse.org/tycho/
  +
** http://www.eclipse.org/tycho/sitedocs/
  +
** [http://wiki.eclipse.org/Tycho/Reference_Card Tycho/Reference Card]
  +
** [http://wiki.eclipse.org/Tycho/Packaging_Types Tycho/Packaging Types]
  +
** [http://wiki.eclipse.org/Tycho/FAQ Tycho/FAQ]
  +
  +
* '''P2 Plugin'''
  +
** https://github.com/reficio/p2-maven-plugin
  +
** responsible for the automation of dependency management in the Eclipse RCP environment.
  +
  +
===misc===
  +
  +
* '''Swagger-maven-plugin'''
  +
** http://kongchen.github.io/swagger-maven-plugin/
  +
** Desc. : JAX-RS & SpringMVC supported maven build plugin, helps you generate Swagger JSON and API document in build phase.
  +
** Sources : https://github.com/kongchen/swagger-maven-plugin
  +
** Readings
  +
*** [https://tech.homeaway.com/development/2016/06/02/generating-swagger-spec.html Generating Swagger spec and enabling swagger-ui for REST based applications] (Jun 2, 2016)
  +
  +
* '''swagger-codegen-maven-plugin'''
  +
** https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin
  +
** Desc. : A Maven plugin to support the swagger code generation project
  +
  +
* '''Doxia Plugin'''
  +
** http://maven.apache.org/doxia/doxia/doxia-maven-plugin/
  +
  +
* '''Graphviz Plugin'''
  +
** http://graphviz-maven-plugin.bryon.us/
  +
** Desc. : Uses the Graphviz library to render .dot files into images.
  +
  +
* '''ProGuard Maven Plugin'''
  +
** http://wvengen.github.io/proguard-maven-plugin/
  +
** Desc. : Runs ProGuard as part of your Maven build.
  +
** Sources : https://github.com/wvengen/proguard-maven-plugin
  +
  +
* '''duplicate-finder Maven plugin'''
  +
** https://github.com/basepom/duplicate-finder-maven-plugin
  +
** Desc. : Maven plugin to find duplicate classes or resources
   
 
==Maven Skins==
 
==Maven Skins==
*Fluido skin : [http://code.google.com/p/fluido-skin/ http://code.google.com/p/fluido-skin/]<br />rounded corners and code syntax highlight
 
   
  +
* '''Fluido skin'''
  +
** http://code.google.com/p/fluido-skin/
  +
** rounded corners and code syntax highlight
   
 
==Readings==
 
==Readings==
 
===Sonatype books===
 
===Sonatype books===
  +
*[http://www.sonatype.com/books/mvnref-book/reference/public-book.html Maven the Complete Reference]
 
*[http://www.sonatype.com/books/m2eclipse-book/reference/ Developing with Eclipse and Maven]
+
* [https://books.sonatype.com/mvnref-book/reference/index.html Maven: The Complete Reference]
*[http://www.sonatype.com/books/mvnex-book/reference/public-book.html Maven by Example]
+
* [https://books.sonatype.com/mvnex-book/reference/index.html Maven by Example]
*[http://www.sonatype.com/books/mcookbook/reference/ Maven Cookbook]
+
* [http://books.sonatype.com/nexus-book/ Repository Management with Nexus]
  +
*[http://www.sonatype.com/books/nexus-book/reference/ Repository Management with Nexus]
 
  +
* [https://books.sonatype.com/mcookbook/pdf/mcookbook-pdf.pdf Maven Cookbook]
  +
* [http://www.sonatype.com/books/m2eclipse-book/reference/ Developing with Eclipse and Maven]
   
 
===Multi module project===
 
===Multi module project===
  +
 
* [http://maven.apache.org/guides/mini/guide-multiple-modules.html Guide to Working with Multiple Modules]
 
* [http://maven.apache.org/guides/mini/guide-multiple-modules.html Guide to Working with Multiple Modules]
 
* [http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html Multiple Module Projects with Eclipse]
 
* [http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html Multiple Module Projects with Eclipse]
Line 149: Line 331:
 
* [http://blog.sonatype.com/2009/10/maven-tips-and-tricks-advanced-reactor-options/#.U5qYjHJ_tqw Maven Tips and Tricks: Advanced Reactor Options] (October 6, 2009)
 
* [http://blog.sonatype.com/2009/10/maven-tips-and-tricks-advanced-reactor-options/#.U5qYjHJ_tqw Maven Tips and Tricks: Advanced Reactor Options] (October 6, 2009)
   
====Reporting====
+
===Testing===
  +
  +
* [http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html <code>surefire:test</code> documentation]
  +
** <code>environmentVariables</code>, <code>forkMode</code>, <code>argLine</code>
  +
* [http://stackoverflow.com/questions/15199768/maven-surefire-plugin-dlls-and-java-library-path maven-surefire-plugin, DLLs and java.library.path](Mar 4 '13)
  +
** <code>argLine</code>
  +
  +
===Reporting===
  +
 
* [http://maven.apache.org/plugins/maven-site-plugin/examples/multimodule.html#Aggregate_Reports Aggregate Reports]
 
* [http://maven.apache.org/plugins/maven-site-plugin/examples/multimodule.html#Aggregate_Reports Aggregate Reports]
 
* [http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.html Aggregating Javadocs For Multi-Projects]
 
* [http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.html Aggregating Javadocs For Multi-Projects]
 
* [http://mojo.codehaus.org/findbugs-maven-plugin/examples/multi-module-config.html Maven FindBugs Plugin/Multimodule Configuration]
 
* [http://mojo.codehaus.org/findbugs-maven-plugin/examples/multi-module-config.html Maven FindBugs Plugin/Multimodule Configuration]
  +
* [https://issues.apache.org/jira/browse/MSITE-443 add a reportingManagement section]
  +
** 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===
  +
*[http://maven.apache.org/guides/mini/guide-assemblies.html Guide to creating assemblies]
 
*[http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html Maven Assembly Descriptor Reference]
+
* [http://maven.apache.org/guides/mini/guide-assemblies.html Guide to creating assemblies]
*[http://www.sonatype.com/books/mvnref-book/reference/assemblies.html Maven the Complete Reference/Maven Assemblies]
+
* [http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html Maven Assembly Descriptor Reference]
  +
* [http://www.sonatype.com/books/mvnref-book/reference/assemblies.html Maven the Complete Reference/Maven Assemblies]
  +
* [https://maven.apache.org/plugins/maven-javadoc-plugin/faq.html#How_to_deploy_Javadoc_jar_file How to deploy Javadoc jar file?]
  +
** Actually, it doesn't use assembly externally.
   
 
===Maven snapshot repositories===
 
===Maven snapshot repositories===
Line 172: Line 368:
   
 
===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://maven.apache.org/plugins/maven-project-info-reports-plugin/ Maven Project Info Reports Plugin]
*[http://www.sonatype.com/books/mvnref-book/reference/site-generation-sect-site-appearance.html Customizing Site Appearance]
 
  +
* [http://www.sonatype.com/books/mvnref-book/reference/site-generation-sect-site-appearance.html Customizing Site Appearance]
*[http://maven.apache.org/doxia/modules/ Doxia Modules Guide]
 
*[http://code.google.com/p/doxia-module-markdown/ doxia-module-markdown]
+
* [http://maven.apache.org/doxia/modules/ Doxia Modules Guide]
  +
* [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)]
 
  +
* [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]
 
  +
* [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)]
 
  +
* [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]
 
  +
* [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===
  +
*[http://docs.codehaus.org/display/MAVEN/Refactoring+Interpolation POM Expression evaluation]
 
  +
* [http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide Maven Properties Guide]
  +
* [http://books.sonatype.com/mvnref-book/reference/resource-filtering-sect-properties.html#resource-filtering-sect-project-properties Maven Project Properties]
  +
* [http://docs.codehaus.org/display/MAVEN/Refactoring+Interpolation POM Expression evaluation]
  +
  +
* Built-in properties
  +
<syntaxhighlight lang="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
  +
</syntaxhighlight>
  +
  +
===m2e===
  +
  +
* [http://stackoverflow.com/questions/1705736/how-do-i-get-m2eclipse-to-recognize-m2-opts How do I get m2eclipse to recognize $M2_OPTS?]
  +
* [http://stackoverflow.com/questions/14728040/wtp-m2e-not-deploying-transitive-dependencies WTP - m2e not deploying transitive dependencies](Feb 6 '13)
  +
** A bug that is '''NOT''' resolved yet.
   
 
===misc===
 
===misc===
  +
 
* [http://stackoverflow.com/questions/2871054/set-plugins-version-on-the-command-line-in-maven-2 Set plugin’s version on the command line in maven 2]
 
* [http://stackoverflow.com/questions/2871054/set-plugins-version-on-the-command-line-in-maven-2 Set plugin’s version on the command line in maven 2]
* [http://maven.apache.org/plugins/maven-eclipse-plugin/examples/attach-library-sources.html Attach Library Sources and Javadocs]
+
* [http://maven.apache.org/plugins/maven-eclipse-plugin/examples/attach-library-sources.html Download library sources and javadocs]
 
** Guides to download sources and javadocs of artifacts
 
** Guides to download sources and javadocs of artifacts
 
* [http://www.sonatype.com/books/m2eclipse-book/reference/running-sect-running-maven-builds.html Defining custom Maven build command for any project.]
 
* [http://www.sonatype.com/books/m2eclipse-book/reference/running-sect-running-maven-builds.html Defining custom Maven build command for any project.]
Line 197: Line 432:
 
* [http://jira.codehaus.org/browse/MSITE-516 reportPlugins doesn't inherit more information from pluginManagement.]
 
* [http://jira.codehaus.org/browse/MSITE-516 reportPlugins doesn't inherit more information from pluginManagement.]
 
* [http://starobjects.sourceforge.net/m2-site/main/documentation/docbkx/html/developers-guide/developers-guide.html Naked Objects' Sister Projects 1.0: Developers Guide]
 
* [http://starobjects.sourceforge.net/m2-site/main/documentation/docbkx/html/developers-guide/developers-guide.html Naked Objects' Sister Projects 1.0: Developers Guide]
* [http://stackoverflow.com/questions/1705736/how-do-i-get-m2eclipse-to-recognize-m2-opts How do I get m2eclipse to recognize $M2_OPTS?]
 
 
* [http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-pom-syntax.html#pom-reationships-sect-versions Maven project versions]
 
* [http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-pom-syntax.html#pom-reationships-sect-versions Maven project versions]
 
* [http://stackoverflow.com/questions/4725668/how-to-deploy-snapshot-with-sources-and-javadoc How to deploy SNAPSHOT with sources and JavaDoc?]
 
* [http://stackoverflow.com/questions/4725668/how-to-deploy-snapshot-with-sources-and-javadoc How to deploy SNAPSHOT with sources and JavaDoc?]
 
** A little bit strange but it really works. But how about the release ?
 
** A little bit strange but it really works. But how about the release ?
 
* [http://blog.wakatta.jp/blog/2012/01/14/antlr3-maven-plugin-eclipse-setup/ ANTLR3 Maven Plugin - Eclipse Setup]
 
* [http://blog.wakatta.jp/blog/2012/01/14/antlr3-maven-plugin-eclipse-setup/ ANTLR3 Maven Plugin - Eclipse Setup]
  +
* [http://stackoverflow.com/questions/9115171/why-must-i-always-add-spring-project-nature-after-maven-update-project-config Why must I always “Add Spring project Nature” after Maven “Update Project Configuration” in Eclipse?] (Feb 2 '12)
  +
* [http://maven.apache.org/plugins/maven-eclipse-plugin/examples/ajdt-projects.html Including AJDT Projects into Workspace]
  +
* [http://stackoverflow.com/questions/9932923/why-cant-maven-find-an-osgi-bundle-dependency Why can't maven find an osgi bundle dependency?](Mar 29 '12)
  +
* [http://www.avajava.com/tutorials/lessons/how-do-i-update-my-classpath-with-an-eclipse-user-library-via-the-maven-eclipse-plugin.html How do I update my classpath with an Eclipse User Library via the maven eclipse plugin?]
  +
* [https://maven.apache.org/enforcer/enforcer-rules/requireJavaVersion.html How to enforces certain Java JDK versions]
   
  +
* [https://blog.progs.be/517/publishing-javadoc-to-github-using-maven '''Publishing javadoc to github using maven'''] (September 9, 2013)
   
==HOWTOs==
+
==Tips and Tricks==
  +
  +
===Simple POM===
  +
  +
<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>
  +
<groupId>thirdstage.exercise</groupId>
  +
<artifactId>rest</artifactId>
  +
<version>0.0.1-SNAPSHOT</version>
  +
  +
<prerequisites>
  +
<maven>3.0</maven>
  +
</prerequisites>
  +
  +
<name>Project Name</name>
  +
<description>...</description>
  +
  +
<developers>
  +
<developer>
  +
<id>3rdstage</id>
  +
<name>Sangmoon Oh</name>
  +
<email>halfface@chollian.net</email>
  +
</developer>
  +
</developers>
  +
  +
<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.8</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 -->
  +
<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.3.3</mockito.version> <!-- https://mvnrepository.com/artifact/org.mockito -->
  +
<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 -->
  +
<okhttp.version>4.3.1</okhttp.version>
  +
<!-- 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 -->
  +
<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>
  +
<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 -->
  +
<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>
  +
</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>
  +
<!-- codehaus.org has been effectively shut down as an artifact repository. -->
  +
<!-- <pluginRepository> -->
  +
<!-- <id>mojo-release</id> -->
  +
<!-- <url>http://repository.codehaus.org/</url> -->
  +
<!-- <releases> -->
  +
<!-- <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy> -->
  +
<!-- </releases> -->
  +
<!-- <snapshots> -->
  +
<!-- <enabled>false</enabled> -->
  +
<!-- </snapshots> -->
  +
<!-- </pluginRepository> -->
  +
<!-- <pluginRepository> -->
  +
<!-- <id>mojo-snapshot</id> -->
  +
<!-- <url>http://snapshots.repository.codehaus.org/</url> -->
  +
<!-- <releases> -->
  +
<!-- <enabled>false</enabled> -->
  +
<!-- </releases> -->
  +
<!-- <snapshots> -->
  +
<!-- <enabled>true</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.basepom.maven</groupId>
  +
<artifactId>duplicate-finder-maven-plugin</artifactId>
  +
<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>
  +
<ignoredDependencies>
  +
<dependency>
  +
<groupId>org.slf4j</groupId>
  +
<artifactId>jcl-over-slf4j</artifactId>
  +
</dependency>
  +
</ignoredDependencies>
  +
</configuration>
  +
</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 https://github.com/kongchen/swagger-maven-plugin -->
  +
<groupId>com.github.kongchen</groupId>
  +
<artifactId>swagger-maven-plugin</artifactId>
  +
<version>${swagger-maven-plugin.version}</version>
  +
<executions>
  +
<execution>
  +
<id>generate-swagger-api</id>
  +
<phase>process-classes</phase>
  +
<goals>
  +
<goal>generate</goal>
  +
</goals>
  +
</execution>
  +
</executions>
  +
</plugin>
  +
<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>
  +
<executions>
  +
<execution>
  +
<id>generate-rest-api-doc</id>
  +
<phase>process-classes</phase>
  +
<goals>
  +
<goal>generate</goal>
  +
</goals>
  +
<configuration>
  +
<inputSpec>${project.build.directory}/swagger.json</inputSpec>
  +
<language>html2</language>
  +
<output>${project.build.directory}/generated-sources/swagger/html2</output>
  +
</configuration>
  +
</execution>
  +
</executions>
  +
</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>
  +
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
  +
<!-- <javadocVersion>${java.version}</javadocVersion> -->
  +
<source>${java.version}</source>
  +
<maxmemory>256m</maxmemory>
  +
<!-- causes error with JDK 8 <additionalJOption>-Xms128m</additionalJOption> -->
  +
<additionalJOptions>--frames</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/8/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.1/api/</link>
  +
<link>http://www.javadoc.io/doc/org.slf4j/slf4j-api/${slf4j.version}/</link>
  +
<link>https://junit.org/junit5/docs/${junit5.version}/api/</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-${commons-collections4.version}/</link>
  +
<link>http://docs.swagger.io/swagger-core/v1.5.0/apidocs/</link>
  +
<link>https://javadoc.io/doc/org.web3j/core/${web3j.version}</link>
  +
<link>https://javadoc.io/doc/org.web3j/abi/${web3j.version}</link>
  +
<link>https://javadoc.io/doc/org.web3j/crypto/${web3j.version}</link>
  +
<link>https://javadoc.io/doc/org.web3j/utils/${web3j.version}</link>
  +
</links>
  +
<show>protected</show>
  +
<splitindex>true</splitindex>
  +
<stylesheet>java</stylesheet> <!-- 'java' (default) or 'maven' -->
  +
</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>
  +
<plugin>
  +
<groupId>org.basepom.maven</groupId>
  +
<artifactId>duplicate-finder-maven-plugin</artifactId>
  +
<version>${duplicate-finder-maven-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>
  +
</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</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>
  +
<groupId>org.codehaus.janino</groupId>
  +
<artifactId>janino</artifactId>
  +
<version>2.7.8</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>junit</groupId>
  +
<artifactId>junit</artifactId>
  +
<version>${junit.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.mockito</groupId>
  +
<artifactId>mockito-junit-jupiter</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>
  +
<!-- 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>
  +
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
  +
<!-- <javadocVersion>${java.version}</javadocVersion> -->
  +
<source>${java.version}</source>
  +
<maxmemory>256m</maxmemory>
  +
<!-- causes error with JDK 8 <additionalJOption>-Xms128m</additionalJOption> -->
  +
<additionalJOptions>--frames</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/8/docs/api/</link>
  +
<link>https://docs.oracle.com/javaee/7/api/</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>
  +
<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.1/api/</link>
  +
<link>http://www.javadoc.io/doc/org.slf4j/slf4j-api/${slf4j.version}/</link>
  +
<link>https://junit.org/junit5/docs/${junit5.version}/api/</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-${commons-collections4.version}/</link>
  +
<link>https://javadoc.io/doc/org.web3j/core/${web3j.version}</link>
  +
<link>https://javadoc.io/doc/org.web3j/abi/${web3j.version}</link>
  +
<link>https://javadoc.io/doc/org.web3j/crypto/${web3j.version}</link>
  +
<link>https://javadoc.io/doc/org.web3j/utils/${web3j.version}</link>
  +
</links>
  +
<show>protected</show>
  +
<splitindex>true</splitindex>
  +
<stylesheet>java</stylesheet> <!-- 'java' (default) or 'maven' -->
  +
</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>
  +
</dependencies>
  +
</project>
  +
</syntaxhighlight>
   
 
===Referencing Maven project properties of List type===
 
===Referencing Maven project properties of List type===
Line 210: Line 1,792:
   
 
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?
 
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?
<syntaxhighlight lang="java" line>
+
<syntaxhighlight lang="java" line enclose="div">
 
...
 
...
 
<artifact:pom id="this-pom" file="${basedir}/pom.xml"/>
 
<artifact:pom id="this-pom" file="${basedir}/pom.xml"/>
Line 220: Line 1,802:
 
...
 
...
 
</syntaxhighlight>
 
</syntaxhighlight>
 
   
 
===Build Lifecycle, Build Phase, Plugin and Goal===
 
===Build Lifecycle, Build Phase, Plugin and Goal===
Line 254: Line 1,835:
 
** 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.
 
** 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.
 
# Use resources in target/classes not in src/main/resources, considering resource filtering.
 
# Use resources in target/classes not in src/main/resources, considering resource filtering.
 
   
 
====Sample of parent POM in action====
 
====Sample of parent POM in action====
  +
 
<syntaxhighlight lang="xml" line enclose='div'>
 
<syntaxhighlight lang="xml" line enclose='div'>
 
<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">
Line 371: Line 1,952:
 
<id>central2</id>
 
<id>central2</id>
 
<url>http://repo2.maven.org/maven2/</url>
 
<url>http://repo2.maven.org/maven2/</url>
</pluginRepository>
 
<pluginRepository>
 
<snapshots>
 
<enabled>false</enabled>
 
</snapshots>
 
<id>mojo-release</id>
 
<url>http://repository.codehaus.org/</url>
 
</pluginRepository>
 
<pluginRepository>
 
<releases>
 
<enabled>false</enabled>
 
</releases>
 
<snapshots>
 
<enabled>true</enabled>
 
</snapshots>
 
<id>mojo-snapshot</id>
 
<url>http://snapshots.repository.codehaus.org/</url>
 
 
</pluginRepository>
 
</pluginRepository>
 
<pluginRepository>
 
<pluginRepository>
Line 682: Line 2,246:
 
<version>2.8</version>
 
<version>2.8</version>
 
<configuration>
 
<configuration>
  +
<!-- the next two item doesn't work on m2e. m2e has its own confgiruation in Eclipse preferences -->
 
<downloadSources>true</downloadSources>
 
<downloadSources>true</downloadSources>
 
<downloadJavaDocs>true</downloadJavaDocs>
 
<downloadJavaDocs>true</downloadJavaDocs>
Line 735: Line 2,300:
   
 
</syntaxhighlight>
 
</syntaxhighlight>
 
   
 
===Dependency on local library not in Maven repository and with no POM file===
 
===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.
 
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.
   
<syntaxhighlight lang="xml" line>
+
<syntaxhighlight lang="xml" line enclose='div'>
 
<dependencies>
 
<dependencies>
 
...
 
...
Line 756: Line 2,320:
   
 
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.
 
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===
 
===Escaping expression interpolation===
Line 762: Line 2,325:
   
 
For more refer this page : [http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#escapeString http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#escapeString]
 
For more refer this page : [http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#escapeString http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#escapeString]
 
   
 
===Working with Subversion working copy in format of ver. 1.7===
 
===Working with Subversion working copy in format of ver. 1.7===
 
The default configuration of [http://maven.apache.org/plugins/maven-release-plugin/ Maven release plugin](maven-release-plugin) up to ver. 2.2.2 or [http://maven.apache.org/scm/maven-scm-plugin/ 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.<br />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.
 
The default configuration of [http://maven.apache.org/plugins/maven-release-plugin/ Maven release plugin](maven-release-plugin) up to ver. 2.2.2 or [http://maven.apache.org/scm/maven-scm-plugin/ 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.<br />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.
   
<syntaxhighlight lang="xml" line>
+
<syntaxhighlight lang="xml" line enclose="div">
 
<plugin>
 
<plugin>
 
<groupId>org.apache.maven.plugins</groupId>
 
<groupId>org.apache.maven.plugins</groupId>
Line 818: Line 2,380:
 
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.
 
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.
   
<syntaxhighlight lang="text">
+
<syntaxhighlight lang="dos" enclose="div">
 
Caused by: org.apache.maven.shared.release.scm.ReleaseScmCommandException: Unable to commit files
 
Caused by: org.apache.maven.shared.release.scm.ReleaseScmCommandException: Unable to commit files
 
Provider message:
 
Provider message:
Line 837: Line 2,399:
 
*[http://mvnrepository.com/artifact/com.google.code.maven-scm-provider-svnjava/maven-scm-provider-svnjava Maven SCM Subversion Provider - Java Impl.]
 
*[http://mvnrepository.com/artifact/com.google.code.maven-scm-provider-svnjava/maven-scm-provider-svnjava Maven SCM Subversion Provider - Java Impl.]
 
*[http://svnkit.com/download.php svnkit download]
 
*[http://svnkit.com/download.php svnkit download]
 
   
 
===Release process===
 
===Release process===
Line 881: Line 2,442:
   
 
* [http://maven.apache.org/maven-release/maven-release-plugin/ Maven Release Plugin]
 
* [http://maven.apache.org/maven-release/maven-release-plugin/ Maven Release Plugin]
 
   
 
===Download a specific artifact using <code>mvn</code> command===
 
===Download a specific artifact using <code>mvn</code> command===
Line 888: Line 2,448:
   
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
# mvn org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=org.aspectj:aspectjweaver:1.8.1 -DrepoUrl=http://repo2.maven.org/maven2/
+
# 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=.
 
</syntaxhighlight>
 
</syntaxhighlight>
  +
  +
* References
  +
** [http://maven.apache.org/plugins/maven-dependency-plugin/get-mojo.html <code>dependency:get</code>]
   
 
====references====
 
====references====
Line 896: Line 2,459:
 
* [http://maven.apache.org/plugins/maven-dependency-plugin/get-mojo.html Maven Dependency plugin > <code>dependency:get</code>]
 
* [http://maven.apache.org/plugins/maven-dependency-plugin/get-mojo.html Maven Dependency plugin > <code>dependency:get</code>]
   
  +
===Using Maven and Eclipse for Scala/Java mixed project===
  +
  +
* Required tools and plugins
  +
** Scala IDE
  +
** m2eclipse-scala
  +
** scalatest-eclipse-plugin
  +
** scala-maven-plugin
  +
  +
* POM
  +
<syntaxhighlight lang="xml" line enclose="div" highlight="17-35,68-85">
  +
...
  +
  +
<properties>
  +
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  +
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  +
<java.version>1.7</java.version>
  +
<scala.version>2.11</scala.version>
  +
</properties>
  +
  +
<build>
  +
<plugins>
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-compiler-plugin</artifactId>
  +
</plugin>
  +
<plugin>
  +
<groupId>net.alchim31.maven</groupId>
  +
<artifactId>scala-maven-plugin</artifactId>
  +
<executions>
  +
<execution>
  +
<id>scala-compile</id>
  +
<phase>process-resources</phase>
  +
<goals>
  +
<goal>add-source</goal>
  +
<goal>compile</goal>
  +
</goals>
  +
</execution>
  +
<execution>
  +
<id>scala-test-compile</id>
  +
<phase>process-test-resources</phase>
  +
<goals>
  +
<goal>testCompile</goal>
  +
</goals>
  +
</execution>
  +
</executions>
  +
</plugin>
  +
</plugins>
  +
<pluginManagement>
  +
<plugins>
  +
<plugin>
  +
<groupId>org.apache.maven.plugins</groupId>
  +
<artifactId>maven-compiler-plugin</artifactId>
  +
<version>3.5.1</version>
  +
<configuration>
  +
<source>${java.version}</source>
  +
<target>${java.version}</target>
  +
</configuration>
  +
</plugin>
  +
<plugin>
  +
<groupId>net.alchim31.maven</groupId>
  +
<artifactId>scala-maven-plugin</artifactId>
  +
<version>3.2.2</version>
  +
<configuration>
  +
<source>${java.version}</source>
  +
<target>${java.version}</target>
  +
<scalaVersion>${scala.version}</scalaVersion>
  +
<sourceDir>${project.build.sourceDirectory}/../scala</sourceDir>
  +
<testSourceDir>${project.build.testSourceDirectory}/../scala</testSourceDir>
  +
</configuration>
  +
</plugin>
  +
<plugin>
  +
<groupId>org.eclipse.m2e</groupId>
  +
<artifactId>lifecycle-mapping</artifactId>
  +
<version>1.0.0</version>
  +
<configuration>
  +
<lifecycleMappingMetadata>
  +
<pluginExecutions>
  +
<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>
  +
<execute>
  +
<runOnConfiguration>true</runOnConfiguration>
  +
<runOnIncremental>true</runOnIncremental>
  +
</execute>
  +
</action>
  +
</pluginExecution>
  +
</pluginExecutions>
  +
</lifecycleMappingMetadata>
  +
</configuration>
  +
</plugin>
  +
</plugins>
  +
</pluginManagement>
  +
</build>
  +
  +
<dependencies>
  +
<dependency>
  +
<groupId>org.scalactic</groupId>
  +
<artifactId>scalactic_${scala.version}</artifactId>
  +
<version>2.2.6</version>
  +
</dependency>
  +
<dependency>
  +
<groupId>org.scalatest</groupId>
  +
<artifactId>scalatest_${scala.version}</artifactId>
  +
<version>2.2.6</version>
  +
<scope>test</scope>
  +
</dependency>
  +
</dependencies>
  +
  +
...
  +
</syntaxhighlight>
   
 
===Simple tips and troubleshooting===
 
===Simple tips and troubleshooting===
Line 905: Line 2,587:
   
 
*[http://jira.codehaus.org/browse/MJAR-97 Using <addClasspath> when you have no dependencies fails with FileNotFoundException]<br />Configuring to add classpath to MANIFEST file can cause unreasonable exception when running maven-jar-plugin without compile or run-time scope dependency. If you run package with -X option, you can identify exception whose stack goes like this.
 
*[http://jira.codehaus.org/browse/MJAR-97 Using <addClasspath> when you have no dependencies fails with FileNotFoundException]<br />Configuring to add classpath to MANIFEST file can cause unreasonable exception when running maven-jar-plugin without compile or run-time scope dependency. If you run package with -X option, you can identify exception whose stack goes like this.
<syntaxhighlight lang="text">
+
<syntaxhighlight lang="dos" enclose="div">
 
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
 
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:217)

Revision as of 06:39, 18 May 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

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>thirdstage.exercise</groupId>
  <artifactId>rest</artifactId>
  <version>0.0.1-SNAPSHOT</version>

  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <name>Project Name</name>
  <description>...</description>

  <developers>
    <developer>
      <id>3rdstage</id>
      <name>Sangmoon Oh</name>
      <email>halfface@chollian.net</email>
    </developer>
  </developers>

  <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.8</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 -->
    <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.3.3</mockito.version> <!-- https://mvnrepository.com/artifact/org.mockito -->
    <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 -->
    <okhttp.version>4.3.1</okhttp.version>
    <!-- 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 -->
    <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>
    <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 -->
    <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>
  </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>
    <!-- codehaus.org has been effectively shut down as an artifact repository. -->
    <!-- <pluginRepository> -->
    <!-- <id>mojo-release</id> -->
    <!-- <url>http://repository.codehaus.org/</url> -->
    <!-- <releases> -->
    <!-- <updatePolicy>${dependencies.release.updatePolicy}</updatePolicy> -->
    <!-- </releases> -->
    <!-- <snapshots> -->
    <!-- <enabled>false</enabled> -->
    <!-- </snapshots> -->
    <!-- </pluginRepository> -->
    <!-- <pluginRepository> -->
    <!-- <id>mojo-snapshot</id> -->
    <!-- <url>http://snapshots.repository.codehaus.org/</url> -->
    <!-- <releases> -->
    <!-- <enabled>false</enabled> -->
    <!-- </releases> -->
    <!-- <snapshots> -->
    <!-- <enabled>true</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.basepom.maven</groupId>
        <artifactId>duplicate-finder-maven-plugin</artifactId>
        <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>
          <ignoredDependencies>
            <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>jcl-over-slf4j</artifactId>
            </dependency>
          </ignoredDependencies>
        </configuration>
      </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 https://github.com/kongchen/swagger-maven-plugin -->
          <groupId>com.github.kongchen</groupId>
          <artifactId>swagger-maven-plugin</artifactId>
          <version>${swagger-maven-plugin.version}</version>
          <executions>
            <execution>
              <id>generate-swagger-api</id>
              <phase>process-classes</phase>
              <goals>
                <goal>generate</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <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>
          <executions>
            <execution>
              <id>generate-rest-api-doc</id>
              <phase>process-classes</phase>
              <goals>
                <goal>generate</goal>
              </goals>
              <configuration>
                <inputSpec>${project.build.directory}/swagger.json</inputSpec>
                <language>html2</language>
                <output>${project.build.directory}/generated-sources/swagger/html2</output>
              </configuration>
            </execution>
          </executions>
        </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>
            <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
            <!--  <javadocVersion>${java.version}</javadocVersion> -->
            <source>${java.version}</source>
            <maxmemory>256m</maxmemory>
            <!-- causes error with JDK 8 <additionalJOption>-Xms128m</additionalJOption> -->
            <additionalJOptions>--frames</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/8/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.1/api/</link>
              <link>http://www.javadoc.io/doc/org.slf4j/slf4j-api/${slf4j.version}/</link>
              <link>https://junit.org/junit5/docs/${junit5.version}/api/</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-${commons-collections4.version}/</link>
              <link>http://docs.swagger.io/swagger-core/v1.5.0/apidocs/</link>
              <link>https://javadoc.io/doc/org.web3j/core/${web3j.version}</link>
              <link>https://javadoc.io/doc/org.web3j/abi/${web3j.version}</link>
              <link>https://javadoc.io/doc/org.web3j/crypto/${web3j.version}</link>
              <link>https://javadoc.io/doc/org.web3j/utils/${web3j.version}</link>
            </links>
            <show>protected</show>
            <splitindex>true</splitindex>
            <stylesheet>java</stylesheet> <!-- 'java' (default) or 'maven' -->
          </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>
        <plugin>
          <groupId>org.basepom.maven</groupId>
          <artifactId>duplicate-finder-maven-plugin</artifactId>
          <version>${duplicate-finder-maven-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>
              </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</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>
      <groupId>org.codehaus.janino</groupId>
      <artifactId>janino</artifactId>
      <version>2.7.8</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.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.mockito</groupId>
      <artifactId>mockito-junit-jupiter</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>
    <!-- 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>

Typical POM for Spring Boot Project

<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>
            <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
            <!--  <javadocVersion>${java.version}</javadocVersion> -->
            <source>${java.version}</source>
            <maxmemory>256m</maxmemory>
            <!-- causes error with JDK 8 <additionalJOption>-Xms128m</additionalJOption> -->
            <additionalJOptions>--frames</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/8/docs/api/</link>
              <link>https://docs.oracle.com/javaee/7/api/</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>
              <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.1/api/</link>
              <link>http://www.javadoc.io/doc/org.slf4j/slf4j-api/${slf4j.version}/</link>
              <link>https://junit.org/junit5/docs/${junit5.version}/api/</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-${commons-collections4.version}/</link>
              <link>https://javadoc.io/doc/org.web3j/core/${web3j.version}</link>
              <link>https://javadoc.io/doc/org.web3j/abi/${web3j.version}</link>
              <link>https://javadoc.io/doc/org.web3j/crypto/${web3j.version}</link>
              <link>https://javadoc.io/doc/org.web3j/utils/${web3j.version}</link>
            </links>
            <show>protected</show>
            <splitindex>true</splitindex>
            <stylesheet>java</stylesheet> <!-- 'java' (default) or 'maven' -->
          </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>
  </dependencies>
</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?

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

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

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <groupId>thridstage</groupId>
  <artifactId>thridstage-framework-parent</artifactId>
  <version>3.0.0-SNAPSHOT</version>
  <packaging>pom</packaging>

  <name>Thirdstage Framework</name>
  <url>...</url>
  <inceptionYear>2012</inceptionYear>
  <organization>
    <name>...</name>
    <url>...</url>
  </organization>

  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <graphviz.home>${env.GRAPHVIZ_HOME}</graphviz.home>
    <skipTests>false</skipTests>
    <maven.deploy.skip>true</maven.deploy.skip>
    <maven.javadoc.skip>false</maven.javadoc.skip>
    <maven.site.deploy.skip>true</maven.site.deploy.skip>
    <findbugs.skip>true</findbugs.skip>
    <checkstyle.skip>true</checkstyle.skip>
    <dependency.locations.enabled>false</dependency.locations.enabled>
    <antrun.echos.properties>true</antrun.echos.properties>
    <scm.url.base>...</scm.url.base>
  </properties>

  <issueManagement>
    <system>Redmine</system>
    <url>.../issues</url>
  </issueManagement>
  <scm>
    <connection>scm:svn:http:...</connection>
    <url>http:...</url>
  </scm>
  <distributionManagement>
    <repository>
      <id>...</id>
      <name>...</name>
      <url>...</url>
    </repository>
    <snapshotRepository>
      <id>...</id>
      <name>...</name>
      <url>...</url>
    </snapshotRepository>
    <site>
      <id>...</id>
      <url>sftp://.../${project.version}</url>
    </site>
  </distributionManagement>

  <repositories>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>thirdstag-releases</id>
      <url>...</url>
    </repository>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>thirdstage-snapshots</id>
      <url>...</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central2</id>
      <url>http://repo2.maven.org/maven2/</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>maven2-repository.dev.java.net</id>
      <name>Java.net Repository for Maven</name>
      <url>http://download.java.net/maven/2/</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>thirdparty</id>
      <name>3rd-party Repository</name>
      <url>http://repo.expertvill.net/nexus/content/repositories/thirdparty</url>
    </repository>
    <repository>
      <id>evolvis-3rdparty</id>
      <url>http://maven-repo.evolvis.org/3rdparty</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central2</id>
      <url>http://repo2.maven.org/maven2/</url>
    </pluginRepository>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>spring-beandoc</id>
      <url>http://spring-beandoc.sourceforge.net/repo</url>
    </pluginRepository>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>tmatesoft-releases</id>
      <url>http://maven.tmatesoft.com/content/repositories/releases/</url>
    </pluginRepository>
    <pluginRepository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <id>tmatesoft-snapshots</id>
      <url>http://maven.tmatesoft.com/content/repositories/snapshots/</url>
    </pluginRepository>
    <pluginRepository>
      <id>evolvis-3rdparty</id>
      <url>http://maven-repo.evolvis.org/3rdparty</url>
    </pluginRepository>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>elca-services</id>
      <url>http://el4.elca-services.ch/el4j/maven2repository</url>
    </pluginRepository>
  </pluginRepositories>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <configLocation>../thirdstage.framework.parent/src/main/config/checkstyle/checkstyle.xml</configLocation>
          <propertyExpansion>parent.basedir=../thirdstage.framework.parent</propertyExpansion>
          <failsOnError>false</failsOnError>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <effort>Max</effort>
          <threshold>Low</threshold>
          <onlyAnalyze>thirdstage.framework.*</onlyAnalyze>
          <excludeFilterFile>../thirdstage.framework.parent/src/main/config/findbugs/findbugs-exclude.xml</excludeFilterFile>
          <fork>true</fork>
          <timeout>600000</timeout>
          <maxHeap>512</maxHeap>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>validate-properties</id>
            <phase>validate</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <failOnError>true</failOnError>
              <target name="validate-properties">
                <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="maven.plugin.classpath" />

                <if name="antrun.echos.properties" value="true">
                  <echo>Head revision of the project "${project.artifactId}" is
                    ${project.svn.revision}.</echo>
                  <echo>project.artifactId : ${project.artifactId}</echo>
                  <echo>project.basedir : ${project.basedir}</echo>
                  <echo>project.resources.0.directory : ${project.resources.0.directory}</echo>
                  <echo>project.resources[0].directory : ${project.resources[0].directory}</echo>
                  <echo>project.parent : ${project.parent}</echo>
                  <echo>project.parent.groupId : ${project.parent.groupId}</echo>
                  <echo>project.parent.artifactId : ${project.parent.artifactId}</echo>
                  <echo>project.parent.relativePath :
                    ${project.parent.relativePath}</echo>

                  <pathconvert pathsep="${line.separator}" property="classpath.maven.plugin" refid="maven.plugin.classpath" />

                  <pathconvert pathsep="${line.separator}" property="classpath.maven.compile" refid="maven.compile.classpath" />
                  <echo />
                  <echo>Compile-time classpath for Maven :</echo>
                  <echo>${classpath.maven.compile}</echo>

                  <pathconvert pathsep="${line.separator}" property="classpath.maven.runtime" refid="maven.runtime.classpath" />
                  <echo />
                  <echo>Run-time classpath for Maven :</echo>
                  <echo>${classpath.maven.runtime}</echo>

                  <echo>Check Korean output : 한글이 정상적으로 보이나요?</echo>
                  
                  <!-- echo all properties passed to Ant and environment variables prefixed with 'env' -->
                  <echo>All properties given to Ant are : </echo>
                  <property environment="env" />
                  <echoproperties />
                </if>
              </target>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>ise.antelope</groupId>
            <artifactId>ant-antelope-tasks</artifactId>
            <version>3.5.0</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <!-- 
          @fixme javaHome doesn't seem to work as is explained.
          You should specify JAVA_HOME env. variable explicitly in your run configuration when running from 
          Eclipse.
           -->
          <!--  <javaHome>c:\lang\jdk1.5</javaHome> -->
          
          <!--  <mavenHome>C:\tools\maven-3.0.3</mavenHome> -->
          <tagBase>${scm.url.base}/main/tags</tagBase>
          <tagNameFormat>@{project.version}</tagNameFormat>
          <username>OhSangMoon</username>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <pomFileName>pom.xml</pomFileName>
          <arguments>-f pom.xml</arguments>
          
          <!--  not supported by release plugin oer 2.2.2
          <generateReleasePoms>true</generateReleasePoms>
          -->
        </configuration>
      </plugin>

    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <inherited>true</inherited>
          <configuration>
            <source>1.5</source>
            <target>1.5</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.0</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.wagon</groupId>
              <artifactId>wagon-ssh</artifactId>
              <version>2.0</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <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>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.8</version>
          <configuration>
            <docencoding>${project.reporting.outputEncoding}</docencoding>
            <encoding>${project.build.sourceEncoding}</encoding>
            <links>
              <link>http://download.oracle.com/javase/1.5.0/docs/api/</link>
              <link>http://download.oracle.com/javaee/5/api/</link>
            </links>
            <show>projected</show>
            <splitindex>true</splitindex>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.7</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.ant</groupId>
              <artifactId>ant</artifactId>
              <version>1.8.2</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.2.2</version>
          <configuration>
            <providerImplementations>
              <svn>javasvn</svn>
            </providerImplementations>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
              <artifactId>maven-scm-provider-svnjava</artifactId>
              <version>1.15</version>
            </dependency>
            <dependency>
              <groupId>org.tmatesoft.svnkit</groupId>
              <artifactId>svnkit</artifactId>
              <version>1.7.0-SNAPSHOT</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.6</version>
          <configuration>
            <providerImplementations>
              <svn>javasvn</svn>
            </providerImplementations>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
              <artifactId>maven-scm-provider-svnjava</artifactId>
              <version>1.15</version>
            </dependency>
            <dependency>
              <groupId>org.tmatesoft.svnkit</groupId>
              <artifactId>svnkit</artifactId>
              <version>1.7.0-SNAPSHOT</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.4</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <version>2.8</version>
          <configuration>
            <!-- the next two item doesn't work on m2e. m2e has its own confgiruation in Eclipse preferences -->
            <downloadSources>true</downloadSources>
            <downloadJavaDocs>true</downloadJavaDocs>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>properties-maven-plugin</artifactId>
          <version>1.0-alpha-2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>maven-springbeandoc-plugin</artifactId>
          <version>1.0.8-SNAPSHOT</version>
        </plugin>
        <plugin>
          <groupId>com.google.code.maven-svn-revision-number-plugin</groupId>
          <artifactId>maven-svn-revision-number-plugin</artifactId>
          <version>1.7</version>
          <executions>
            <execution>
              <phase>validate</phase>
              <goals>
                <goal>revision</goal>
              </goals>
              <configuration>
                <entries>
                  <entry>
                    <path>${project.basedir}</path>
                    <prefix>project.svn</prefix>
                    <depth>infinity</depth>
                    <reportUnversioned>true</reportUnversioned>
                    <reportIgnored>false</reportIgnored>
                    <reportOutOfDate>false</reportOutOfDate>
                  </entry>
                </entries>
              </configuration>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.tmatesoft.svnkit</groupId>
              <artifactId>svnkit</artifactId>
              <version>1.7.0-SNAPSHOT</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</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.

<dependencies>
  ...
  <dependency>
    <groupId>unknown</groupId>
    <artifactId>abcd</artifactId>
    <version>1.0</version>
    <type>jar</type>
    <scope>system</scope>
    <systemPath>${project.basedir}/lib/abcd.jar</systemPath>
  </dependency>
  ...
</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.

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-release-plugin</artifactId>
   <version>2.2.2</version>
   <configuration>
      <providerImplementations>
         <svn>javasvn</svn>
      </providerImplementations>
   </configuration>
   <dependencies>
      <dependency>
         <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
         <artifactId>maven-scm-provider-svnjava</artifactId>
         <version>1.15</version>
      </dependency>
      <dependency>
         <groupId>org.tmatesoft.svnkit</groupId>
         <artifactId>svnkit</artifactId>
         <version>1.7.0-SNAPSHOT</version>
      </dependency>                
   </dependencies>
</plugin>
<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-scm-plugin</artifactId>
   <version>1.6</version>
   <configuration>
      <providerImplementations>
         <svn>javasvn</svn>
      </providerImplementations>
   </configuration>
   <dependencies>
      <dependency>
         <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
         <artifactId>maven-scm-provider-svnjava</artifactId>
         <version>1.15</version>
      </dependency>
      <dependency>
         <groupId>org.tmatesoft.svnkit</groupId>
         <artifactId>svnkit</artifactId>
         <version>1.7.0-SNAPSHOT</version>
      </dependency>                
   </dependencies>
</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
    • resume = false
    • maven.home = ${env_var:MAVEN_HOME}
  6. Check that all pom.xml.tag, pom.xml.next, pom.xml.backup files are deleted.
  7. Run 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
  ...

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.7</java.version>
    <scala.version>2.11</scala.version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>scala-compile</id>
            <phase>process-resources</phase>
            <goals>
              <goal>add-source</goal>
              <goal>compile</goal>
            </goals>
          </execution>
          <execution>
            <id>scala-test-compile</id>
            <phase>process-test-resources</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.5.1</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>net.alchim31.maven</groupId>
          <artifactId>scala-maven-plugin</artifactId>
          <version>3.2.2</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
            <scalaVersion>${scala.version}</scalaVersion>
            <sourceDir>${project.build.sourceDirectory}/../scala</sourceDir>
            <testSourceDir>${project.build.testSourceDirectory}/../scala</testSourceDir>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <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>
                    <execute>
                      <runOnConfiguration>true</runOnConfiguration>
                      <runOnIncremental>true</runOnIncremental>
                    </execute>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.scalactic</groupId>
      <artifactId>scalactic_${scala.version}</artifactId>
      <version>2.2.6</version>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_${scala.version}</artifactId>
      <version>2.2.6</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  ...

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)