Simplest way to generate version string for Maven package from Git branch
I want to automate the version string generation for release builds of my Java project. My pom.xml has a <version>${my-version-property}</version
tag and the Git branch is called e.g. release/1.0.2
. How do I extract “1.0.2” from the branch name, so that I can use it as a property in downstream project dependency tags and in the <finalName>
for the maven-war-plugin?
How to copy external directory into the project build / output zip file?
I’m using maven have used assembly plugins in my project to build the different artefact for Dev, SIT, UAT and Prod.
How to copy external directory into the project build / output zip file?
I’m using maven have used assembly plugins in my project to build the different artefact for Dev, SIT, UAT and Prod.
Change Maven Repository Order
Our enterprise team maintains a settings.xml file that defines various repositories that development teams can use with Maven to build their artifacts.
Maven repository URLs changed – resolution of transitive dependencies
Our DOAAS provider (in-house) previously had Nexus and for some reason decided to use “nexus” in the URL to the repositories.
How to exclude temporary files from being packed into JAR by Maven?
If I run mvn package
, while a file — such as src/main/resources/log4j2.xml
— is open in gvim, Maven will copy the .log4j2.xml.swp
into target/classes/
and then bundle it in the target JAR.