Hello fellow Maven users,

We have a project where we are trying to build a subset of the JavaDoc
as a public API in the <build/> section of our POM. This works under
Java 6, but when using Java 7, the javadoc process just breaks. It's
easy to reproduce if you take the something like the following POM
fragment and run "mvn package".

> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> <version>2.8.1</version>
> <configuration>
> <encoding>UTF-8</encoding>
> </configuration>
> <executions>
> <execution>
> <id>PublicAPI</id>
> <phase>package</phase>
> <goals>
> <goal>javadoc</goal>
> </goals>
> <configuration>
> <subpackages>foo.bar.javadoc</subpackages>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>

When the <configuration/> is commented out the full JavaDoc is
available, which is not exactly what we want. In debugging this, it
appears that the javadoc "-subpackages" argument is broken in Java 7 and
the javadoc tool attempts to parse the class files, e.g.:

> [INFO] --- maven-javadoc-plugin:2.8.1:javadoc (PublicAPI) @
> JavaDocProject ---
> [INFO]
> Loading source files for package foo.bar.javadoc...
> 205 errors
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 4.139s
> [INFO] Finished at: Thu Feb 16 16:13:16 MST 2012
> [INFO] Final Memory: 24M/216M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-javadoc-plugin:2.8.1:javadoc
> (PublicAPI) on project JavaDocProject: An error has occurred in
> JavaDocs report generation:
> [ERROR] Exit code: 1 -
> projects/prototype/JavaDocProject/target/classes/foo/bar/javadoc/App.class:1:
> error: unmappable character for encoding UTF-8
> [ERROR] ����1"

Are others seeing the same behaviour? Is there a work-around?

Thanks,
John Todd


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to