Hi Valerio,
you have to add the execution so that the plugin takes part in the
normal lifecyle of your project. Running the mojo has to happen on the
package phase as it works on the maven generated jar.
So your configuration would look like:
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>jarjar-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<projectPackage>gossip.simulator</projectPackage>
</configuration>
<executions>
<execution>
<goals><goal>jarjar</goal></goals>
<execution>
<executions>
</plugin>
Then running: mvn package on your project should be sufficient.
SaM
On Sat, Oct 11, 2008 at 8:29 AM, Valerio Schiavoni
<[EMAIL PROTECTED]> wrote:
> hello Samuel,
>
> now the plugin successfully got installed. I'm getting a NPE like the
> following:
>
> [INFO] Trace
> java.lang.NullPointerException
> at
> org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:178)
> at
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:477)
> at
> com.atlassian.maven.plugins.jarjar.JarJarMojo.execute(JarJarMojo.groovy:79)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>
>
> Maybe i haven't configured the plugin properly:
>
> <plugin>
> <groupId>com.atlassian.maven.plugins</groupId>
> <artifactId>jarjar-maven-plugin</artifactId>
> <version>1.0-SNAPSHOT</version>
> <configuration>
>
> <projectPackage>gossip.simulator.Simulator</projectPackage>
> </configuration>
> </plugin>
>
> How should I translate the following rules.txt that I currently use so that
> the plugin understand it:
> keep gossip.simulator.Simulator
> keep gossip.simulator.protocol.*
> keep gossip.simulator.collectors.*
> keep gossip.simulator.evolvers.*
> keep gossip.simulator.initializers.*
>
> Reading the doc here
> http://docs.atlassian.com/jarjar-maven-plugin/jarjar-mojo.html I thought
> that the projectPackage would be sufficient.
>
> Thanks !
> valerio
>
>
> On Fri, Oct 10, 2008 at 2:35 PM, Samuel Le Berrigaud <[EMAIL PROTECTED]>
> wrote:
>>
>> Hi Valerio,
>>
>> indeed. I didn't realise that it relied on some of Atlassian's
>> libraries. You should be able to access them using this repository:
>> https://maven.atlassian.com/repository/public/ to your settings.
>>
>> I also uploaded a minimal doc at
>> http://docs.atlassian.com/jarjar-maven-plugin/
>>
>> There is definitely more work to be done though. Let me know how you go
>> with it.
>>
>> SaM
>>
>> On Fri, Oct 10, 2008 at 6:37 PM, Valerio Schiavoni
>> <[EMAIL PROTECTED]> wrote:
>> > Hello SaM and thanks for this pointer.
>> > I've tried to install it, but there are problems with unreleased POMs
>> > which
>> > are referenced by the mojo pom or by its parent.
>> >
>> > Namely, atlassian-base-pom, atlassian-public-pom, atlassian-contrib-pom,
>> > org.apache.maven.wagon:wagon-webdav-jackrabbit:jar:1.0-beta-4-patched,
>> > and
>> > probably others..i've stopped here because it was getting frustrating.
>> >
>> > If you're able to make the installation process a little bit more smooth
>> > (for instance: by posting which repository I need to add in my
>> > settings.xml), I'd be glad to give it another chance :-)
>> >
>> > cheers,
>> > valerio
>> >
>> > On Thu, Oct 9, 2008 at 12:40 AM, Samuel Le Berrigaud
>> > <[EMAIL PROTECTED]>
>> > wrote:
>> >>
>> >> Hey guys,
>> >>
>> >> I started working on something you might find usefull yesterday. You
>> >> can check it out at:
>> >>
>> >>
>> >> https://svn.atlassian.com/svn/public/atlassian/maven-plugins/jarjar-maven-plugin/
>> >>
>> >> This is a JarJar plugin for maven2.
>> >> It would need some tests and documentation, but it should work. Let me
>> >> know what you think.
>> >>
>> >> SaM.
>> >>
>> >> On Wed, Oct 8, 2008 at 10:55 PM, Valerio Schiavoni
>> >> <[EMAIL PROTECTED]> wrote:
>> >> > It would be useful for us, since the minijar mojo doesn't work well
>> >> > with
>> >> > MANIFEST files, alas the jarjar does.
>> >> >
>> >> > On Fri, Aug 11, 2006 at 12:08 AM, John Casey <[EMAIL PROTECTED]>
>> >> > wrote:
>> >> >>
>> >> >> This is something that I started writing quite a long time ago...I
>> >> >> don't
>> >> >> know whether anyone has taken up development on it since then, but
>> >> >> if
>> >> >> not
>> >> >> then it isn't remotely functional.
>> >> >>
>> >> >
>> >> >
>> >> > --
>> >> > http://www.linkedin.com/in/vschiavoni
>> >> > http://jroller.com/vschiavoni
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe from this list, please visit:
>> >>
>> >> http://xircles.codehaus.org/manage_email
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > http://www.linkedin.com/in/vschiavoni
>> > http://jroller.com/vschiavoni
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> http://www.linkedin.com/in/vschiavoni
> http://jroller.com/vschiavoni
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email