You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Vasiliy (Jira)" <ji...@apache.org> on 2019/08/26 15:24:00 UTC
[jira] [Created] (MNG-6746) Maven 3.6.1 does not resolve
${revision} if defined within parent section and when parent pom is
externally sourced
Vasiliy created MNG-6746:
----------------------------
Summary: Maven 3.6.1 does not resolve ${revision} if defined within parent section and when parent pom is externally sourced
Key: MNG-6746
URL: https://issues.apache.org/jira/browse/MNG-6746
Project: Maven
Issue Type: Bug
Components: POM
Affects Versions: 3.6.1
Reporter: Vasiliy
How to reproduce:
Create a parent maven project "top" pom (corporate pom) with version "1.0.0-SNAPSHOT" like this:
<groupId>com.test</groupId>
<artifactId>top</artifactId>
<version>${revision}</version>
Do mvn -Drevision=1.0.0-SNAPSHOT install, so its available in local .m2
Create another mvn project and provide the pom like this:
```
<groupId>com.test</groupId>
<artifactId>child-repo</artifactId>
<version>${revision}</version>
<parent>
<groupId>com.test</groupId>
<artifactId>child-repo</artifactId>
<version>${revision}</version>
</parent>
```
I get an error - Non-resolvable parent POM for com.test:top:${revision}: Could not transfer artifact com.test:top:pom:${revision} from/to nexus ($NEXUS)URL/content/groups/public): Failed to transfer file $NEXUS_URL/com/test/top/$%7Brevision%7D/top-$%7Brevision%7D.pom with status code 400 and 'parent.relativePath' points at wrong local POM @ line 12, column 10 ->
The only way to resolve is to also checkout the "top" project and keep at the same level as "child-repo" project and add a <relativePath>../top</relativePath>
I would like Maven to resolve the "top" repo from the mvn repository directly instead of having it refer it via relativePath.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)