Re: release multi module project
Hi! On 21 Jul 2008, Taras Lipatov wrote: Does any one know, when releasing a multi-module project from the project parent.. I have two modules: core and webapp core module is version 1.0.0-SNAPSHOT webapp has a dependency on core:1.0.0-SNAPSHOT When running release:prepare... webapp pom is transformed and dependency core:1.0.0-SNAPSHOT is now core:1.0.0 which is correct sense that's the version of core that's being released. How ever the webapp module complains that it cannot find core:1.0.0 Even though core is declared 1st in the parent pom. The problem is very likely not to be with the release plugin but with your packaging. Try a mvn -o package from your parent directory with an empty repository (empty means none of YOUR modules in the local repo). I bet it's going to fail. What packaging is set in your parent, the core and the webapp? Maven should be able to find all three modules when building from the parent. If not something's wrong. I had (partly still have) similar problems with EARs and skinny WARs. Is there any way to do this in one shot? Yes, fix the packaging problem and the release will work. hth, - martin signature.asc Description: PGP signature
Re: release multi module project
Thanks for the info!! So I guess I have an odd-ball case with my artifacts.. Here is the full scenario. I have a project with 2 modules: `-- project-parent |-- pom.xml |-- core | `-- pom.xml `-- webapp `-- pom.xml project-parent: - packaging pom core: - artifact: core:1.0.0-SNAPSHOT - packaging jar - also uses assembly:single to create a core-1.0.0-SNAPSHOT.zip containing various static content.. webapp: - packaging war - depends on core:1.0.0-SNAPSHOT.jar and core-1.0.0-SNAPSHOT.zip The webapp module cannot resolve core-1.0.0-SNAPSHOT.zip, unless I mvn install the core module. I take it that .zip format is completely unsupported? And I take it that only the artifact that's generated by the pom (not assembly) will resolve? Thoughts? Thanks! T. On Tue, 2008-07-22 at 09:17 +0200, Martin Höller wrote: Hi! On 21 Jul 2008, Taras Lipatov wrote: Does any one know, when releasing a multi-module project from the project parent.. I have two modules: core and webapp core module is version 1.0.0-SNAPSHOT webapp has a dependency on core:1.0.0-SNAPSHOT When running release:prepare... webapp pom is transformed and dependency core:1.0.0-SNAPSHOT is now core:1.0.0 which is correct sense that's the version of core that's being released. How ever the webapp module complains that it cannot find core:1.0.0 Even though core is declared 1st in the parent pom. The problem is very likely not to be with the release plugin but with your packaging. Try a mvn -o package from your parent directory with an empty repository (empty means none of YOUR modules in the local repo). I bet it's going to fail. What packaging is set in your parent, the core and the webapp? Maven should be able to find all three modules when building from the parent. If not something's wrong. I had (partly still have) similar problems with EARs and skinny WARs. Is there any way to do this in one shot? Yes, fix the packaging problem and the release will work. hth, - martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: release multi module project
You should use the maven build-helper plugin ( http://mojo.codehaus.org/build-helper-maven-plugin) in order to attach the zip artifact to your JAR pom so that Maven is aware of it and can build pacefully. Jeff MAURY On 7/22/08, Taras Lipatov [EMAIL PROTECTED] wrote: Thanks for the info!! So I guess I have an odd-ball case with my artifacts.. Here is the full scenario. I have a project with 2 modules: `-- project-parent |-- pom.xml |-- core | `-- pom.xml `-- webapp `-- pom.xml project-parent: - packaging pom core: - artifact: core:1.0.0-SNAPSHOT - packaging jar - also uses assembly:single to create a core-1.0.0-SNAPSHOT.zip containing various static content.. webapp: - packaging war - depends on core:1.0.0-SNAPSHOT.jar and core-1.0.0-SNAPSHOT.zip The webapp module cannot resolve core-1.0.0-SNAPSHOT.zip, unless I mvn install the core module. I take it that .zip format is completely unsupported? And I take it that only the artifact that's generated by the pom (not assembly) will resolve? Thoughts? Thanks! T. On Tue, 2008-07-22 at 09:17 +0200, Martin Höller wrote: Hi! On 21 Jul 2008, Taras Lipatov wrote: Does any one know, when releasing a multi-module project from the project parent.. I have two modules: core and webapp core module is version 1.0.0-SNAPSHOT webapp has a dependency on core:1.0.0-SNAPSHOT When running release:prepare... webapp pom is transformed and dependency core:1.0.0-SNAPSHOT is now core:1.0.0 which is correct sense that's the version of core that's being released. How ever the webapp module complains that it cannot find core:1.0.0 Even though core is declared 1st in the parent pom. The problem is very likely not to be with the release plugin but with your packaging. Try a mvn -o package from your parent directory with an empty repository (empty means none of YOUR modules in the local repo). I bet it's going to fail. What packaging is set in your parent, the core and the webapp? Maven should be able to find all three modules when building from the parent. If not something's wrong. I had (partly still have) similar problems with EARs and skinny WARs. Is there any way to do this in one shot? Yes, fix the packaging problem and the release will work. hth, - martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- La mélancolie c'est communiste Tout le monde y a droit de temps en temps La mélancolie n'est pas capitaliste C'est même gratuit pour les perdants La mélancolie c'est pacifiste On ne lui rentre jamais dedans La mélancolie oh tu sais ça existe Elle se prend même avec des gants La mélancolie c'est pour les syndicalistes Il faut juste sa carte de permanent Miossec (2006) http://www.jeffmaury.com http://riadiscuss.jeffmaury.com http://www.lastfm.fr/listen/user/jeffmaury/personal
Re: release multi module project
Thanks for the suggestion, How ever, the module only seems to attach the .zip to the life-cycle for install/deploy and it is still not resolving in the module.. so my layout is: project-parent - core -webapp module core generates: org.my.group:core-1.0.0-SNAPSHOT.zip using the assembly plugin.. But the webapp module cannot resolve it when building from parent, unless I first run: mvn install on the core module. Here is how I declare the dependency in webapp module: dependencies dependency groupIdorg.my.group/groupId artifactIdcore/artifactId version1.0.0-SNAPSHOT/version typezip/type /dependency /dependencies Then I need to do something with it.. plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId version2.0/version executions execution idunpack-core/id phase generate-sources /phase goals goalunpack/goal /goals configuration artifactItems artifactItem groupId org.my.group /groupId artifactId core /artifactId typezip/type /artifactItem /artifactItems /configuration /execution /executions /plugin On Tue, 2008-07-22 at 16:55 +0200, Jeff MAURY wrote: You should use the maven build-helper plugin (http://mojo.codehaus.org/build-helper-maven-plugin) in order to attach the zip artifact to your JAR pom so that Maven is aware of it and can build pacefully. Jeff MAURY On 7/22/08, Taras Lipatov [EMAIL PROTECTED] wrote: Thanks for the info!! So I guess I have an odd-ball case with my artifacts.. Here is the full scenario. I have a project with 2 modules: `-- project-parent |-- pom.xml |-- core | `-- pom.xml `-- webapp `-- pom.xml project-parent: - packaging pom core: - artifact: core:1.0.0-SNAPSHOT - packaging jar - also uses assembly:single to create a core-1.0.0-SNAPSHOT.zip containing various static content.. webapp: - packaging war - depends on core:1.0.0-SNAPSHOT.jar and core-1.0.0-SNAPSHOT.zip The webapp module cannot resolve core-1.0.0-SNAPSHOT.zip, unless I mvn install the core module. I take it that .zip format is completely unsupported? And I take it that only the artifact that's generated by the pom (not assembly) will resolve? Thoughts? Thanks! T. On Tue, 2008-07-22 at 09:17 +0200, Martin Höller wrote: Hi! On 21 Jul 2008, Taras Lipatov wrote: Does any one know, when releasing a multi-module project from the project parent.. I have two modules: core and webapp core module is version 1.0.0-SNAPSHOT webapp has a dependency on core:1.0.0-SNAPSHOT When running release:prepare... webapp pom is transformed and dependency core:1.0.0-SNAPSHOT is now core:1.0.0 which is correct sense that's the version of core that's being released. How ever the webapp module complains that it cannot find core:1.0.0 Even though core is declared 1st in the parent pom. The problem is very likely not to be with the release plugin but with your packaging. Try a mvn -o package from your parent directory with an empty repository (empty means none of YOUR modules in the local repo). I bet it's going to fail. What packaging is set in your parent, the core and the webapp? Maven should be able to find all three modules when building from the parent. If not something's wrong. I had (partly still have) similar problems with EARs and skinny WARs.
Re: release multi module project
On 22 Jul 2008, Taras Lipatov wrote: Thanks for the info!! So I guess I have an odd-ball case with my artifacts.. Here is the full scenario. I have a project with 2 modules: `-- project-parent |-- pom.xml |-- core | `-- pom.xml `-- webapp `-- pom.xml project-parent: - packaging pom core: - artifact: core:1.0.0-SNAPSHOT - packaging jar - also uses assembly:single to create a core-1.0.0-SNAPSHOT.zip containing various static content.. So you configured your core module to generate a JAR and a ZIP file on a execution of mvn install, correct? I guess you have some good reason the create the ZIP file. Have you? webapp: - packaging war - depends on core:1.0.0-SNAPSHOT.jar and core-1.0.0-SNAPSHOT.zip Is depending on core-1.0.0-SNAPSHOT.jar not enough? This should probably work out of the box. The webapp module cannot resolve core-1.0.0-SNAPSHOT.zip, unless I mvn install the core module. I take it that .zip format is completely unsupported? And I take it that only the artifact that's generated by the pom (not assembly) will resolve? I don't know if it's possible to use the ZIP file if it comes from another build in the same multi-module project. But at least you would need some extra configuration. hth, - martin signature.asc Description: PGP signature