this common pom file,may project parent pom,
avoid the hassle of repeatedly configuring many maven plugin,
It can help you quickly publish projects to GitHub and Maven Central Repository.
Reference to current project examples:
before use this pom profile,you need config maven setting.xml
1.setting.xml sonatype-repository config:
2.setting.xml gpg passphrase config:
release project to Maven Central Repository command line:
1.release prepare command line examples:
mvn release:prepare
-DreleaseVersion=0.0.2.beta2
-DdevelopmentVersion=0.0.2.beta3-SNAPSHOT
-Dtag=common-pom.0.0.2.beta2
-P public-release
if your project include child module,you need use command line
mvn release:prepare-with-pom
-DreleaseVersion=0.0.2.beta2
-DdevelopmentVersion=0.0.2.beta3-SNAPSHOT
-Dtag=common-pom.0.0.2.beta2
-P public-release
2.next:release perform command line examples:
mvn release:perform -P public-release
you can override properties property value, update default version or configuration value in your project, if
you need do it.
examples:
more docs:
maven
maven-release-plugin
maven-nexus-stging-plugin