You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Artsiukhou, Yauhen" <Ar...@belhard.com> on 2007/11/29 14:37:37 UTC
Inheriting developers list from parent POM.xml
Hello. I have a problem: I've defined pom.xml which I'm going to use an custom super-pom file:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.super_pom</groupId>
<artifactId>SuperPom</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Super Pom</name>
<url>http://192.168.1.1/projects/SuperPom/</url>
<!-- in current version this declaration isn't working when pom inherited by other project -->
<developers>
<developer>
<id>Sirex</id>
<name>Yauhen, Artsiukhou</name>
<email>[email_protected]</email>
<organization>MyCompany</organization>
<organizationUrl>mycompany.com</organizationUrl>
<roles>
<role>some_role</role>
</roles>
</developer>
</developers>
<distributionManagement>
<repository>
<id>my-repository-01</id>
<url>ftp://192.168.9.27/</url>
</repository>
</distributionManagement>
<!-- when I run "mvn deploy" it fails with error: Unsupported protocol: 'ftp' ... bla bla bla, but I've already found this issue in your jira --!>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-alpha-6</version>
</extension>
</extensions>
<plugins>
<plugin>
<!-- Using JDK 1.5 instead default 1.4 -->
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
Next project uses this super pom. Pom-file looks like:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.project</groupId>
<artifactId>project_name</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>project_name</name>
<url>http://192.168.1.1/projects/project_name</url>
<parent>
<groupId>com.company.super_pom</groupId>
<artifactId>SuperPom</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<!-- this section completely overrides inherited from super_pom. Expected: merging both two developers: "Sirex" and "other developer" -->
<developers>
<developer>
<id>other developer</id>
<name>other developer</name>
<email>[email protected]</email>
<organization>company</organization>
<organizationUrl>company.com</organizationUrl>
<roles>
<role>Manager</role>
<role>Developer</role>
<role>Team Leader</role>
</roles>
</developer>
</developers>
</project>
Problem:
Developers list overrides by child pom file
When I type "mvn help:effective-pom" I can see, that all params from super_pom were inherited successful except "<developers>" section.
If I remove from "com.company.project" project "<developers>" declaration, super_poms' declaration will be inherited.
Is it a bug? Or it's my mistake of declaration/configuration pom-files.
May be it's your policy to make an ability to re-declaration such sections? So, how can I get merging such sections, if any?
Best Regards,
Artsiukhou Yauhen
Belarus, Minsk