mojohaus / rpm-maven-plugin

http://www.mojohaus.org/rpm-maven-plugin/
Other
56 stars 48 forks source link

exclude failing with multi mapping #67

Closed qpieseb closed 8 years ago

qpieseb commented 8 years ago

Hi,

I'm Using plugin 2.1.4. (also try other versions) I found that plugin it's failing to exclude files if I set up 3 different''s mappings. It always skip exclude form second mapping entry in configuration. I've change order of few times to be sure that's not case with wrong config. Always it's including all jar files into RPM.
exclude */.jar is skipped for directory /${rpm-root}/${comp-name}/${install-path}/etc and included in rpm.

    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>rpm-maven-plugin</artifactId>
                    <version>2.1.1</version>
            <configuration>
                <mappings>
                    <mapping>
                        <directory>/${rpm-root}/${comp-name}/${install-path}/lib</directory>
                        <filemode>775</filemode>
                        <username>root</username>
                        <groupname>root</groupname>
                        <directoryIncluded>false</directoryIncluded> 
                        <sources>
                            <source>
                                <location>src/main/scripts/lib/</location>
                                 <excludes>
                                    <exclude>**/*.jar</exclude>
                                </excludes>
                                <includes>
                                    <include>common.lib</include>
                                    <include>config.lib</include>
                                </includes>
                            </source>
                        </sources>
                    </mapping>
                    <mapping>
                        <directory>/${rpm-root}/${comp-name}/${install-path}/etc</directory>
                        <filemode>775</filemode>
                        <username>root</username>
                        <groupname>root</groupname>
                        <directoryIncluded>false</directoryIncluded> 
                        <sources>
                            <source>
                                <location>src/main/scripts/etc/</location>
                                <excludes>
                          <exclude>**/*.jar</exclude>
                                </excludes>
                                <includes>
                                    <include>config_values</include>
                                    <include>version_info</include>
                                </includes>

                            </source>
                        </sources>
                    </mapping>
                    <mapping>
                        <directory>/${rpm-root}/${comp-name}/${install-path}/bin</directory>
                        <filemode>775</filemode>
                        <username>root</username>
                        <groupname>root</groupname>
                        <directoryIncluded>false</directoryIncluded> 
                        <sources>
                            <source>
                                <location>src/main/scripts/</location>
                                <includes>
                                    <include>config.bsh</include>

                                </includes>
                                <excludes>
                                    <exclude>**/*.jar</exclude>
                                </excludes>
                            </source>
                            <source>
                                <location>src/main/python/</location>
                                <includes>
                                    <include>Audit.py</include>
                                    <include>Utils.py</include>
                                </includes>
                                <excludes>
                                    <exclude>**/*.pyc</exclude>
                                    <exclude>README.txt</exclude>
                                </excludes>
                            </source>
                        </sources>
                    </mapping>
                 </mappings>
                </configuration>

Does someone got similar issue with multi mapping?

qpieseb commented 8 years ago

#

qpieseb commented 8 years ago

This was caused by unused maven-assembly plugin as dependency in pom.xml.