versions-maven-plugin

Set the version of a dependency from command line

自作多情 提交于 2020-05-23 10:33:11
问题 I would like to set the version of a dependency in a POM from command line. Much like versions:set (for the version of the project), but for a specific dependency. I don't want to craft any XML scanning tool because there are various ways to specify a version and it is hard to handle them all. 回答1: If you know your dependency versions are specified in the dependency or dependencyManagement blog and the version is not a property you can use use-dep-version: mvn versions:use-dep-version

Set the version of a dependency from command line

北城余情 提交于 2020-05-23 10:31:26
问题 I would like to set the version of a dependency in a POM from command line. Much like versions:set (for the version of the project), but for a specific dependency. I don't want to craft any XML scanning tool because there are various ways to specify a version and it is hard to handle them all. 回答1: If you know your dependency versions are specified in the dependency or dependencyManagement blog and the version is not a property you can use use-dep-version: mvn versions:use-dep-version

How can I update a property in a Maven POM?

浪尽此生 提交于 2019-12-29 03:34:12
问题 I have two top-level Maven projects, backend and frontend , that advance versions at their own individual pace. Since each has multiple modules, I define my dependency versions in dependencyManagement sections in the parent/aggregate POMs and use a property for the version number. I want to cleanly update the property with the version number on frontend , preferably arbitrarily, but I can live with requiring a live upstream version to match. I've tried using versions:update-property, but that

excludesList parameter usage in versions:update-properties

こ雲淡風輕ζ 提交于 2019-12-24 08:25:20
问题 I have the following in my pom: . . <properties> <x.version>1.1</x.version> <y.version>1.2</y.version> <z.version>1.3</z.version> </properties> . . <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>versions-maven-plugin</artifactId> </plugin> . . I want to use exludesList (or includesList ) to update the version of only x (and keep y and z to be updated manually). I have done the following: . . <properties> <x.version>1.1</x.version> <y.version>1.2</y.version> <z.version>1.3</z

Maven dependency updates report takes hours to complete

拟墨画扇 提交于 2019-12-24 08:06:25
问题 I have task to run Jenkins job witch would report newer version of libraries. I think that these would do what I need: org.codehaus.mojo:versions-maven-plugin:2.5:plugin-updates-report org.codehaus.mojo:versions-maven-plugin:2.5:property-updates-report org.codehaus.mojo:versions-maven-plugin:2.5:dependency-updates-report Job runs correctly but when it reaches project last artifact (artifact xerces:xercesImpl: checking for updates from default) it stucks for few hours. I was able to reproduce

Maven check that all dependencies have been released

佐手、 提交于 2019-12-12 10:48:38
问题 As part of my release process, I use mvn versions:use-releases goal to replace all -SNAPSHOT dependencies with released versions. After this, I want to check if all the SNAPSHOT dependencies have been replaced with releases or not. Question : How can I check it? I know, the maven release plugin performs such a check as part of release-prepare goal, but I don't want to use release plugin. 回答1: You can use the maven-enforcer-plugin to double check whether any SNAPSHOT dependency is still there

maven versions release candidates and snapshot

隐身守侯 提交于 2019-12-12 08:48:59
问题 My goal is to release a project which have a single dependency. I have a nexus repository where i deploy both snapshot and release versions. The one dependency I have has group:artifact:1.1.0-SNAPSHOT and the following Release Candidate is released in my nexus repo group:artifact:1.1.0-RC1 when asking to the versions plugin to resolve the dependencies, it claims that no new dependency is available. So he consider that 1.1.0-SNAPSHOT > 1.1.0-RC1 However, If in my project, i have version 1.0.0

Maven versions plugin: reference a rule.xml from a maven dependency?

十年热恋 提交于 2019-12-06 00:59:37
问题 I am using the mvn versions:display-dependency-updates versions:display-plugin-updates goals to check for dependencies or plugins updates. My maven project is a multi module one, which looks like this: moduleA |- moduleB1 | |- moduleC |- moduleB2 |- build-config/rules.xml Since there is some unwanted updates, like betas I don't want, I've made a filter (which works). I use it like that: <profile> <id>maven-version-plugin-1</id> <activation> <property> <name>version.rules.uri</name> </property

maven versions release candidates and snapshot

余生颓废 提交于 2019-12-04 05:51:01
My goal is to release a project which have a single dependency. I have a nexus repository where i deploy both snapshot and release versions. The one dependency I have has group:artifact:1.1.0-SNAPSHOT and the following Release Candidate is released in my nexus repo group:artifact:1.1.0-RC1 when asking to the versions plugin to resolve the dependencies, it claims that no new dependency is available. So he consider that 1.1.0-SNAPSHOT > 1.1.0-RC1 However, If in my project, i have version 1.0.0-SNAPSHOT, version 1.1.0-RC1 is resolved as the newest version. What am I missing? (I looked into the

Remove -SNAPSHOT from project version in pom

假装没事ソ 提交于 2019-11-30 08:05:22
I have a pom with the following GAV <groupId>com.company.services</groupId> <artifactId>test-branch-2</artifactId> <version>1.0.21-SNAPSHOT</version> I want to remove -SNAPSHOT from this using maven in batch mode, so I can do it with Jenkins and not have to specify anything manually. I've looked at the documentation for version:set but all the options offer me an interactive prompt and ask me to type a name for the version. I would prefer the versions plugin, not the release plugin. Since version 2.10 of the Versions Maven Plugin you can simply do: mvn versions:set -DremoveSnapshot If you