Modern Maven Pom Templates
Every time I make a new proper project using Maven hosted on Github I have to go look at either one of my own old projects and copy the pom file or I go find a project that I think does a good job and copy there POM file. Then I have to go search and replace things like project name... etc. Now Maven has a solution to this through archetypes but I have yet to see one that is modern enough such that it: Uses the release plugin and deploys to SonaType Central Maven reop. Connects to Github (meaning the scm connections and release plugin work do the right thing) Makes all three jar artifacts (sources, javadoc, and regular jar) I have contemplated make some giter8 templates but was hoping somebody already did something like this (most of the g8 templates are for sbt).
You can use com.jcabi:parent:pom which does exactly what you need and many more. It deploys to Sonatype, defines common dependencies with versions, pre-configures most popular plugins, and defines a few useful profiles. This article explains more: Don't Repeat Yourself in Maven POMs; Use Jcabi-Parent
You could have a look at the parent pom released by Sonatype. It's intended to be used as a parent pom for projects that deploy to oss.sonatype.org (which may or may not be promoted to Maven Central). When the sonatype-oss-release profile is enabled, it will ensure that sources and javadocs are built. It also includes an example of the <scm> pom element.
It turns out its incredible easy to create your own maven archetype. Just make a generic project with stuff you like to use In the project directory run mvn archetype:create-from-project Generally Maven guesses the right things to make variable but if not you just edit the Velocity templates. Install your archetype locally with mvn install To use your new archetype: mvn archetype:generate -DarchetypeGroupId=com.mygroup -DarchetypeArtifactId=my-archetype Now the only caveat is that there is not very good doc on the web that I could find on the archetype system. Like its unclear what variables you have available to you for Velocity (although most of them are obvious). http://maven.apache.org/archetype/maven-archetype-plugin/create-from-project-mojo.html
Debug Jar that is a Maven Dependency to a Main Project
Can surefire and failsafe plugin deliberately randomize execution order of test classes?
What are “optional” Maven dependencies? [closed]
Cobertura code coverage for failed tests
amazon aws artifacts could not be resolved
difference between “dependency information” and “dependencies” in the auto-generated site
How to set parameters from console to own maven report plugin
Maven Plugin Logging
How to do continuous integration with Hudson for Maven 3 multi-module projects well?
How to pause a maven build inbetween?
Supporting DocBook olink in Maven Project
Maven jaxws plugin fails with java.lang.UnsupportedClassVersionError: Bad version number in .class file
Maven override properties from command line does for child modules cross reference
How to deploy a parent pom file without executing plugins
TestNG specific testsuite not running
cygwin maven rpm “Segmentation fault”