On Sat, Oct 18, 2008 at 11:08 AM, Chris <[EMAIL PROTECTED]> wrote:

> Newbie here -- sorry -- having some basic conceptual difficulties with the
> javadoc plugin.

What do you want to do with it?  Generate Javadoc to view? To use in an IDE?

> How do I get the javadoc plugin to run when I execute mvn install? It runs
> ok when I do mvn javadoc:javadoc, but I want to regenerate everything when I
> do an install.

You could bind an execution of the javadoc plugin to the install
phase... but most people don't.  It depends on what you want them for.
 Usually Javadocs get published with the project website, and then
packaged into a jar and deployed to the repository along with a
release.

You can try this configuration to add the javadocs jar to your
build... it has a side effect of generating them in target/apidocs
which I assume is where you're looking at them now.

<build>
  <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
...

> One more -- how do I get it to delete previous Javadocs from the output
> directory first? If I delete a class, the old file is still left there.

'mvn clean' will delete the target directory.  If you have deleted
things, try 'mvn clean install'.

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to