Maven archetype for a java 11 project setup with base test dependencies.
Java 11 base application.
clone this project, build and install into your local maven repository with this command:
mvn clean install
Then you can use the archetype to generate a new Java11 project in any directory using this command:
mvn archetype:generate \
-DarchetypeGroupId=io.github.spenceuk \
-DarchetypeArtifactId=java11-basic-archetype \
-DarchetypeVersion=<latest version number>
- Junit 5
- AssertJ
- Mockito
- general GitIgnore file generated using gitignore.io
- checkstyle with google java style
Automatically update license header and copyright header in each src file, default license is:
- MIT License
Easily changed in the POM select from a list of available licenses.
To see what is available:
mvn license:license-list
To see the license details:
mvn license:license-list -Ddetail
To deploy SNAPSHOT:
mvn deploy
To update version number:
mvn versions:set -DnewVersion=1.2.3
To deploy a RELEASE:
mvn clean deploy -P release
To deploy with SCM managed:
mvn release:clean release:prepare
answer relase and tag prompts and then to RELEASE:
mvn release:perform
mvn release:rollback
mvn release:clean
required settings file in your .m2 folder locally:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>ossrh</id>
<username>your-jira-id</username>
<password>your-jira-pwd</password>
</server>
</servers>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg2</gpg.executable>
<gpg.passphrase>the_pass_phrase</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>