|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Cargo and multi-module projectHi List,
I'm creating an automatic build system using Hudson, Maven and Cargo. This system will be used for many projects that use Maven, so in order to not have to duplicate the cargo configuration over and over, I placed it in a parent pom. Now, I have this multi-module project that consists of: - Module1: JAR library - Module2: JAR library - Module3: WAR webapp including Module1 and Module2 The structure of my project looks like this: PARENT POM (Containing Cargo configuration) Project PARENT POM (Common settings for all modules all stored here) Module1 POM (jar) Module2 POM (jar) Module3 POM (war) When I execute Maven, I see that the Cargo plugin is executed for all modules, even for the Project Parent POM. I only want Cargo to be executed for Module3. I've been looking for a solution for the last three days, unfortunately without any success. I tried putting the Cargo settings inside a profile, and activate this profile in case the project type is WAR, but Maven doesn't support this. A solution would be to put the Cargo configuration inside the War POM. But take into account that this will be used by many many Maven projects, and it's really a pitty that I have to include the exactly the same configuration in each project. I would really appreciate it if someone could shed a light on this. Thanks in advance. |
|
|
Re: Cargo and multi-module projectOn Thu, May 14, 2009 at 6:46 PM, Bocalinda <bocalinda@...> wrote:
When I execute Maven, I see that the Cargo plugin is executed for all modules, even for the Project Parent POM. This is most likely a maven2 question, and not really a cargo problem. You could try to reconfigure the executions of the cargo plugin in the specific module. Not sure if this would work, just a wild guess :) <plugin> ... <executions> <execution> <phase>package</phase> <goals> <goal></goal> </goals> </execution> </executions> ... </plugin> You can dig deeper into the matter by reading: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html http://maven.apache.org/guides/mini/guide-configuring-plugins.html#Using_the_executions_Tag -- Alexander Brill http://brill.no |
|
|
Re: Cargo and multi-module projectHi Alexander,
Thank you for your response. Unfortunately your proposed solution will not work, as each module that I have (no matter which type it is; jar, war) will pass through all the steps of the build lifecycle, and thus will always execute the Cargo plugin. I only want it to be executed for WAR files. I'm really stuck, but I guess one can never give up :-) Thanks again for your help. 2009/5/16 Alexander Brill <alex@...>
|
|
|
Re: Cargo and multi-module projectOn Mon, 2009-05-18 at 09:18 +0200, Bocalinda wrote:
> Hi Alexander, > > Thank you for your response. > Unfortunately your proposed solution will not work, as each module > that I have (no matter which type it is; jar, war) will pass through > all the steps of the build lifecycle, and thus will always execute the > Cargo plugin. I only want it to be executed for WAR files. > > I'm really stuck, but I guess one can never give up :-) Anyone familiar enough with Maven know how this should be handled? > Thanks again for your help. > > 2009/5/16 Alexander Brill <alex@...> > On Thu, May 14, 2009 at 6:46 PM, Bocalinda > <bocalinda@...> wrote: > > When I execute Maven, I see that the Cargo plugin is > executed for all modules, even for the Project Parent > POM. > I only want Cargo to be executed for Module3. I've > been looking for a solution for the last three days, > unfortunately without any success. > > > > > This is most likely a maven2 question, and not really a cargo > problem. > > You could try to reconfigure the executions of the cargo > plugin in the specific module. Not sure if this would work, > just a wild guess :) > > <plugin> > ... > <executions> > <execution> > <phase>package</phase> > <goals> > <goal></goal> > </goals> > </execution> > </executions> > ... > </plugin> > > > You can dig deeper into the matter by reading: > http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html > http://maven.apache.org/guides/mini/guide-configuring-plugins.html#Using_the_executions_Tag > > > > -- > Alexander Brill > http://brill.no > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |