Pankaj,
The problem is in your includes. "javadoc" and "source" are classifiers,
not types.
Try
groupA:A:jar:sources
groupB:A:jar:javadoc
and so on.
Matt
> -----Original Message-----
> From: Pankaj [mailto:[email protected]]
> Sent: Thursday, May 17, 2012 12:11 PM
> To: [email protected]
> Subject: Maven Assembly plugin -Multi module project- source and
> javadoc not getting added to zip file
>
> I've multi module project and using maven's assembly plugin to zip the
> project's artifact.
>
> Proj
> +Module A
> pom.xml
> +Module B
> pom.xml
> pom.xml
>
> When i build main module, it will produce following things
>
> Proj
> +Module A
> target\A.jar
> target\A-source.jar
> target\A-javadoc.jar
> +Module B
> target\B.jar
> target\B-source.jar
> target\B-javadoc.jar
>
> 1) I've added assembly plugin under ModuleB pom file and I'm using
> ModuleSet
> in assembly discriptor file
>
> <moduleSets>
> <moduleSet>
> <useAllReactorProjects>true</useAllReactorProjects>
> <includes>
> <include>groupA:A:jar</include>
> <include>groupA:A:javadoc</include>
> <include>groupA:A:source</include>
> </includes>
> <binaries>
> <outputDirectory>moduleA</outputDirectory>
> <unpack>false</unpack>
> </binaries>
> </moduleSet>
>
> <moduleSet>
> <useAllReactorProjects>true</useAllReactorProjects>
> <includes>
> <include>groupB:B:jar</include>
> <include>groupB:B:javadoc</include>
> <include>groupB:B:source</include>
> </includes>
> <binaries>
> <outputDirectory>moduleB</outputDirectory>
> <unpack>false</unpack>
> </binaries>
> </moduleSet>
> </moduleSets>
>
> But i'm getting only A.jar and B.Jar under zip file. I'm not getting
> javadoc
> and source in zip file. Is it downloading it from m2 repo, i'm
> suspecting
> if it does so, because sources and java doc wouldn't be there in maven
> repo.
> How can i add all three artifact in a zip file ?
>
> 2) I want to add assembly plugin in my parent pom rather than in
> ModuleB's
> pom but if i do so, i get an exception "Please ensure the package
phase
> is
> run before the assembly is generated". After googling, i found few
> suggetion
> to add assembly as module. Is there any other way to handle this ?
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Maven-
> Assembly-plugin-Multi-module-project-source-and-javadoc-not-getting-
> added-to-zip-file-tp5708932.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
______________________________________________________________________
This message, including any attachments, is confidential and contains
information intended only for the person(s) named above. Any other
distribution, copying or disclosure is strictly prohibited. If you are not the
intended recipient or have received this message in error, please notify us
immediately by reply email and permanently delete the original transmission
from all of your systems and hard drives, including any attachments, without
making a copy.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]