Hello,
i've tried version 0.0.3: it still fails complaining about duplicate :
java.lang.IllegalArgumentException: Duplicate jar entries: LICENSE.txt
the thing is: there might files which are not inside META-INF/ and thus
needs to be excluded.
The zap rules don't seem to apply on files which are not recognized to be
classes, or at least so it says the doc for the zap rules:
* <p>This is a list of patterns. Packages and classes matched by those
patterns will be removed from the
* artifact.</p>
I'm attaching the pom.xml for your convenience.
Thanks!
valerio
On Sat, Oct 11, 2008 at 7:29 AM, Samuel Le Berrigaud
<[EMAIL PROTECTED]>wrote:
> Hi Valerio,
>
> I managed to reproduced the same issues. I fixed that by excluding
> contents of META-INF/ from included dependencies. Hopefully this will
> be sufficient for you as well… I released version 0.0.3 with those
> changes. Give it a try and let me know.
>
> SaM
>
> On Sat, Oct 11, 2008 at 12:46 PM, Samuel Le Berrigaud
> <[EMAIL PROTECTED]> wrote:
> > Thanks for the input Valerio.
> >
> > Could I by any chance ask you to paste (attach) the pom.xml you are
> > using? I would like to reproduce those errors locally and fix them (as
> > much as possible).
> >
> > Thanks,
> > SaM
> >
> > On Sat, Oct 11, 2008 at 11:30 AM, Valerio Schiavoni
> > <[EMAIL PROTECTED]> wrote:
> >> Also, if I try to specify only the name of the file to exclude,
> something
> >> else happen:
> >>
> >> For instance:
> >> : java.lang.IllegalArgumentException: Duplicate jar entries: LICENSE.txt
> >> at
> >>
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
> >> at org.apache.tools.ant.Task.perform(Task.java:348)
> >> at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:199)
> >> at
> groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:153)
> >> at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:149)
> >> at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
> >> at
> >>
> org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:784)
> >> at
> >>
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
> >> at
> >>
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
> >> at
> >>
> com.atlassian.maven.plugins.jarjar.JarJarMojo.execute(JarJarMojo.groovy:80)
> >>
> >>
> >> even by having specified the following:
> >> <zaps>
> >> <zap>LICENSE.txt</zap>
> >> </zaps>
> >>
> >>
> >> Hope it helps debugging this mojo, which I believe is very useful!
> >> On Sat, Oct 11, 2008 at 2:14 AM, Valerio Schiavoni
> >> <[EMAIL PROTECTED]> wrote:
> >>>
> >>> hi,
> >>> On Sat, Oct 11, 2008 at 2:08 AM, Samuel Le Berrigaud
> >>> <[EMAIL PROTECTED]> wrote:
> >>>>
> >>>> <zaps>
> >>>> <zap>META-INF/maven/**</zap>
> >>>> <zaps>
> >>>> ...
> >>>> </configuration>
> >>>>
> >>>> This might not be ideal, but it should remove the duplicate entries.
> >>>
> >>> unfortunetely it doesn't work:
> >>> java.lang.IllegalArgumentException: Patterns cannot contain slashes
> >>> at
> >>>
> com.tonicsystems.jarjar.PatternElement.createWildcards(PatternElement.java:39)
> >>> at
> com.tonicsystems.jarjar.ZapProcessor.<init>(ZapProcessor.java:28)
> >>> at
> com.tonicsystems.jarjar.MainProcessor.<init>(MainProcessor.java:54)
> >>> at com.tonicsystems.jarjar.JarJarTask.execute(JarJarTask.java:48)
> >>>
> >>>
> >>> i haven't read the full jarjar doc..maybe I should have.
> >>>
> >>> --
> >>> http://www.linkedin.com/in/vschiavoni
> >>> http://jroller.com/vschiavoni
> >>
> >>
> >>
> >> --
> >> http://www.linkedin.com/in/vschiavoni
> >> http://jroller.com/vschiavoni
> >>
> >
>
--
http://www.linkedin.com/in/vschiavoni
http://jroller.com/vschiavoni
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>simplep2psim</groupId>
<artifactId>simplep2psim</artifactId>
<name>SimpleP2P event-based simulator</name>
<version>0.2</version>
<description>A simple p2p event-based simulator. The initial version
was developed by Vivien Quéma. Subsequent versions have been developed
by Alessio Pace and Valerio Schiavoni</description>
<developers>
<developer>
<id>vschiavoni</id>
<name>Valerio Schiavoni</name>
<email>[EMAIL PROTECTED]</email>
<url>http://jroller.com/vschiavoni</url>
<organization>INRIA</organization>
<organizationUrl>http://sardes.inrialpes.fr</organizationUrl>
<roles>
<role>Architect</role>
<role>Developer</role>
</roles>
</developer>
<developer>
<id>apace</id>
<name>Alessio Pace</name>
<email>[EMAIL PROTECTED]</email>
<organization>INRIA</organization>
<organizationUrl>http://sardes.inrialpes.fr</organizationUrl>
<roles>
<role>Architect</role>
<role>Developer</role>
</roles>
</developer>
</developers>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass> gossip.simulator.Simulator </mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<phase>package</phase>
<execution>
<goals>
<goal>assembly</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef> jar-with-dependencies </descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass> gossip.simulator.Simulator </mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!--
these tests are excluded because they take a bit long to execute
-->
<excludes>
<exclude>**/*RandomnessTesterTest.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>jarjar-maven-plugin</artifactId>
<version>0.0.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jarjar</goal>
</goals>
</execution>
</executions>
<configuration>
<projectPackage>gossip.simulator</projectPackage>
<zaps>
<zap>LICENSE</zap>
</zaps>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>2.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>muscat</groupId>
<artifactId>muscat-stats</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>trove</groupId>
<artifactId>trove</artifactId>
<version>2.0.4</version>
</dependency>
<!--
<dependency> <groupId>gnu-crypto</groupId>
<artifactId>gnu-crypto</artifactId> <version>2.1.0</version>
</dependency>
-->
</dependencies>
<!-- Repositories -->
<repositories>
<repository>
<id>ow2</id>
<name>OW2 repository</name>
<url>http://maven.ow2.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>ow2-snapshot</id>
<name>OW2 repository</name>
<url>http://maven.ow2.org/maven2-snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
<repository>
<!-- everybody in the 'sardes' unix group can write there -->
<id>proton</id>
<name>Proton Releases Repository</name>
<url>http://proton.inrialpes.fr/~muscat/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<!-- everybody in the 'sardes' unix group can write there -->
<id>proton</id>
<name>Proton Snapshot Repository</name>
<url>http://proton.inrialpes.fr/~muscat/maven2-snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</reporting>
</project>---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email