3

I am kind a new with the maven-shade-plugin so sorry for the basic question. I want to exclude a path with maven-shade-plugin to a directory that is under my src/main/resources. meaning instead of all the xml in the example i want to path to src/main/resources

how can I do that?

     <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>1.4</version>
        <executions>
            <execution>
                <phase>package</phase>
                <goals>
                    <goal>shade</goal>
                </goals>
                <configuration>
                    <transformers>
                        <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                            <manifestEntries>
                                <addClasspath>true</addClasspath>
                                <mainClass>cosa.Main</mainClass>
                                <classpathPrefix>dependency-jars/</classpathPrefix>
                            </manifestEntries>
                        </transformer>
                    </transformers>
                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>*.xml</exclude>
                            </excludes>
                        </filter>
                    </filters>
                </configuration>
            </execution>
        </executions>
        <configuration>
            <finalName>cosa-data-population</finalName>
        </configuration>
    </plugin>
Matoy
  • 1,738
  • 3
  • 22
  • 53
  • Do you want to exclude the files from the generated jar also or just from the one created by shade? If yes, You can look at: http://stackoverflow.com/questions/4113697/in-maven-how-to-exclude-resources-from-the-generated-jar. It might help. – Koby Aug 30 '15 at 13:57
  • See answer to this query here -http://stackoverflow.com/a/32297034?noredirect=1 – appu Aug 30 '15 at 14:27
  • Why are you using such ancient version of [maven-shade-plugin](http://maven.apache.org/plugins/maven-shade-plugin/)? – khmarbaise Aug 31 '15 at 11:03

0 Answers0