maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Golovin <dgolo...@gmail.com>
Subject Parent version is ignored if referenced parent pom.xml available from local filesystem in maven 3.3.x
Date Thu, 24 Sep 2015 18:40:35 GMT
I have simple project structure:

test-module
|-pom.xml
|-child1
  |-pom.xml

test-module/pom.xml

<project
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
        <groupId>org.name</groupId>
        <artifactId>root</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <packaging>pom</packaging>
        <modules>
                <module>child1</module>
        </modules>
</project>

test-module/child1/pom.xml (note parent/version value)

<project
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.name</groupId>
                <artifactId>root</artifactId>
                <version>anything</version>
        </parent>
        <groupId>org.name</groupId>
        <artifactId>child1</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <packaging>pom</packaging>
</project>

In maven 3.2.5 it fails with parent/pom.xml resolution error, but it works
in 3.3.x. In 3.3.x it seems just using parent pom.xml file available from
local file system and ignoring parent/version node value.

Is that sort of regression or it was done on purpose?

Thanks

-Denis

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message