[seam-dev] Help with aggregating project javadoc

Shane Bryzak sbryzak at redhat.com
Wed Oct 10 18:49:03 EDT 2012


This took quite a lot of messing around in Seam's distribution build 
thanks to Maven's lack of support for multi-module projects.  To point 
you in the right direction, take a look at:

https://github.com/seam/dist/blob/master/dist/pom.xml

Down near the end of the pom you'll find this plugin configuration:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>module-sources</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<classifier>sources</classifier>
<outputDirectory>${project.build.directory}/sources</outputDirectory>
<excludeTransitive>true</excludeTransitive>
<includeArtifactIds>seam-faces-api,seam-international-api,seam-jcr-api,seam-jms-api,seam-mail-api,seam-persistence-api,seam-remoting,seam-reports-api,seam-rest-api,seam-security-api,seam-social-api,seam-social,seam-transaction-api,seam-validation-api,solder-api</includeArtifactIds>
</configuration>
</execution>

And a little further down you'll find this:

<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>javadoc-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<sourcepath>${project.build.directory}/sources</sourcepath>
<links>
<link>http://download.oracle.com/javaee/6/api</link>
<link>http://download.oracle.com/javase/6/docs/api/</link>
</links>
<keywords>true</keywords>
<author>true</author>
</configuration>
</execution>
</executions>
</plugin>



What the first bit does is essentially unpacks the entire source tree 
for all Seam modules into a single directory structure.  The second bit 
runs the javadoc plugin over this unpacked source code, creating the 
"consolidated" javadocs for the entire project.  It's a little 
convoluted however there didn't seem to be any easier way to do this.

Shane

On 11/10/12 08:14, Ivan St. Ivanov wrote:
> Hello!
>
> I am Ivan and I am contributing to the JBoss Forge project. Right now 
> I am working on a task to build tool's javadoc (and sources as 
> well) and aggregate them in a couple of archives.
>
> I did some experiments, but at the end the build used to create too 
> much garbage in the project directories. So I was advised by one of 
> our core committers (George Gastaldi) to look at the Seam 3 build.
>
> I checked it and found that the following projects have some javadoc 
> configurations:
>
> parent
> dist
> dist / seam
>
> I merely copied the configurations from the respective pom.xml files. 
> And when ran the Forge build, I got the javadocs (and sources) built 
> for each of our modules, but didn't find any big aggregate archive 
> anywhere.
>
> Could you please tell me, do I miss anything? Which are actually the 
> seam modules and projects that I should look at?
>
> Thanks!
> Ivan
>
>
> _______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20121011/872be7ac/attachment.html 


More information about the seam-dev mailing list