maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun Ramakrishnan <sinchronized.a...@gmail.com>
Subject Re: help on shade plugin
Date Thu, 15 Mar 2012 19:12:07 GMT
you can exclude files by specifying a filter
Here is a working filter from pom.  It filters out all META_INF/LICENSE
files from all dependencies.


thanks
Arun

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer

implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"
/>
                            </transformers>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/LICENSE</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>..


On Wed, Jan 11, 2012 at 12:01 PM, vvkbtnkr <vvkbtnkr@yahoo.com> wrote:

> I am new to maven and am stuck in what might be a very simple issue and
> need
> help ... I am trying to create an uber jar using shade and am trying to
> remove some txt, license files from the final jar, but some how it does not
> seem to work. Here is the relevant section from my pom.xml
>
>
>
>
> when the jar is created and I try to look into the jar, i see the files
> above in jar. Tried playing around with the configuration options, but
> nothing seems to be working. I ran maven in -X (debug) mode and can see
> statements like -
>
>  and
>
>
> However, when I look into the jar, here is what I see:
>
>
> All files that I want removed are still there. Additionally the target
> folder has two jars "sc-1.0.jar" which is the uber jar and
> "original-sc-1.0.jar" which is the much smaller original jar. What is it
> that I am doing wrong here?
> Thanks,
> Vivek
>
> --
> View this message in context:
> http://maven-users.828.n2.nabble.com/help-on-shade-plugin-tp7177703p7177703.html
> Sent from the maven users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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