No, you shouldn't be doing that in the parent project. As the parent project needs to be built before the children, it will not work (or will require some workaround). The profile you have is what I would suggest. Or, maybe even keep this module outside of the build all together as a separate project which you only build on demand (or have CI build every now and then).
/Anders On Mon, Jun 27, 2011 at 16:50, Jean-Pierre Bergamin <[email protected]>wrote: > Good point, thanks. I tried to only add the distribution child module for a > given profile like this: > > <profiles> > <profile> > <id>dist</id> > <modules> > <module>distribution_project</**module> > </modules> > </profile> > </profiles> > > So the assembly plugin is only run when setting the dist profile like: > mvn -P dist package > > This would be a possible solution. > > But I still would expect that simply calling mvn assembly:single from the > parent should work or that there are "simpler" solutions. > > > Best regards, > James > > > Am 27.06.2011 16:26, schrieb Guillaume Polet: > > Could'nt you use a profile for that purpose? >> http://maven.apache.org/**guides/introduction/** >> introduction-to-profiles.html<http://maven.apache.org/guides/introduction/introduction-to-profiles.html> >> >> Cheers, >> >> Guillaume >> >> Le 27/06/2011 16:23, Jean-Pierre Bergamin a écrit : >> >>> Hello maven users >>> >>> We are using the maven assembly plugin to copy all generated modules >>> and dependencies to one "central" folder. For this we created a >>> dedicated child module that used the assembly plugin as desribed in >>> the FAQ >>> (http://maven.apache.org/**plugins/maven-assembly-plugin/** >>> faq.html#module-binaries<http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#module-binaries> >>> ). >>> The assembly:single goal is executed in the package phase at the >>> moment. Because it always takes quite a while for the assembly package >>> to run, we do not want to execute it in the package phase by default >>> anymore, but only on request by the user. >>> >>> Now is there a way to execute the assembly:single goal from the parent >>> project explicitely? When assembly:single goal is executed in the >>> package phase, it works. When I try to execute "mvn assembly:single" >>> from the parent without having it run in the package phase, I get the >>> error: >>> >>> [ERROR] Failed to execute goal >>> org.apache.maven.plugins:**maven-assembly-plugin:2.2-**beta-5:single >>> (default-cli) on project eranger: Error reading assemblies: No >>> assembly descriptors found. -> [Help 1] >>> >>> Any ideas how the assembly:single can be called explicitely? >>> >>> >>> Best regards, >>> James >>> >>> >>> ------------------------------**------------------------------** >>> --------- >>> To unsubscribe, e-mail: >>> users-unsubscribe@maven.**apache.org<[email protected]> >>> For additional commands, e-mail: [email protected] >>> >>> > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@maven.**apache.org<[email protected]> > For additional commands, e-mail: [email protected] > >
