8

I successfully created a project using Wicket quickstart and turned it into an Eclipse dynamic web project by running

mvn eclipse:clean eclipse:eclipse -Dwtpversion=2.0

I imported the project to Eclipse without any issues, but got this warning for each JAR:

Classpath entry M2_REPO/**.jar will not be exported or published.
Runtime ClassNotFoundExceptions may result.

I can fix this by using right click → QuickFix on each warning and selecting "Mark the associated raw classpath entry as a publish/export dependency," but this takes a lot of time and would not be possible if there were a lot of dependencies.

There must be a way to have Maven do this for me; what is it?

EDIT: I've found out that using m2eclipse core + Maven Integration for WTP (from m2eclipse extras) resolves my issues.

I'm still interested in how to achieve this without m2eclipse, though, just out of curiosity :p

2
  • Are you using the m2eclipse plugin?
    – artbristol
    Commented Jun 1, 2011 at 7:48
  • @artbristol I tried it both with and without m2eclipse. I only had m2eclipse-core installed, found out just a minute ago that installing 'Maven Integration for WTP' from m2eclipse extras resolves my issues.
    – Holm
    Commented Jun 1, 2011 at 8:18

1 Answer 1

3

The two Maven plugins needed to work with web projects in Eclipse are available from the Eclipse Marketplace.

Maven Integration for Eclipse (included in the Java version of Eclipse)

Maven Integration for Eclipse WTP

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.