maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Sand" <>
Subject RE: Difference between Eclipse build errors and Maven build dependencies
Date Mon, 19 Aug 2013 15:54:31 GMT
Hi TenLeftFingers - I've struggled with this a lot in the past few months -
here's what I've learned:

When you have everything set up right, there should neither be eclipse
errors nor maven errors.

When an eclipse project is a maven project, m2e (the eclipse-maven
integration) will automatically add all maven dependencies to the eclipse
build classpath and will automatically attempt to resolve managed
dependencies during workspace build. So one thing to check here is that if
the dependencies are not managed dependencies, then eclipse won't be able to
find them in your local repository.

In eclipse you can right-click on a project and go Maven-->Update Maven
Project and this will tell eclipse to update all of its local project
settings (e.g. source and build paths) based upon the current pom.xml.

Another behavior to note is that with m2e 1.4 or later, the integration is
smart enough to recognize if one eclipse project has a maven dependency on
another eclipse project.  So if "ProjectABC" has a maven dependency on
"ProjectXYZ.1.0.0-SNAPSHOT", and ProjectXYZ is also in your eclipse
workspace and its pom.xml specifies 1.0.0-SNAPSHOT, m2e will recognize this
and use the workspace project for that dependency. This is very convenient
so you don't have to a maven install on ProjectXYZ and update ProjectABC for
every code change - you can just code away on ProjectXYZ. 

Note: with the above setup, there is no need to configure ProjectXYZ from an
Eclipse standpoint to have ProjectABC as an included project on its build
path. M2e handles that for you, and if you have both, you'll end up hiding
potential maven problems from you.

It even works for J2EE applications e.g. if ProjectABC is a web application.
The caveat here is that you must be using maven-war-plugin version 2.4 to
generate your war file this way - I have explicitly set that version in my
plugin configuration.

I hope this helps!

Best regards,


-----Original Message-----
From: Ron Wheeler [] 
Sent: Monday, August 19, 2013 9:44 AM
Subject: Re: Difference between Eclipse build errors and Maven build

On 19/08/2013 6:21 AM, TenLeftFingers wrote:
> I've checked out a project that is active in pre-production from SVN 
> and it builds fine with Maven. However, in Ecilpse there are markers 
> for 'Java build path problems', 'Java Problems', 'Maven Dependency 
> Problems', ,'Maven Problems' and 'XML Problems'.
> I know there was a transition from managing dependencies with Eclipse 
> to using Maven so can I ignore the Eclipse dependencies et al? It 
> doesn't make sense to have two dependency managemnet systems. Also, 
> given the BUILD SUCCESS, can I safely ignore the other Markers in Eclipse?
> --
> View this message in context: 
> rs-and-Maven-build-dependencies-tp5768158.html
> Sent from the Maven - Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
Did you tell Eclipse that this is a Maven project and has its dependencies
defined by Maven?
Does your Eclipse support Maven?
I use Eclipse/STS from Springforce so Maven support is built-in.
If you want to do your own integration


Ron Wheeler
Artifact Software Inc
skype: ronaldmwheeler
phone: 866-970-2435, ext 102

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message