Re: maven 2.0.7 assembly plugin

2007-11-14 Thread Nigel Magnay
You can do a jar containing all dependencies with the following descriptor.
However - the excludes doesn't work properly in the assembly plugin, so if
you have dependencies that are signed, you'll have to fix them afterwards
annoyingly.

You can also pack jars into the /lib and use something like one-jar - this
is quicker, but I found one-jar loads everthing into memory before running
(which fell over for me because my project is big).

assembly
 iduberjar/id
 formats
  formatjar/format
 /formats
 includeBaseDirectoryfalse/includeBaseDirectory
 dependencySets
  dependencySet
   outputDirectory/outputDirectory
   outputFileNameMapping/outputFileNameMapping
   unpacktrue/unpack
   scoperuntime/scope
   unpackOptions
excludes
 exclude/META-INF/*.RSA/exclude
 exclude/META-INF/*.DSA/exclude
 exclude/META-INF/*.SF/exclude
 exclude/META-INF/*.rsa/exclude
 exclude/META-INF/*.dsa/exclude
 exclude/META-INF/*.sf/exclude
/excludes
   /unpackOptions
  /dependencySet
 /dependencySets
 fileSets
  fileSet
   directorytarget/classes/directory
   outputDirectory/outputDirectory
  /fileSet
 /fileSets
/assembly

On Nov 14, 2007 2:04 AM, Steve Taylor [EMAIL PROTECTED] wrote:


 In theory, at the command line from the directory of the parent project,
 just
 type:
 mvn -DdescriptorId=jar-with-dependencies assembly:assembly
 and you should get a single jar with everything in it.

 In practice, what you actually get is a jar with just
 META-INF/MANIFEST.MF.
 So I am also really looking forward to the answer to this one. You'd think
 a
 simple problem like this would have a simple solution. Hopefully it does.
 I
 still want to believe that maven can make my life easier instead of
 following the inversion of difficulty pattern inherent in many java tools
 and frameworks (ie. difficult tasks are simplified and simple tasks become
 difficult).


 Brandon Enochs wrote:
 
  I'm trying to assemble a multi-module project with a single jar file for
  all of the modules in my project and a lib directory with all of jar
  files for my dependencies.  Does anyone know how to do this with the
  assembly plugin?
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/maven-2.0.7-assembly-plugin-tf4755367s177.html#a13738602
 Sent from the Maven - Users mailing list archive at 
 Nabble.comhttp://nabble.com/
 .


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: maven 2.0.7 assembly plugin

2007-11-13 Thread Steve Taylor

In theory, at the command line from the directory of the parent project, just
type:
mvn -DdescriptorId=jar-with-dependencies assembly:assembly
and you should get a single jar with everything in it.

In practice, what you actually get is a jar with just META-INF/MANIFEST.MF.
So I am also really looking forward to the answer to this one. You'd think a
simple problem like this would have a simple solution. Hopefully it does. I
still want to believe that maven can make my life easier instead of
following the inversion of difficulty pattern inherent in many java tools
and frameworks (ie. difficult tasks are simplified and simple tasks become
difficult).


Brandon Enochs wrote:
 
 I'm trying to assemble a multi-module project with a single jar file for 
 all of the modules in my project and a lib directory with all of jar 
 files for my dependencies.  Does anyone know how to do this with the 
 assembly plugin?
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/maven-2.0.7-assembly-plugin-tf4755367s177.html#a13738602
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: maven 2.0.7 assembly plugin

2007-11-06 Thread John Coleman
I have used the assembly plugin, but not like this.

I don't think such a JAR (i.e. a JAR of JARS) will work unless you are
loading the classes up by your own JAR exploration mechanism. Class
files must be locatable from the JARs root to appear on the classpath.

Perhaps you need to consider unpacking the various JARS into a common
target and repcaking that into a single JAR. This could be a trivial
Maven project.

Perhaps this isn't really a JAR application, and would be better as a
ZIP?

John

-Original Message-
From: Brandon Enochs [mailto:[EMAIL PROTECTED] 
Sent: 06 November 2007 00:26
To: Maven Users List
Subject: maven 2.0.7 assembly plugin

I'm trying to assemble a multi-module project with a single jar file for

all of the modules in my project and a lib directory with all of jar 
files for my dependencies.  Does anyone know how to do this with the 
assembly plugin?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Eurobase International Limited and its subsidiaries (Eurobase) are unable to 
exercise control over the content of information in E-Mails. Any views and 
opinions expressed may be personal to the sender and are not necessarily those 
of Eurobase. Eurobase will not enter into any contractual obligations in 
respect of any part of its business in any E-mail. 

Privileged / confidential information may be contained in this message and /or 
any attachments. This E-mail is intended for the use of the addressee(s) only 
and may contain confidential information. If you are not the / an intended 
recipient, you are hereby notified that any use or dissemination of this 
communication is strictly prohibited.  If you receive this transmission in 
error, please notify us immediately, and then delete this E-mail. 

Neither the sender nor Eurobase accepts any liability whatsoever for any 
defects of any kind either in or arising from this E-mail transmission. E-Mail 
transmission cannot be guaranteed to be secure or error-free, as messages can 
be intercepted, lost, corrupted, destroyed, contain viruses, or arrive late or 
incomplete. Eurobase does not accept any responsibility for viruses and it is 
your responsibility to scan any attachments.

Eurobase Systems Limited is the main trading company in the Eurobase 
International Group; registered in England and Wales as company number 
02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex 
CM2 0RE, UK.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: maven 2.0.7 assembly plugin

2007-11-06 Thread Tomasz Pik
On 11/6/07, John Coleman [EMAIL PROTECTED] wrote:
 I have used the assembly plugin, but not like this.

 I don't think such a JAR (i.e. a JAR of JARS) will work unless you are
 loading the classes up by your own JAR exploration mechanism. Class
 files must be locatable from the JARs root to appear on the classpath.

There's  such a thing in maven1 - please, take a look here:
http://maven.apache.org/maven-1.x/plugins/uberjar/
Perhaps it may be ported as a layout in maven-assembly-plugin.
But - I was using this with maven1 with project containing big
jars (i.e. oracle jdbc driver) and it's very slow so I do not think
it's a right way to go.

 Perhaps you need to consider unpacking the various JARS into a common
 target and repcaking that into a single JAR. This could be a trivial
 Maven project.

This may be achieved using maven-assembly-plugin:
http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies

HTH,
Tomek


 Perhaps this isn't really a JAR application, and would be better as a
 ZIP?

 John

 -Original Message-
 From: Brandon Enochs [mailto:[EMAIL PROTECTED]
 Sent: 06 November 2007 00:26
 To: Maven Users List
 Subject: maven 2.0.7 assembly plugin

 I'm trying to assemble a multi-module project with a single jar file for

 all of the modules in my project and a lib directory with all of jar
 files for my dependencies.  Does anyone know how to do this with the
 assembly plugin?

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 Eurobase International Limited and its subsidiaries (Eurobase) are unable to 
 exercise control over the content of information in E-Mails. Any views and 
 opinions expressed may be personal to the sender and are not necessarily 
 those of Eurobase. Eurobase will not enter into any contractual obligations 
 in respect of any part of its business in any E-mail.

 Privileged / confidential information may be contained in this message and 
 /or any attachments. This E-mail is intended for the use of the addressee(s) 
 only and may contain confidential information. If you are not the / an 
 intended recipient, you are hereby notified that any use or dissemination of 
 this communication is strictly prohibited.  If you receive this transmission 
 in error, please notify us immediately, and then delete this E-mail.

 Neither the sender nor Eurobase accepts any liability whatsoever for any 
 defects of any kind either in or arising from this E-mail transmission. 
 E-Mail transmission cannot be guaranteed to be secure or error-free, as 
 messages can be intercepted, lost, corrupted, destroyed, contain viruses, or 
 arrive late or incomplete. Eurobase does not accept any responsibility for 
 viruses and it is your responsibility to scan any attachments.

 Eurobase Systems Limited is the main trading company in the Eurobase 
 International Group; registered in England and Wales as company number 
 02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex 
 CM2 0RE, UK.


 -
 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]



maven 2.0.7 assembly plugin

2007-11-05 Thread Brandon Enochs
I'm trying to assemble a multi-module project with a single jar file for 
all of the modules in my project and a lib directory with all of jar 
files for my dependencies.  Does anyone know how to do this with the 
assembly plugin?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]