rpm-maven-plugin - problem with <dependency /> applying to other mappings

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

rpm-maven-plugin - problem with <dependency /> applying to other mappings

alexmcallister82
I'm having trouble with the <dependency /> directive in a parent POM being applied to other mappings in the child project. Here's a snippet from the parent POM

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>rpm-maven-plugin</artifactId>
        <version>2.1-alpha-2</version>
        <extensions>true</extensions>
        <configuration>
                <skip>true></skip>
                <prefix>/app/root/dir</prefix>
                <copyright>2013 MyCompany</copyright>
                <distribution>App 2013</distribution>
                <group>my-group</group>
                <mappings>
                        <mapping>
                                <directory>/app/root</directory>
                        </mapping>
                        <mapping>
                                <directory>/app/root/dir</directory>
                                <recurseDirectories>true</recurseDirectories>
                                <dependency />
                                <sources>
                                        <source>
                                                <location>src/main/resources</location>
                                        </source>
                                </sources>
                        </mapping>
                </mappings>
        </configuration>
</plugin>

And this section is in the child POM:

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>rpm-maven-plugin</artifactId>
        <configuration>
                <mappings>
                        <mapping>
                                <directory>/app/root/dir/bin</directory>
                                <filemode>775</filemode>
                                <sources>
                                        <source>
                                                <location>src/main/extra/bin</location>
                                        </source>
                                </sources>
                        </mapping>
                </mappings>
        </configuration>
</plugin>

When I run mvn help:effective-pom, I see that the dependencies are being added to the first mapping in the child POM, and not the mapping in the parent POM where it is wanted. Can't figure it out, can anyone help?

Snippet from effective-pom:

<configuration>
        <mappings>
                <mapping>
                        <directory>/opt/mycompany/app</directory>
                </mapping>
                <mapping>
                        <directory>/opt/mycompany/app/bin</directory>
                        <filemode>775</filemode>
                        <sources>
                                <source>
                                        <location>src/main/extra/bin</location>
                                </source>
                        </sources>
                        <recurseDirectories>true</recurseDirectories>
                        <dependency />
                </mapping>
        </mappings>
</configuration>
Reply | Threaded
Open this post in threaded view
|

Re: rpm-maven-plugin - problem with <dependency /> applying to other mappings

alexmcallister82
Fixed - should have been using <mappings combine.children="append"> to leave the parent mappings unchanged