As you can see in the Maven Model [1] the plugin element has the option to
include a dependencies tag. This will put dependencies on the classpath of
the plugin.

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl


[1] http://maven.apache.org/ref/2.0.7/maven-model/maven.html

On Mon, Aug 11, 2008 at 2:54 PM, leviathani <[EMAIL PROTECTED]> wrote:

>
> Hello!
>
> I am new to maven and want to create a Javadoc PDF in an automated way. I
> adapted PDFDoclet[1] for this purpose. This doclet is depending on log4j as
> well as some other libraries.
>
> However, I always receive an error when i try to build this documentation
> with mvn site:site, namely:
>
> ---------------------------------------------------------
> [INFO] Error during page generation
>
> Embedded error: Error rendering Maven report: Exit code: 1 -
> java.lang.NoClassDefFoundError: org/apache/log4j/Logger
> ---------------------------------------------------------
>
> This happens upon invocation of PDFDoclet, which I have included in the
> reporting section:
> ---------------------------------------------------------
>    <reporting>
>        <plugins>
>            <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-javadoc-plugin</artifactId>
>                <reportSets>
>                    <reportSet>
>                        <id>pdf</id>
>                        <configuration>
>                            <name>PDF API documentation</name>
>                            <description>A Java API documentation in PDF
> Format.</description>
>
> <doclet>org.mycompany.javadoc.pdfdoclet.PDFDoclet</doclet>
>                            <docletArtifact>
>                                <groupId>org.mycompany.javadoc</groupId>
>                                <artifactId>pdfdoclet</artifactId>
>                                <version></version>
>                            </docletArtifact>
>                            <maxmemory>256m</maxmemory>
>                            <additionalparam>-pdf api.pdf -config
> src/main/resources/pdfdoclet.properties</additionalparam>
>
> <sourcepath>${project.build.directory}/sources</sourcepath>
>                            <destDir>pdf</destDir>
>                            <show>public</show>
>                        </configuration>
>                        <reports>
>                            <report>javadoc</report>
>                        </reports>
>                    </reportSet>
>                 <!-- MORE STUFF IN HERE  -->
>                </reportSets>
>            </plugin>
>        </plugins>
>    </reporting>
> ---------------------------------------------------------
>
> Log4j is in the dependencies section of my pom.xml. However, it looks like
> the dependency on log4j is ignored in this case.
>
> Is there a way to tell maven that it should put log4j into the classpath
> when invoking the javadoc plugin? I want to avoid having to write a plugin
> for this if it is not necessary. Nevertheless, this would be my workaround
> if I cannot find a solution to this problem.
>
> TIA && kind regards,
> Gernot
>
> [1]: http://pdfdoclet.sourceforge.net/
> --
> View this message in context:
> http://www.nabble.com/Classpath-problems-with-Javadoc-plugin-%28mvn-site%3Asite%29-tp18925313p18925313.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