[
https://issues.apache.org/jira/browse/MNG-6752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470871#comment-17470871
]
Michael Osipov commented on MNG-6752:
-------------------------------------
I can confirm that, but cannot tell whether this is a bug, or expected behavior:
{noformat}
osipovmi@deblndw011x:~/var/Projekte/test/pp
$ /tmp/apache-maven-4.0.0-alpha-1-SNAPSHOT/bin/mvn
[INFO] Scanning for projects...
Downloading from lda-public:
https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/pp1/pp-pom/1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata pp1:pp-pom:1-SNAPSHOT/maven-metadata.xml
from/to lda-public
(https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/):
authorization failed for
https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/pp1/pp-pom/1-SNAPSHOT/maven-metadata.xml,
status: 403 Forbidden
Downloading from lda-public:
https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/pp1/pp-pom/1-SNAPSHOT/pp-pom-1-SNAPSHOT.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not transfer artifact
pp1:pp-pom:pom:1-SNAPSHOT from/to lda-public
(https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/):
authorization failed for
https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/pp1/pp-pom/1-SNAPSHOT/pp-pom-1-SNAPSHOT.pom,
status: 403 Forbidden and 'parent.relativePath' points at wrong local POM @
line 10, column 10
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project pp:pp-pom:${revision}
(/var/osipovmi/Projekte/test/pp/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact
pp1:pp-pom:pom:1-SNAPSHOT from/to lda-public
(https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/):
authorization failed for
https://deblndw011x.ad001.siemens.net/nexus/content/groups/lda-public/pp1/pp-pom/1-SNAPSHOT/pp-pom-1-SNAPSHOT.pom,
status: 403 Forbidden and 'parent.relativePath' points at wrong local POM @
line 10, column 10 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the '-e'
switch
[ERROR] Re-run Maven using the '-X' switch to enable verbose output
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2]
http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
{noformat}
> submodule with $revision version can't be referenced by a normal version
> number
> -------------------------------------------------------------------------------
>
> Key: MNG-6752
> URL: https://issues.apache.org/jira/browse/MNG-6752
> Project: Maven
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 3.6.1
> Reporter: Martin K
> Priority: Major
>
> In the following example, pp/pom.xml can't reference its parent with a
> specific version number ("<version>1-SNAPSHOT</version>") - Unless
> pp1:pp-pom:pom:1-SNAPSHOT is already present in a maven repository, the build
> will fail.
> Maven reads the parent poms and caches them, before resolving $revision.
> Therefore it just caches the artifact version "${revsion}" and fails to load
> the local parent pom, if the parent reference does not also use the version
> "${revision}"
> Precondition: Non of these artificats is already present in a local or remote
> maven repository.
> File pom.xml:
> {code}
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>pp</groupId>
> <artifactId>y-pom</artifactId>
> <name>yy</name>
> <packaging>pom</packaging>
> <version>1-SNAPSHOT</version>
> <modules>
> <module>pp1</module>
> <module>pp</module>
> </modules>
> <properties>
> <revision>1-SNAPSHOT</revision>
> </properties>
> </project>
> {code}
> File ./pp/pom.xml:
> {code}
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>pp</groupId>
> <artifactId>pp-pom</artifactId>
> <name>PP</name>
> <packaging>pom</packaging>
> <version>${revision}</version>
> <parent>
> <groupId>pp1</groupId>
> <artifactId>pp-pom</artifactId>
> <version>1-SNAPSHOT</version>
> <!--<version>${revision}</version>-->
> <relativePath>../pp1/pom.xml</relativePath>
> </parent>
> <properties>
> <revision>1-SNAPSHOT</revision>
> </properties>
> </project>
> {code}
> File ./pp1/pom.xml:
> {code}
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>pp1</groupId>
> <artifactId>pp-pom</artifactId>
> <name>PP</name>
> <packaging>pom</packaging>
> <version>${revision}</version>
> <properties>
> <revision>1-SNAPSHOT</revision>
> </properties>
> </project>
> {code}
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)