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 0EE24911D for ; Tue, 5 Jun 2012 00:09:27 +0000 (UTC) Received: (qmail 43156 invoked by uid 500); 5 Jun 2012 00:09:24 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 43083 invoked by uid 500); 5 Jun 2012 00:09:24 -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 43075 invoked by uid 99); 5 Jun 2012 00:09:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2012 00:09:24 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of baerrach@gmail.com designates 209.85.214.43 as permitted sender) Received: from [209.85.214.43] (HELO mail-bk0-f43.google.com) (209.85.214.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2012 00:09:16 +0000 Received: by bkty5 with SMTP id y5so5124421bkt.30 for ; Mon, 04 Jun 2012 17:08:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=WCrz5UlN5E+yZ0PVEdAPjgt6LJS/sE3bsI4ZXkLjYsw=; b=dqK0R2m0rZPXwEMZ9/MHspJgdF7NwZjqv8t2iIrYcz8FFRWdqRT3419kUF9WM7NNvi xKkiAobl+aiIinH13J6r84lbXk+I7aNQaxQj6/JgeHkakJDuJiTsdP5Ee9gUaWqGVvjD a34bQLJymIQPNgAWQm2zAzYkir2wrHMEiDJX9NisFqcirqlGzSqcCB5UBA6xkqlBzJwp sZCdnrjzvyDkluhPz23orfuqPZt1Ng91saoK0BDbzEwM6p+C/8YTfvqH5rMKWDTtLize 8EgeNHHuuXkc37sU28Ki/ja4N3OTH+1a8SPECY0WD3jYiwxpETtnfvX+vuKL4wKScKN8 5i2w== MIME-Version: 1.0 Received: by 10.205.133.13 with SMTP id hw13mr7916951bkc.30.1338854936142; Mon, 04 Jun 2012 17:08:56 -0700 (PDT) Received: by 10.204.154.210 with HTTP; Mon, 4 Jun 2012 17:08:56 -0700 (PDT) In-Reply-To: References: Date: Tue, 5 Jun 2012 09:38:56 +0930 Message-ID: Subject: Re: Eclipse Plugin and Project Links to Independent Projects From: Barrie Treloar To: Maven Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Jun 5, 2012 at 3:19 AM, Chris Redekop wro= te: > (How) can I use the Eclipse plugin to create Eclipse project files > that refer to an dependency A) with an Eclipse project link instead of > B) as a JAR in the repo? =A0The dependency in this case is A) NOT a > module of the parent project (where 'mvn eclipse:eclipse' is executed) > and B) NOT built with Maven. > > Project links work well between modules in a multi-module project, and > the -Declipse.workspace property provides some related functionality; > but its workspace scan only seems to recognize other Maven projects. You can't. mvn eclipse:eclipse will automatically configure the .classpath to reference any dependency that is already configured in Eclipse and is a Maven project. If you think about it, how do you expect eclipse:eclipse to work out that your non-Maven project just happens to be the same as one of your Maven dependencies? > I am looking for something like -Declipse.workspace but more direct > and fully contained within the plugin configuration: a map between > dependencies and Eclipse projects that says, "when you are generating > Eclipse project files and hit this dependency, refer to this Eclipse > project instead of the artifact's JAR in the repo." > > The use case here is migrating one of an organization's existing > builds to Maven while NOT migrating ALL an organization's builds. =A0We > currently have a mix of Maven/non-Maven builds cohabitating in the > same Eclipse workspace. =A0In this environment, dependencies from > Maven-built projects to non-Maven-built projects appear twice: > 1) as a JAR dependency and > 2) as an Eclipse project where active development takes place. > > The duplicate project/class definition is causing confusion. You have some of options: 1) Dont use mvn eclipse:eclipse 2) Use mvn eclipse:eclipse to "kick-start" the .classpath creation and then manually tweak this to work with the non-Maven project. You then check-in the eclipse files: .project, .classpath into your source control. 3) Migrate your non-Maven builds to Maven. If these are Ant builds it should be a simple process to create a dumb Maven wrapper that just calls out to Ant to do the build. This will give you a pom.xml that specifies the correct dependency coordinates for mvn eclipse:eclipse to then use. Then when you are ready to migrate these projects, you take out the Ant stuff and replace it with the equivalent Maven plugins. I would recommend 3). --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org