Skip to main content

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

http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html
(first hit if you google "maven-compiler-plugin").

--
Regards,
Igor

On 2013-09-10 11:51 AM, Marshall Schor wrote:
hmmm,

I'm missing some "context".  I cannot find documentation for exclusion
patterns in a pom file.

Where in the pom "model" do I add <classpath> ... etc.?

Any pointers to documentation appreciated.

-Marshall

On 9/10/2013 10:00 AM, Lucas Persson wrote:
Hi

m2e Eclipse plugin will honor the exclusion patter in the pom.xml and
update the corresponding exclude in the .classpath.
So add exclusion patter for package.html in the pom.xml (even though
you do not really need it)
That should solve it for you.

E.g:
<classpath>
  <classpathentry kind="src" path="src/main/java"
excluding="**/package.html"/>
  <classpathentry kind="src" path="src/main/resources"
excluding="**/package.html"/>
  <classpathentry kind="src" path="src/test/java"
output="target/test-classes" excluding="**/package.html"/>
  <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
  <classpathentry kind="con"
path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
  <classpathentry kind="output" path="target/classes"/>
</classpath>


Cheers
Lucas

10 sep 2013 kl. 15:47 skrev Marshall Schor:

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
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx <mailto:m2e-dev@xxxxxxxxxxx>
https://dev.eclipse.org/mailman/listinfo/m2e-dev

--

Lucas Persson | Principal Member of Technical Staff
Phone: +4684773644 | | | Mobile: +46730946656
Oracle Communications Platform
ORACLE Sweden | Söder Mälarstrand 29, 6 tr | 118 25 Stockholm

Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no
<http://reg.no>. 556254-6746
 Oracle is committed to developing practices and products that help
protect the environment



_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev



_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev



Back to the top