[ https://issues.apache.org/jira/browse/MNG-6271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Scholte closed MNG-6271. ------------------------------- Fix Version/s: (was: wontfix-candidate) Assignee: Robert Scholte Resolution: Won't Fix Variables are inherited from parents, which means that repositories (that might point to the parent's repository) cannot contain variables. Repositories are considered constants. > 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 > Assignee: Robert Scholte > 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 (v8.3.4#803005)