maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Sand" <rs...@idfconnect.com>
Subject RE: Difference between Eclipse build errors and Maven build dependencies
Date Mon, 19 Aug 2013 19:54:28 GMT
It's also worth noting that M2E has a mailing list as well which can be
quite helpful for troubleshooting eclipse-maven specific issues.

Lastly remember that eclipse has maven 3.0.4 bundled into it. You can add
additional older or newer maven runtimes to eclipse if necessary, similar to
the way you add additional JRE runtimes, server runtimes etc.

Best regards,

Richard

-----Original Message-----
From: Ron Wheeler [mailto:rwheeler@artifact-software.com] 
Sent: Monday, August 19, 2013 3:28 PM
To: users@maven.apache.org
Subject: Re: Difference between Eclipse build errors and Maven build
dependencies

Richard's description is much better than my cryptic note.
Once you have the project set up properly all the cute little red "X"s go
away since Eclipse and it editors finds everything it needs from the
information in your Maven pom.
The integration is very well done and causes no grief or extra work as you
work.

Ron

On 19/08/2013 11:54 AM, Richard Sand wrote:
> 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,
>
> Richard
>
> -----Original Message-----
> From: Ron Wheeler [mailto:rwheeler@artifact-software.com]
> Sent: Monday, August 19, 2013 9:44 AM
> To: users@maven.apache.org
> Subject: Re: Difference between Eclipse build errors and Maven build 
> dependencies
>
> 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:
>> http://maven.40175.n5.nabble.com/Difference-between-Eclipse-build-err
>> o rs-and-Maven-build-dependencies-tp5768158.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 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 
> http://www.eclipse.org/downloads/compare.php
> http://maven.apache.org/eclipse-plugin.html
>
> Ron
>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message