Hi,
from what you provide us, I think that you are using the predefined
descriptor 'project' of maven assembly plugin which produces by default
a zip, a tar.gz and a tar.bz2 file
(http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html).
Now, if you want a single big fat jar containing all the classes, just
switch to the descriptor 'jar-with-dependencies' which will unpack all
the jar you depend on and recreate a big jar file containing all the
unpacked classes, plus, the ones of your current project.
Now, if you want to keep those three files (zip, tar.gz and tar.bz2) but
you want to have 2 different kind of builds:
* one that produces the jar file of the current project
* one that produces everything as now
You have two options:
1) you create 2 profiles, one that contains the maven assembly plugin
and another one without it.
2) you bind the assembly plugin to a phase which is after the phase
"package" (for example, "verify"), and in the first case you only call
'mvn package' and the second one you call 'mvn verify'
If what you want is to have a build with:
* one that produces the big fat jar file
* one that produces everything as now
Your only choice is to use profile and configure the maven assembly
plugin differently in each profile.
If you look for information on profiles, go here:
http://maven.apache.org/guides/introduction/introduction-to-profiles.html
If you look for information on lifecylce, phases, etc..., go here:
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
Be careful with profiles because, as mentioned on the maven site, there
are several pitfalls to profiles.
Cheers,
Guillaume
Le 18/01/2012 12:52, jackett_dad a écrit :
Wayne,
Thanks for the reply.
I am the resident expert with Maven, so I am the only help I have. If we
had someone like you are describing, I would very happy indeed. So far
though, things are looking good, but it's like walking through the dark with
a flashlight.
As for the other formats, I'm not looking to get rid of them forever, only
in the iterative development cycle where I compile, deploy and test upwards
to 20 times a day. The jar is all I need in this situation.
The old build was done exclusively with Ant.
My guess about why I'm generating so many different deployment artifacts is
that it is due to the assembly plugin in my project pom:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven.assembly.plugin.version}</version>
<executions>
<execution>
<id>create-project-bundle</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>project</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
Is there a way to configure this to only generate the jar? If I am to use
the shade plugin, how do I configure it to indicate the suppression I'm
looking for? I read the usage page for both plugins but haven't found what
I'm looking for (though I admit I could easily have missed it).
Thanks,
Scott
--
View this message in context:
http://maven.40175.n5.nabble.com/Skipping-the-TAR-packaging-step-tp5152958p5154628.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]