From what I undesrtand of Maven (I am not completely new but I never read the code and other insights of it), when you call mvn some-goal on a multi-module project, it is equivalent to calling this goal on every module of the project (in the reactor order of course). Hence, when you call assembly:single on your parent project (btw, the root parent is always the first "module" built), it is like you added maven assembly to the build of all modules of the project and you want it to be used with its default configuration. I am not sure of the default configuration, but my guess is that it looks for a default assembly descriptor which is not found--> this causes your error.

Now, if you want, you can probably either configure maven-assembly not to run for certain modules using the skipAssembly parameter or use profiles to only execute when you want.

I am not sur at all, but I think that you can define the following property ${assembly.skipAssembly} to true in your root project and within the one you want to execute maven assembly, you override by setting that property to false. Then calling mvn assembly:single on your parent should skip maven-assembly on all your project except the one you want.

in your root project:
<properties>
<assembly.skipAssembly>true</assembly.skipAssembly>
</properties>

and in your specific one:
<properties>
<assembly.skipAssembly>false</assembly.skipAssembly>
</properties>

but I haven't tested this, so I am not sure it works.

Guillaume

Le 27/06/2011 16:50, Jean-Pierre Bergamin a écrit :
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

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).
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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to