0

I've rolled onto a project that is using maven and does packaging as a war.

The pom has a list of dependencies, and when I do a mvn clean install everything builds fine. Eclipse however is showing errors related to not being able to find classes that are part of dependencies.

In other projects that package as a jar, I see a library folder called "Maven Dependencies". In this project under Java Resources, I see Libraries/Maven Dependencies, which lists everything and shows a bunch of jars and at the bottom shows folders for the dependencies that are modules of a parent pom.

After a mvn clean install I see ./target/foo/WEB-INF/lib contains the jar dependencies needed/referenced that have the classes files eclipse is reporting errors on.

The files being reported as errors, look to be related to cxf generated classes. However when looking in the target folders, the classes are generated properly and if you unarchive the jar files created, the files are there as expected.

I'm assuming this is a configuration issue? Thoughts on what I'm missing?

James Oravec
  • 19,579
  • 27
  • 94
  • 160

1 Answers1

0

Going to post details to what solved the issue for me, in case anyone else runs into a similar issue.

In order to get eclipse working properly, I had to set it up to see the generated code as source. Digging into what was going on in the project gave me better googles and eventually I found a stack overflow question that showed me how to do what I needed.

Here is a link: M2E and having maven generated source folders as eclipse source folders

James Oravec
  • 19,579
  • 27
  • 94
  • 160