versions icon indicating copy to clipboard operation
versions copied to clipboard

Plugin fails with "Illegal character in path" if sub-module references ${project.groupId}

Open cowwoc opened this issue 6 years ago • 1 comments

Version 2.7 Maven 3.6.0

testcase.zip

Repro steps:

  1. Extract testcase
  2. Run "mvn versions:display-dependency-updates versions:display-plugin-updates versions:display-property-updates"
  3. Plugin will fail with:
[ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.7:display-plugin-updates (default-cli) on project submodule: Execution default-cli of goal org.codehaus.mojo:versions-maven-plugin:2.7:display-plugin-updates failed: Illegal character in path at index 38: https://repo.maven.apache.org/maven2/${project/groupId}/test/maven-metadata.xml -> [Help 1]
  1. Notice that ~/.m2/${project/groupId}/test is created

Expected behavior:

  1. ${project.groupId} should result to testcase
  2. Repository directory should not be created

cowwoc avatar Feb 15 '19 20:02 cowwoc

I have the same problem, with a similar set-up (using a plugin with <groupId>${project.groupId}</groupId>, because the plugin uses the same versioning system as the parent POM and the other submodules). It seems that property-replacement is not performed in this case.

nicolasbarbier avatar Oct 01 '19 10:10 nicolasbarbier

Cannot reproduce anymore. I guess this must have been fixed. I suggest to close this. @slachiewicz

andrzejj0 avatar Sep 17 '22 04:09 andrzejj0

@ajarmoniuk What (released) versions did you test this against?

cowwoc avatar Sep 18 '22 02:09 cowwoc

2.12.0, but now also tried with 2.7.0 and didn't see the error either. Could you please retest and attach the output with the -X switch?

Btw, you don't need to run display-dependency-updates or display-property updates if they're not the ones that are failing.

andrzejj0 avatar Sep 18 '22 04:09 andrzejj0