Questions tagged [maven-versions-plugin]

50 questions
32
votes
2 answers

Include git commit hash in jar version

I'm using maven and my goal is to include the git commit hash in the version number. Something like : 1.1.{git_hash}. I'm trying to follow this tutorial. Q: is it possible to somehow override the version number specified in the version element of…
Herr Kater
  • 3,242
  • 2
  • 22
  • 33
6
votes
2 answers

Maven update version of specific dependency

I am trying to update the version of particular dependency in my Spring Boot project using the below command. However the dependency version is not getting updated. This is the command I am using: mvn versions:use-latest-snapshots…
Suresh
  • 515
  • 1
  • 8
  • 21
5
votes
3 answers

Gradle equivalent of maven-versions-plugin

This is my build.gradle: group 'whatever' version '1.0.0-SNAPSHOT' ... dependencies { compile 'whatever:2.2.1-SNAPSHOT' } I want to automate releasing process, which includes the need to set both versions to particular values, e.g. 1.1.0 or…
4
votes
1 answer

When is the right time to update a major version and not minor version in your pom?

I have a utility service x which is in maven repo and is used by some of my other services. We normally update the minor version of the service x when we make small changes and we are currently on version 1.0.15. No I am making another change and I…
4
votes
5 answers

Change version of Maven project without manipulating the POM file

Is it somehow possible to change the version of a Maven project without manipulating the POM file? Let's say I have a Maven project with version 1.5.0-SNAPSHOT but I want to build it as 1.5.46. The Versions Maven Plugin unfortunately modifies the…
Harold L. Brown
  • 8,423
  • 11
  • 57
  • 109
3
votes
1 answer

versions:use-releases for properties

As I understand, versions:use-releases does not update properties that are used to define versions in dependencies. Is it possible to update these properties as well? I saw that we have a versions:update-properties, but it is meant to update…
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
2
votes
0 answers

Maven - display-dependency-updates- list transitive dependency versions

I'd like to be able to see if any of the dependencies of my project - including transitive ones - have updates available. Take the following pom.xml:
Jakg
  • 922
  • 12
  • 39
2
votes
0 answers

Versions Maven Plugin : do not update to last release available

Let's consider I have a dependency in my pom.xml like this : mygroupid myartifactid 1.0-SNAPSHOT For each build, I'd like the version of this dependency…
2
votes
2 answers

Maven parent version ${revision} expansion in cross project inheritance

Background: I'm using maven 3.5 and have a 'master' aggregator project which has 4 modules (uses both aggregation and inheritance). I also have 30 separate child projects, both single and multi-module, which each inherit from one of those 4…
2
votes
0 answers

Maven Versions Plugin - Exclude Major Version With Suffix

I am implementing the Maven versions plugin to manage our dependencies, but am having trouble excluding the next Spring major release due to the ".RELEASE" suffix. Here's a snippet of my pom.xml:
Jason
  • 3,943
  • 12
  • 64
  • 104
2
votes
1 answer

Getting bad substitution error when bumping up version using maven versions plugin in Jenkins pipeline

I get a bad substitution error when I run this command in my jenkins pipeline sh 'mvn build-helper:parse-version versions:set \ -DnewVersion=${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.nextIncrementalVersion}-SNAPSHOT…
2
votes
1 answer

Does the Maven Versions Plugin read rules also from classpath?

The Maven Versions Plugin supports the defintion of rules to customize the version resolution process for goals as versions:display-plugin-updates or versions:display-dependency-updates. The location of the rules file can be specified by the…
Oliver
  • 3,815
  • 8
  • 35
  • 63
2
votes
0 answers

Maven BOM file multi module project

With Maven BOM (Bill of materials) file I could able to use dependencies without defining versions of dependencies in POMs by importing this BOM as below
changeme
  • 640
  • 2
  • 12
  • 36
2
votes
1 answer

Maven Versions Plugin ignoring releases in releases repo

I'm trying to use the Maven Versions plugin but am blocked by an issue that is causing the plugin to not locate release artefacts in the company release artefact repository. A section of a test POM that demonstrates the issue…
1
vote
0 answers

Auto increment the minor version for Ant build/version.properties and setting it in gitlab-ci.yml

We are using the ant build tool in our project. We have build.xml and stored the properties in build/version.properties. I am facing issues in task setting up a minor version from build.properties to GitLab-ci.yml. I want this minor version to…
1
2 3 4