You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (JIRA)" <ji...@apache.org> on 2018/09/04 12:04:00 UTC
[jira] [Updated] (MNG-6271) pom with parent and variable in
repository url fails
[ https://issues.apache.org/jira/browse/MNG-6271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Karl Heinz Marbaise updated MNG-6271:
-------------------------------------
Issue Type: New Feature (was: Bug)
> pom with parent and variable in repository url fails
> ----------------------------------------------------
>
> Key: MNG-6271
> URL: https://issues.apache.org/jira/browse/MNG-6271
> Project: Maven
> Issue Type: New Feature
> Reporter: Peter Lord
> Priority: Major
>
> With the following pom.xml :
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <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>com.company</groupId>
> <artifactId>project</artifactId>
> <version>1.0.0</version>
> <name>hello world</name>
> <properties>
> <x>/Users/plord/repo</x>
> </properties>
> <parent>
> <groupId>com.company</groupId>
> <artifactId>parent</artifactId>
> <version>10.2.0-SNAPSHOT</version>
> </parent>
> <repositories>
> <repository>
> <id>repo</id>
> <url>file://${x}/sdk/maven/repo</url>
> </repository>
> </repositories>
> </project>
> {code}
> maven fails to resolve the variable before attempting to download the parent. Output includes :
> {code}
> $ mvn install
> [INFO] Scanning for projects...
> Downloading: file://${x}/sdk/maven/repo/com/company/parent/10.2.0-SNAPSHOT/maven-metadata.xml
> [WARNING] Could not transfer metadata com.company:parent:10.2.0-SNAPSHOT/maven-metadata.xml from/to repo (file://${x}/sdk/maven/repo): Repository path /sdk/maven/repo does not exist, and cannot be created.
> Downloading: file://${x}/sdk/maven/repo/com/company/parent/10.2.0-SNAPSHOT/parent-10.2.0-SNAPSHOT.pom
> [ERROR] [ERROR] Some problems were encountered while processing the POMs:
> [FATAL] Non-resolvable parent POM for com.company:project:1.0.0: Could not transfer artifact com.company:parent:pom:10.2.0-SNAPSHOT from/to repo (file://${x}/sdk/maven/repo): Repository path /sdk/maven/repo does not exist, and cannot be created. and 'parent.relativePath' points at wrong local POM @ line 16, column 13
> @
> {code}
> The same is true if the variable is from the environment or system property.
> Maven should resolve variables before attempting to download parent pom.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)