I have Eclipse that is set to work with CQ and I want to generate javadoc during the bundle compilation. I have 4 projects in Eclipse
In project-default-bundle(which contains .java classes) I added this to pom.xml file
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <excludePackageNames> *.impl </excludePackageNames> </configuration> <executions> <execution> <id>generate-javadoc</id> <goals> <goal>javadoc</goal> </goals> </execution> </executions> </plugin>
bud when I run the maven build(on the project-default project), there is no javadoc generated... I run maven with these goals 'clean install' and profile 'autoInstallPackage'.
I also tried to run these goals 'clean install javadoc:javadoc' but it gives me an error. But when I run maven build with 'javadoc:javadoc' goal on project-default-bundle it generates the javadoc fine.
Thanks for any help!
Solved! Go to Solution.
This is not really a CQ/AEM question, but a Maven question and should be addressed in such a forum. But, since I actually know the answer, I will hint you on what to do.
I don't know where you have defined your plugin, in the <build> section or the <reporting> section but I assume it is in the <reporting> section as you should. Then you should use the mvn site command.
You could also bind the execution to another goal. Read about Maven lifecyle at [1]. Each Maven plugins has goals that and you can bind your execution to different phases and goals. However... I would strongly advice AGAINST binding the site or javadoc creation to the install phase or any of its goals, since that will force the developers to runt the site/javadoc every time the system is compiled/installed.
Instead, use a Continuous Build tool, such as TeamCity, Hudson, Jenkins or any other, and have that tool build your javadoc and site on each commit instead. Or once every day.
[1] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
This is not really a CQ/AEM question, but a Maven question and should be addressed in such a forum. But, since I actually know the answer, I will hint you on what to do.
I don't know where you have defined your plugin, in the <build> section or the <reporting> section but I assume it is in the <reporting> section as you should. Then you should use the mvn site command.
You could also bind the execution to another goal. Read about Maven lifecyle at [1]. Each Maven plugins has goals that and you can bind your execution to different phases and goals. However... I would strongly advice AGAINST binding the site or javadoc creation to the install phase or any of its goals, since that will force the developers to runt the site/javadoc every time the system is compiled/installed.
Instead, use a Continuous Build tool, such as TeamCity, Hudson, Jenkins or any other, and have that tool build your javadoc and site on each commit instead. Or once every day.
[1] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
Views
Likes
Replies
Views
Likes
Replies