Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-dev] setting Eclipse build path to exclude package.html to avoid [WARNING] javadoc: warning - Multiple sources of package comments found for package...

We're getting these in our build, if we use Eclipse auto-builds, and don't run
Maven with "clean" first.

An analysis of this (using info from the maven-javadoc-plugin -Ddebug option)
shows why:

Eclipse builds both "compiles" files to the output directory,and also "copies"
non-java files to the output directory.  This is different from Maven builds,
which only compiles files from the src/main/java folder, and copies files from
the src/main/resources folder (by default).

The result: If the maven build has an invocation of the maven-javadoc-plugin, it
has the source folder in the javadoc "sources", and the output directory (e.g.
target/classes) in the classpath.

When Eclipse "built" this, and then Maven is run without "clean", the javadoc
finds the package.html in both the sources, and in its classpath, and after Java
1.5, now generates the warning message about multiple sources of package
comments found...


Can the m2e setup for Eclipse do something when setting up the Eclipse
build-path add an exclusion to the src/main/java path to exclude (not copy)
files which Maven's build would not copy, like package.html?

-Marshall Schor


Back to the top