Re: Tar pom.xml dependencies - Maven Assembly Plugin?
Yes, the assembly plugin is they way to do this. Declare the packaging as pom. There are several examples at the plugin's homepage, or google for some live ones. /Anders On Tue, Jan 11, 2011 at 02:11, jaybytez jayby...@yahoo.com wrote: Is the Maven Assembly Plugin the right way for me to define a pom.xml and be able to tar up the jars that are labeled as a dependency? The only way I know how to do this with my limited knowledge is to make the pom.xml a war and allow the war to pull all the dependency jars into the target directory and then tar those up. Thanks for your help, Jay Blanton -- View this message in context: http://maven.40175.n5.nabble.com/Tar-pom-xml-dependencies-Maven-Assembly-Plugin-tp3335797p3335797.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Tar pom.xml dependencies - Maven Assembly Plugin?
If you are building an web application (war or ear) then I would take a look at the maven-war-plugin and maven-ear-plugin. Here's an example: plugin artifactIdmaven-war-plugin/artifactId configuration archive manifest addClasspathtrue/addClasspath /manifest /archive warSourceDirectory ${basedir}/target/jwsc-generated/jws /warSourceDirectory webXml${basedir}/src/main/webapp/web.xml/webXml /configuration /plugin -- View this message in context: http://maven.40175.n5.nabble.com/Tar-pom-xml-dependencies-Maven-Assembly-Plugin-tp3335797p3336789.html Sent from the Maven - Users mailing list archive at Nabble.com.
Re: Tar pom.xml dependencies - Maven Assembly Plugin?
Thanks...I went through the example and created a bin.xml that represented the jar-with-dependencies example. assembly xmlns=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd; !-- TODO: a jarjar format would be better -- idjar-with-dependencies/id formats formatjar/format /formats includeBaseDirectoryfalse/includeBaseDirectory dependencySets dependencySet outputDirectory//outputDirectory useProjectArtifacttrue/useProjectArtifact unpacktrue/unpack scoperuntime/scope /dependencySet /dependencySets /assembly And it throws an error when I try this with a sample pom. [INFO] Scanning for projects... [INFO] [INFO] Building Cookbook :: generate-assembly [INFO]task-segment: [package] [INFO] [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] [WARNING] DEPRECATED [descriptor]: Please use descriptors instead [INFO] [assembly:single {execution: default}] [WARNING] Cannot include project artifact: org.apache.maven.cookbook:generate-assembly:pom:1.0-SNAPSHOT; it doesn't have an associated file or directory. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Error creating assembly archive jar-with-dependencies: You must set at least one file. [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 2 seconds [INFO] Finished at: Tue Jan 11 13:42:25 PST 2011 [INFO] Final Memory: 11M/28M [INFO] Any thoughts?thanks...jay -- View this message in context: http://maven.40175.n5.nabble.com/Tar-pom-xml-dependencies-Maven-Assembly-Plugin-tp3335797p3337379.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Tar pom.xml dependencies - Maven Assembly Plugin?
It looks like you have a pom project, but have declared to use the project's artifact. A pom project only have the pom artifact, so that might be the reason of the error message. Try declaring useProjectArtifact as false. /Anders On Tue, Jan 11, 2011 at 22:43, jaybytez jayby...@yahoo.com wrote: Thanks...I went through the example and created a bin.xml that represented the jar-with-dependencies example. assembly xmlns= http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd; !-- TODO: a jarjar format would be better -- idjar-with-dependencies/id formats formatjar/format /formats includeBaseDirectoryfalse/includeBaseDirectory dependencySets dependencySet outputDirectory//outputDirectory useProjectArtifacttrue/useProjectArtifact unpacktrue/unpack scoperuntime/scope /dependencySet /dependencySets /assembly And it throws an error when I try this with a sample pom. [INFO] Scanning for projects... [INFO] [INFO] Building Cookbook :: generate-assembly [INFO]task-segment: [package] [INFO] [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] [WARNING] DEPRECATED [descriptor]: Please use descriptors instead [INFO] [assembly:single {execution: default}] [WARNING] Cannot include project artifact: org.apache.maven.cookbook:generate-assembly:pom:1.0-SNAPSHOT; it doesn't have an associated file or directory. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Error creating assembly archive jar-with-dependencies: You must set at least one file. [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 2 seconds [INFO] Finished at: Tue Jan 11 13:42:25 PST 2011 [INFO] Final Memory: 11M/28M [INFO] Any thoughts?thanks...jay -- View this message in context: http://maven.40175.n5.nabble.com/Tar-pom-xml-dependencies-Maven-Assembly-Plugin-tp3335797p3337379.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Tar pom.xml dependencies - Maven Assembly Plugin?
Is the Maven Assembly Plugin the right way for me to define a pom.xml and be able to tar up the jars that are labeled as a dependency? The only way I know how to do this with my limited knowledge is to make the pom.xml a war and allow the war to pull all the dependency jars into the target directory and then tar those up. Thanks for your help, Jay Blanton -- View this message in context: http://maven.40175.n5.nabble.com/Tar-pom-xml-dependencies-Maven-Assembly-Plugin-tp3335797p3335797.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org