Re: Using the assembly plugin to build a stand-alone application
Hmm, no, not really. I have dependencies on oracle (ojdbc), spring, mail, activation, commons-net, log4j, ibatis-common, and ibatis-sqlmap in my project. I want to have my jar, and all of the jars required to run it somewhere in the target directory. Larry On 11/20/06, pjungwir [EMAIL PROTECTED] wrote: Hi Larry, I believe the descriptorId is required. You must also reference assembly.xml from your POM by giving the assembly plugin a configuration like this: configuration descriptorassembly.xml/descriptor /configuration But the 4 files result is correct, I think. What's in them? The jar should contain only your current project's classes. That is not the result of the assembly plugin, but of the jar plugin (probably running automatically on account of jar packaging). The other three files are coming from the assembly plugin. What's in them? You should see your jar plus your dependency jars. That's what you wanted, right? Paul Larry Meadors-2 wrote: Thanks, Paul - I added that as a file named assembly.xml in the directory with my pom.xml in it. I then added this to my pom (in the build/plugins section): === plugin artifactIdmaven-assembly-plugin/artifactId version2.0-beta-1/version configuration descriptorIdbin/descriptorId descriptors descriptor./assembly.xml/descriptor /descriptors finalNamemarcdelivery/finalName outputDirectorytarget/assembly/outputDirectory workDirectorytarget/assembly/work/workDirectory /configuration /plugin === But it still only creates 4 files: - target/marc-delivery-1.0-SNAPSHOT.jar - target/assembly/marcdelivery-bin.tar.gz - target/assembly/marcdelivery-bin.tar.bz2 - target/assembly/marcdelivery-bin.zip If I remove the descriptorIdbin/descriptorId line from the pom, I get only one file (target/marc-delivery-1.0-SNAPSHOT.jar) and an error. :( How do you have this in your project? Larry On 11/20/06, pjungwir [EMAIL PROTECTED] wrote: Hi Larry, I'm doing this, too. I think you'll need to create your own assembly descriptor. Here is mine: assembly idbin/id formats formattar.gz/format formatzip/format /formats fileSets fileSet directorytarget/directory outputDirectory/outputDirectory includes include*.jar/include !-- the jar of this project's classes -- /includes /fileSet fileSet directorytarget/scripts/directory outputDirectory/outputDirectory includes include*/include !-- clui scripts to launch the main java class -- /includes fileMode755/fileMode /fileSet fileSet directorytarget/doc/directory outputDirectory/outputDirectory includes include*/include /includes /fileSet /fileSets files file sourceREADME/source outputDirectory//outputDirectory fileMode644/fileMode !-- broken. see http://jira.codehaus.org/browse/MASSEMBLY-153 -- /file /files dependencySets dependencySet /dependencySet /dependencySets /assembly Paul Larry Meadors-2 wrote: Hi, I am using maven for the first time, so I apologize if this is a retarded question, but I can't find it anywhere in the docs. I have an app that is a command line app. I want to create an assembly that has my jar, along with the other jars that are listed as dependencies on it. I tried the jar-with-dependencies approach, and that *almost* works, but one of the jars i am including has some added files in the META-INF directory, and they do not end up getting included, so the app fails. Bummer. :( So, I guess i am looking for one of two things: 1) how can I get *all* the files in the uber jar. -or- 2) how can I get the assembly to just put all the individual dependent jars in a directory somewhere? I think I'd prefer #2, but at this point... I'll take what I can get! :-) TIA, Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Using-the-assembly-plugin-to-build-a-stand-alone-application-tf2670816s177.html#a7448665 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: Using the assembly plugin to build a stand-alone application
OK, I got it. I added a section to my pom for snapshot plugins like this: project ... ... pluginRepositories pluginRepository idmaven-snaps/id urlhttp://people.apache.org/repo/m2-snapshot-repository/url snapshots enabledtrue/enabled /snapshots releases enabledfalse/enabled /releases /pluginRepository /pluginRepositories ... /project Then to build, I do this: mvn install dependency:copy-dependencies That does a totally adequate job of putting everything out in my target directory for me. Thanks for your help, people. Larry On 11/20/06, Barrie Treloar [EMAIL PROTECTED] wrote: On 11/21/06, Larry Meadors [EMAIL PROTECTED] wrote: Hi, I am using maven for the first time, so I apologize if this is a retarded question, but I can't find it anywhere in the docs. I have an app that is a command line app. I want to create an assembly that has my jar, along with the other jars that are listed as dependencies on it. See * http://www.nabble.com/forum/ViewPost.jtp?post=5936062framed=yskin=177 * http://www.nabble.com/forum/ViewPost.jtp?post=5954911framed=yskin=177 for an example of how to do this. - 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]
Using the assembly plugin to build a stand-alone application
Hi, I am using maven for the first time, so I apologize if this is a retarded question, but I can't find it anywhere in the docs. I have an app that is a command line app. I want to create an assembly that has my jar, along with the other jars that are listed as dependencies on it. I tried the jar-with-dependencies approach, and that *almost* works, but one of the jars i am including has some added files in the META-INF directory, and they do not end up getting included, so the app fails. Bummer. :( So, I guess i am looking for one of two things: 1) how can I get *all* the files in the uber jar. -or- 2) how can I get the assembly to just put all the individual dependent jars in a directory somewhere? I think I'd prefer #2, but at this point... I'll take what I can get! :-) TIA, Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using the assembly plugin to build a stand-alone application
On 11/21/06, Larry Meadors [EMAIL PROTECTED] wrote: Hi, I am using maven for the first time, so I apologize if this is a retarded question, but I can't find it anywhere in the docs. I have an app that is a command line app. I want to create an assembly that has my jar, along with the other jars that are listed as dependencies on it. See * http://www.nabble.com/forum/ViewPost.jtp?post=5936062framed=yskin=177 * http://www.nabble.com/forum/ViewPost.jtp?post=5954911framed=yskin=177 for an example of how to do this. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using the assembly plugin to build a stand-alone application
Hi Larry, I'm doing this, too. I think you'll need to create your own assembly descriptor. Here is mine: assembly idbin/id formats formattar.gz/format formatzip/format /formats fileSets fileSet directorytarget/directory outputDirectory/outputDirectory includes include*.jar/include !-- the jar of this project's classes -- /includes /fileSet fileSet directorytarget/scripts/directory outputDirectory/outputDirectory includes include*/include !-- clui scripts to launch the main java class -- /includes fileMode755/fileMode /fileSet fileSet directorytarget/doc/directory outputDirectory/outputDirectory includes include*/include /includes /fileSet /fileSets files file sourceREADME/source outputDirectory//outputDirectory fileMode644/fileMode !-- broken. see http://jira.codehaus.org/browse/MASSEMBLY-153 -- /file /files dependencySets dependencySet /dependencySet /dependencySets /assembly Paul Larry Meadors-2 wrote: Hi, I am using maven for the first time, so I apologize if this is a retarded question, but I can't find it anywhere in the docs. I have an app that is a command line app. I want to create an assembly that has my jar, along with the other jars that are listed as dependencies on it. I tried the jar-with-dependencies approach, and that *almost* works, but one of the jars i am including has some added files in the META-INF directory, and they do not end up getting included, so the app fails. Bummer. :( So, I guess i am looking for one of two things: 1) how can I get *all* the files in the uber jar. -or- 2) how can I get the assembly to just put all the individual dependent jars in a directory somewhere? I think I'd prefer #2, but at this point... I'll take what I can get! :-) TIA, Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Using-the-assembly-plugin-to-build-a-stand-alone-application-tf2670816s177.html#a7448665 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: Using the assembly plugin to build a stand-alone application
Thanks, Paul - I added that as a file named assembly.xml in the directory with my pom.xml in it. I then added this to my pom (in the build/plugins section): === plugin artifactIdmaven-assembly-plugin/artifactId version2.0-beta-1/version configuration descriptorIdbin/descriptorId descriptors descriptor./assembly.xml/descriptor /descriptors finalNamemarcdelivery/finalName outputDirectorytarget/assembly/outputDirectory workDirectorytarget/assembly/work/workDirectory /configuration /plugin === But it still only creates 4 files: - target/marc-delivery-1.0-SNAPSHOT.jar - target/assembly/marcdelivery-bin.tar.gz - target/assembly/marcdelivery-bin.tar.bz2 - target/assembly/marcdelivery-bin.zip If I remove the descriptorIdbin/descriptorId line from the pom, I get only one file (target/marc-delivery-1.0-SNAPSHOT.jar) and an error. :( How do you have this in your project? Larry On 11/20/06, pjungwir [EMAIL PROTECTED] wrote: Hi Larry, I'm doing this, too. I think you'll need to create your own assembly descriptor. Here is mine: assembly idbin/id formats formattar.gz/format formatzip/format /formats fileSets fileSet directorytarget/directory outputDirectory/outputDirectory includes include*.jar/include !-- the jar of this project's classes -- /includes /fileSet fileSet directorytarget/scripts/directory outputDirectory/outputDirectory includes include*/include !-- clui scripts to launch the main java class -- /includes fileMode755/fileMode /fileSet fileSet directorytarget/doc/directory outputDirectory/outputDirectory includes include*/include /includes /fileSet /fileSets files file sourceREADME/source outputDirectory//outputDirectory fileMode644/fileMode !-- broken. see http://jira.codehaus.org/browse/MASSEMBLY-153 -- /file /files dependencySets dependencySet /dependencySet /dependencySets /assembly Paul Larry Meadors-2 wrote: Hi, I am using maven for the first time, so I apologize if this is a retarded question, but I can't find it anywhere in the docs. I have an app that is a command line app. I want to create an assembly that has my jar, along with the other jars that are listed as dependencies on it. I tried the jar-with-dependencies approach, and that *almost* works, but one of the jars i am including has some added files in the META-INF directory, and they do not end up getting included, so the app fails. Bummer. :( So, I guess i am looking for one of two things: 1) how can I get *all* the files in the uber jar. -or- 2) how can I get the assembly to just put all the individual dependent jars in a directory somewhere? I think I'd prefer #2, but at this point... I'll take what I can get! :-) TIA, Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Using-the-assembly-plugin-to-build-a-stand-alone-application-tf2670816s177.html#a7448665 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]
Re: Using the assembly plugin to build a stand-alone application
Hi Larry, I believe the descriptorId is required. You must also reference assembly.xml from your POM by giving the assembly plugin a configuration like this: configuration descriptorassembly.xml/descriptor /configuration But the 4 files result is correct, I think. What's in them? The jar should contain only your current project's classes. That is not the result of the assembly plugin, but of the jar plugin (probably running automatically on account of jar packaging). The other three files are coming from the assembly plugin. What's in them? You should see your jar plus your dependency jars. That's what you wanted, right? Paul Larry Meadors-2 wrote: Thanks, Paul - I added that as a file named assembly.xml in the directory with my pom.xml in it. I then added this to my pom (in the build/plugins section): === plugin artifactIdmaven-assembly-plugin/artifactId version2.0-beta-1/version configuration descriptorIdbin/descriptorId descriptors descriptor./assembly.xml/descriptor /descriptors finalNamemarcdelivery/finalName outputDirectorytarget/assembly/outputDirectory workDirectorytarget/assembly/work/workDirectory /configuration /plugin === But it still only creates 4 files: - target/marc-delivery-1.0-SNAPSHOT.jar - target/assembly/marcdelivery-bin.tar.gz - target/assembly/marcdelivery-bin.tar.bz2 - target/assembly/marcdelivery-bin.zip If I remove the descriptorIdbin/descriptorId line from the pom, I get only one file (target/marc-delivery-1.0-SNAPSHOT.jar) and an error. :( How do you have this in your project? Larry On 11/20/06, pjungwir [EMAIL PROTECTED] wrote: Hi Larry, I'm doing this, too. I think you'll need to create your own assembly descriptor. Here is mine: assembly idbin/id formats formattar.gz/format formatzip/format /formats fileSets fileSet directorytarget/directory outputDirectory/outputDirectory includes include*.jar/include !-- the jar of this project's classes -- /includes /fileSet fileSet directorytarget/scripts/directory outputDirectory/outputDirectory includes include*/include !-- clui scripts to launch the main java class -- /includes fileMode755/fileMode /fileSet fileSet directorytarget/doc/directory outputDirectory/outputDirectory includes include*/include /includes /fileSet /fileSets files file sourceREADME/source outputDirectory//outputDirectory fileMode644/fileMode !-- broken. see http://jira.codehaus.org/browse/MASSEMBLY-153 -- /file /files dependencySets dependencySet /dependencySet /dependencySets /assembly Paul Larry Meadors-2 wrote: Hi, I am using maven for the first time, so I apologize if this is a retarded question, but I can't find it anywhere in the docs. I have an app that is a command line app. I want to create an assembly that has my jar, along with the other jars that are listed as dependencies on it. I tried the jar-with-dependencies approach, and that *almost* works, but one of the jars i am including has some added files in the META-INF directory, and they do not end up getting included, so the app fails. Bummer. :( So, I guess i am looking for one of two things: 1) how can I get *all* the files in the uber jar. -or- 2) how can I get the assembly to just put all the individual dependent jars in a directory somewhere? I think I'd prefer #2, but at this point... I'll take what I can get! :-) TIA, Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Using-the-assembly-plugin-to-build-a-stand-alone-application-tf2670816s177.html#a7448665 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] -- View this message in context: http://www.nabble.com/Using-the-assembly-plugin-to-build-a-stand-alone-application-tf2670816s177.html#a7449750 Sent from the Maven - Users mailing