-
-
Notifications
You must be signed in to change notification settings - Fork 44
Introduce jgitver maven plugin in existing project
Matthieu Brouillard edited this page Dec 14, 2016
·
3 revisions
Introducing jgitver-maven-plugin into an existing project is easy.
Let's suppose you use SNAPSHOTS
for your project and that your latest released version is 2.4.0
(see bottom page for a project [example|#project-example]).
mvn archetype:generate -B \
-DarchetypeCatalog=internal \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DarchetypeArtifactId=maven-archetype-quickstart \
-DarchetypeVersion=1.1 \
-DgroupId=fr.brouillard.jgitver.demos \
-DartifactId=demo2 \
-Dpackage=fr.brouillard.jgitver.demos \
-Dversion=1.0.0-SNAPSHOT
cd demo2
git init
git config user.name Bob TheBuilder
git config user.email bobthebuilder@nowhere.com
echo "target/" > .gitignore
echo "Init" > actions
git add .
git commit -m "initial commit"
mvn versions:set -DnewVersion=1.0.0 && mvn versions:clean
git add -u
git commit -m "release 1.0.0"
mvn versions:set -DnewVersion=2.4.0-SNAPSHOT && mvn versions:clean
echo "Some action for 2.4.0-SNAPSHOT" >> actions
git add -u
git commit -m "switch to 2.4.0-SNAPSHOT"
mvn versions:set -DnewVersion=2.4.0 && mvn versions:clean
git add -u
git commit -m "release 2.4.0"
mvn versions:set -DnewVersion=2.4.1-SNAPSHOT && mvn versions:clean
git add -u
git commit -m "switch to 2.4.1-SNAPSHOT"
Usage guide
- Starting from scratch
- Introduce jgitver-maven-plugin in existing project
- Use a lightweight tag to change project version
IDE usage
Continuous integration
- native GIT aware travis-ci circle-ci
- jenkins integration multibranch pipeline
- continuous deployment - semi automated
- automatic builds for maven, jenkins and gitbucket
Developer & contributions guide