WEIRD : mvn assembly is not adding my dependencies
Greetings All, Okay here is an issue and I am not sure what am I doing wrong. I had this in one my sub project pom plugin artifactIdmaven-assembly-plugin/artifactId configuration descriptors descriptorsrc/assemble/CPWebService-assembly.xml/descriptor /descriptors /configuration /plugin and now problem is that if I issue mvn assemly:assembly from main project then it complains that descriptior could not be found because I guess main POM has no clue for that. So every time I have to go to sub project and issue assembly command there. c:\main\mvn assembly:assembly comapins that descriptor is not found [INFO] [assembly:assembly] [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] No assembly descriptors found. [INFO] Now if I move to sub project c:\main\sublevel1\sublevel2\mvn assembly:assembly It works fine and I get my zip file Now I don't wanna move to sub project to issue assembly command so is it possible if I could issue mvn assembly:assembly from main project ??? If it is _NOT_ possible then I have already tried following. Alternate try: What I did that I moved the above assemby plugin to main POM and made change in descriptor tag to find the assemly file with respect to main project then I issued mvn assembly from main project and I had success and got zip file which included all files and filesets but it did not inlcude all dependenices in my and showed no error by the way. My assembly.xml contains (just a snippet) files file sourcesrc/main/lib/windows-x86-32.dll/source outputDirectory/bin/outputDirectory /file /files dependencySets dependencySet unpackfalse/unpack scoperuntime/scope outputDirectory/lib/outputDirectory includes includecom.abc.cp:cps-core/include includecom.abc.cp:cps-authn/include includecom.abc.cp:cps-authz/include includecom.abc.cp:cps-inv/include includecom.abc.cp:cps-perf/include includecom.abc.cp:CPWebService/include includeorg.springframework:spring/include includeorg.hibernate:hibernate/include includeorg.hibernate:hibernate-annotations/include includecommons-dbcp:commons-dbcp/include includedom4j:dom4j/include includejavax.transaction:jta/include includecom.microsoft.jdbcdriver:sqljdbc/include includecommons-pool:commons-pool/include includejavax.persistence:persistence-api/include includecommons-collections:commons-collections/include includecglib:cglib/include includeasm:asm/include includeantlr:antlr/include /includes /dependencySet /dependencySets Ok so I am wondering why my dependencies are not including if I add assmebly plugin in main project while if I leave assembly plugin in sub project, they are added. I have almostly tried one whole day to make it work but no luck. Any help is appreciated. Thanks, Petr V. P.S. I admit that my maven knowledge is based on fire fighting. When ever I face issue, I google and get things done and I am not proeprly trained in maven. - Ahhh...imagining that irresistible new car smell? Check outnew cars at Yahoo! Autos.
Re: WEIRD : mvn assembly is not adding my dependencies
You might find it easier to bind the assembly construction to the main build process, in the package phase (for example). To do this, you can use the assembly:single mojo like this: plugin artifactIdmaven-assembly-plugin/artifactId version2.2-beta-1/version executions execution idassembly/id phasepackage/phase goalsgoalsingle/goal/goals configuration descriptors descriptorsrc/assemble/CPWebService-assembly.xml/descriptor /descriptors /configuration /execution /executions /plugin Now, when you fire off the build from the top-level like this: mvn clean install you'll see that the sub-project with the assembly plugin configuration will go ahead and put the assembly together when everything is packaged up. Incidentally, using the single mojo allows you to have multiple assemblies in the same multi-module build. HTH, John On 4/18/07, Petr V. [EMAIL PROTECTED] wrote: Greetings All, Okay here is an issue and I am not sure what am I doing wrong. I had this in one my sub project pom plugin artifactIdmaven-assembly-plugin/artifactId configuration descriptors descriptorsrc/assemble/CPWebService-assembly.xml /descriptor /descriptors /configuration /plugin and now problem is that if I issue mvn assemly:assembly from main project then it complains that descriptior could not be found because I guess main POM has no clue for that. So every time I have to go to sub project and issue assembly command there. c:\main\mvn assembly:assembly comapins that descriptor is not found [INFO] [assembly:assembly] [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] No assembly descriptors found. [INFO] Now if I move to sub project c:\main\sublevel1\sublevel2\mvn assembly:assembly It works fine and I get my zip file Now I don't wanna move to sub project to issue assembly command so is it possible if I could issue mvn assembly:assembly from main project ??? If it is _NOT_ possible then I have already tried following. Alternate try: What I did that I moved the above assemby plugin to main POM and made change in descriptor tag to find the assemly file with respect to main project then I issued mvn assembly from main project and I had success and got zip file which included all files and filesets but it did not inlcude all dependenices in my and showed no error by the way. My assembly.xml contains (just a snippet) files file sourcesrc/main/lib/windows-x86-32.dll/source outputDirectory/bin/outputDirectory /file /files dependencySets dependencySet unpackfalse/unpack scoperuntime/scope outputDirectory/lib/outputDirectory includes includecom.abc.cp:cps-core/include includecom.abc.cp:cps-authn/include includecom.abc.cp:cps-authz/include includecom.abc.cp:cps-inv/include includecom.abc.cp:cps-perf/include includecom.abc.cp:CPWebService/include includeorg.springframework:spring/include includeorg.hibernate:hibernate/include includeorg.hibernate:hibernate-annotations/include includecommons-dbcp:commons-dbcp/include includedom4j:dom4j/include includejavax.transaction:jta/include includecom.microsoft.jdbcdriver:sqljdbc/include includecommons-pool:commons-pool/include includejavax.persistence:persistence-api/include includecommons-collections:commons-collections/include includecglib:cglib/include includeasm:asm/include includeantlr:antlr/include /includes /dependencySet /dependencySets Ok so I am wondering why my dependencies are not including if I add assmebly plugin in main project while if I leave assembly plugin in sub project, they are added. I have almostly tried one whole day to make it work but no luck. Any help is appreciated. Thanks, Petr V. P.S. I admit that my maven knowledge is based on fire fighting. When ever I face issue, I google and get things done and I am not proeprly trained in maven. - Ahhh...imagining that irresistible new car smell? Check outnew cars at Yahoo! Autos.
Re: WEIRD : mvn assembly is not adding my dependencies
Thanks John. you rock. I was able to add all dependencies but only one dependency was not added in my zip file. Guess which one ??? The jar file which was output of sub project :-( So basically I put the snippet in my sub project pom and issued mvn assembly from main project. It went via and It included all the dependencies from assembly dependency list but still missed the one dependency that was asking to add the jar file of sub project pom. Any trick for that ??? I hope that I am able to convey the point. Thanks for your support. Petr V. John Casey [EMAIL PROTECTED] wrote: You might find it easier to bind the assembly construction to the main build process, in the package phase (for example). To do this, you can use the assembly:single mojo like this: maven-assembly-plugin 2.2-beta-1 assembly package single src/assemble/CPWebService-assembly.xml Now, when you fire off the build from the top-level like this: mvn clean install you'll see that the sub-project with the assembly plugin configuration will go ahead and put the assembly together when everything is packaged up. Incidentally, using the single mojo allows you to have multiple assemblies in the same multi-module build. HTH, John On 4/18/07, Petr V. wrote: Greetings All, Okay here is an issue and I am not sure what am I doing wrong. I had this in one my sub project pom maven-assembly-plugin src/assemble/CPWebService-assembly.xml and now problem is that if I issue mvn assemly:assembly from main project then it complains that descriptior could not be found because I guess main POM has no clue for that. So every time I have to go to sub project and issue assembly command there. c:\main\mvn assembly:assembly comapins that descriptor is not found [INFO] [assembly:assembly] [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] No assembly descriptors found. [INFO] Now if I move to sub project c:\main\sublevel1\sublevel2\mvn assembly:assembly It works fine and I get my zip file Now I don't wanna move to sub project to issue assembly command so is it possible if I could issue mvn assembly:assembly from main project ??? If it is _NOT_ possible then I have already tried following. Alternate try: What I did that I moved the above assemby plugin to main POM and made change in tag to find the assemly file with respect to main project then I issued mvn assembly from main project and I had success and got zip file which included all files and filesets but it did not inlcude all dependenices in my and showed no error by the way. My assembly.xml contains (just a snippet) src/main/lib/windows-x86-32.dll /bin false runtime /lib com.abc.cp:cps-core com.abc.cp:cps-authn com.abc.cp:cps-authz com.abc.cp:cps-inv com.abc.cp:cps-perf com.abc.cp:CPWebService org.springframework:spring org.hibernate:hibernate org.hibernate:hibernate-annotations commons-dbcp:commons-dbcp dom4j:dom4j javax.transaction:jta com.microsoft.jdbcdriver:sqljdbc commons-pool:commons-pool javax.persistence:persistence-api commons-collections:commons-collections cglib:cglib asm:asm antlr:antlr Ok so I am wondering why my dependencies are not including if I add assmebly plugin in main project while if I leave assembly plugin in sub project, they are added. I have almostly tried one whole day to make it work but no luck. Any help is appreciated. Thanks, Petr V. P.S. I admit that my maven knowledge is based on fire fighting. When ever I face issue, I google and get things done and I am not proeprly trained in maven. - Ahhh...imagining that irresistible new car smell? Check outnew cars at Yahoo! Autos. - Ahhh...imagining that irresistible new car smell? Check outnew cars at Yahoo! Autos.