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]

Reply via email to