Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 89CDB1076A for ; Mon, 19 Aug 2013 19:55:34 +0000 (UTC) Received: (qmail 78984 invoked by uid 500); 19 Aug 2013 19:55:31 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 78620 invoked by uid 500); 19 Aug 2013 19:55:31 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 78612 invoked by uid 99); 19 Aug 2013 19:55:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Aug 2013 19:55:31 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [72.5.230.100] (HELO sender1.zohomail.com) (72.5.230.100) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Aug 2013 19:55:25 +0000 Received: from langebro (pool-98-114-184-117.phlapa.fios.verizon.net [98.114.184.117]) by mx.zohomail.com with SMTPS id 1376942082088942.3534297016425; Mon, 19 Aug 2013 12:54:42 -0700 (PDT) From: "Richard Sand" To: "'Maven Users List'" References: <1376907666322-5768158.post@n5.nabble.com> <52122106.9010702@artifact-software.com> <0a2301ce9cf4$655781b0$30068510$@idfconnect.com> <521271BA.1050801@artifact-software.com> In-Reply-To: <521271BA.1050801@artifact-software.com> Subject: RE: Difference between Eclipse build errors and Maven build dependencies Date: Mon, 19 Aug 2013 15:54:28 -0400 Message-ID: <0a9b01ce9d15$eafb39d0$c0f1ad70$@idfconnect.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQK5+NH19TsfB/HKFElURNno0HyaxwJaCHqiAg5ULHoCRv7UX5eQvn6g Content-Language: en-us X-ZohoMailClient: External X-Zoho-Virus-Status: 2 X-Virus-Checked: Checked by ClamAV on apache.org 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