Skip to content

Dependency versions updated even with limited scope and processDependencies=false #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
misterstrickland opened this issue Jul 24, 2018 · 1 comment
Labels

Comments

@misterstrickland
Copy link

misterstrickland commented Jul 24, 2018

I am using the versions plugin passing these parameters:

mvn -f pom.xml org.codehaus.mojo:versions-maven-plugin:2.5:set --quiet -DgenerateBackupPoms=false -DnewVersion=18.4.0-20180724110658-SNAPSHOT -DprocessDependencies=false -DartifactId=FooBarWebServices -DgroupId=foo.bar

My POM contains the following lines:

<groupId>foo.bar</groupId>
<artifactId>FooBarWebServices</artifactId>
<version>18.4.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>FooBarWebServices</name>
<description></description>
...
<dependencies>
<dependency>
	<groupId>foo.bar</groupId>
	<artifactId>BarBamV2</artifactId>
	<version>${project.version}</version>
	<type>jar</type>
</dependency>
</dependencies>

The new version passed to the plugin is determined based on ${project.version} in the POM. The dependencies are of the same version but without a timestamp. This means with 18.4.0-SNAPSHOT as the project.version property, I want to generate a new build timestamp (that is working, as you can see above), but keep the dependency versions as 18.4.0-SNAPSHOT.

I was hoping that by limiting the scope with -DartifactId=FooBarWebServices -DgroupId=foo.bar, my dependencies would not have their versions updated by the plug-in and would not be searched for by Maven. However, my build is failing looking for dependency BarBamV2-18.4.0-20180724110658-SNAPSHOT, which obviously doesn't exist.

@github-actions
Copy link

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Oct 11, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants