0
<plugin>
     <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>2.9.1</version>
    <configuration>
   <sourcepath>${svn url}/src/main/java</sourcepath>
    </configuration>
 </plugin>

Not able to generate Javadoc while running goal as maven javadoc:javadoc. As the source is not available in maven project.I am passing directly svn url.Is it right please correct me if i am wrong

swamy
  • 1,164
  • 10
  • 23
  • The source code for which i want to generate javadoc is not maven project.so externally i had created maven project ,in that project i need to generate javadoc. – swamy Dec 23 '13 at 10:35

1 Answers1

0

The source code for which i want to generate javadoc is not maven project.so externally i had created maven project ,in that project i need to generate javadoc

Firstly , you do NOT need a maven project to generate source code for any project whatsoever.

As the source is not available in maven project.I am passing directly svn url

Why are you passing the SVN url here ? Since it is now a maven project, simply specify the path to the source folder of the project ( which I believe will be ${base.dir}/src/main/java )

Saif Asif
  • 5,075
  • 2
  • 27
  • 46
  • Thanks for reply,I am able to specify the path as source folder locally and i am able to generate javadoc. But if i want to generate javadoc in hudson or jenkins i will get problem as the source code will not be available in hudson. – swamy Dec 24 '13 at 05:00
  • Why wouldn't the project be available for hudson ? As far as I remember , hudson checks-out each project into its own workspace, so technically , the source files will be available there as well and you can just specify the relative paths. Check in the correct paths over hudson server. – Saif Asif Dec 24 '13 at 05:15
  • I too agree with your solution.As the project is old one.They didn't configure in hudson.Now i am doing maven site documentation separate project and configured in hudson.There i need to generate javadoc when project builds in hudson. – swamy Dec 24 '13 at 05:25
  • 1
    IMO I don't think that its a good idea to make a separate project to manage Javadocs/sources of other projects. A project itself should be responsible for generating its own required JavaDocs and sources. And you can easily create javadocs via any means necessary (like ant or maven or even from the java -jar tool). – Saif Asif Dec 24 '13 at 05:32