maven-versions-plugin

versions:use-releases for properties

爷,独闯天下 提交于 2020-05-11 02:54:03
问题 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 versions to the latest versions, not just replace Snapshots by releases. An example: Assume you have dependency like <dependency> <groupId>de.something</groupId> <artifactId>coutil</artifactId> <version>${coutil.version}</version> </dependency> and

versions:use-releases for properties

。_饼干妹妹 提交于 2020-05-11 02:52:07
问题 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 versions to the latest versions, not just replace Snapshots by releases. An example: Assume you have dependency like <dependency> <groupId>de.something</groupId> <artifactId>coutil</artifactId> <version>${coutil.version}</version> </dependency> and

Cannot access parsedVersion value in pom properties

邮差的信 提交于 2020-01-16 01:17:26
问题 i am using the maven plugin: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <id>parse-version</id> <goals> <goal>parse-version</goal> </goals> </execution> </executions> </plugin> to parse the project version. It works fine: [INFO] --- build-helper-maven-plugin:3.0.0:parse-version (parse-version) [INFO] [INFO] --- maven-antrun-plugin:1.1:run (default) [INFO] Executing tasks [echo] Major: 2

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

不羁岁月 提交于 2019-12-24 11:37:26
问题 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 \ -DgenerateBackupPoms=false \ -DprocessAllModules \ -DgenerateBackupPoms=false' This is the error message in this case - [code] Running shell script /apps/jenkins/latest/workspace/ess-holani_master

Maven update version of specific dependency

£可爱£侵袭症+ 提交于 2019-12-10 11:40:35
问题 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 -Dincludes=com.example:drools-sample-proj Spring Boot project's dependency: <dependency> <groupId>com.example</groupId> <artifactId>drools-sample-proj</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> My local Maven repository .m2 folder contains 2

Maven update version of specific dependency

China☆狼群 提交于 2019-12-07 07:31:17
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 -Dincludes=com.example:drools-sample-proj Spring Boot project's dependency: <dependency> <groupId>com.example</groupId> <artifactId>drools-sample-proj</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> My local Maven repository .m2 folder contains 2 versions of drools-sample-proj : 0.0.2-SNAPSHOT 0.0.3-SNAPSHOT My Spring Boot's project pom.xml is not

Include git commit hash in jar version

我与影子孤独终老i 提交于 2019-12-02 22:57:08
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 the pom file? One way to achieve this is to use the git-commit-id-plugin . Add this to the list of plugins in the build section of your pom.xml: <plugin> <groupId>pl.project13.maven</groupId> <artifactId>git-commit-id-plugin</artifactId> <version>${git-commit-id-plugin.version}</version> <executions> <execution> <id>get-the-git-infos</id> <goals>