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 1EDED17D04 for ; Thu, 2 Apr 2015 07:31:55 +0000 (UTC) Received: (qmail 93123 invoked by uid 500); 2 Apr 2015 07:31:53 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 93045 invoked by uid 500); 2 Apr 2015 07:31:53 -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 93032 invoked by uid 99); 2 Apr 2015 07:31:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Apr 2015 07:31:53 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of stephen.alan.connolly@gmail.com designates 74.125.82.46 as permitted sender) Received: from [74.125.82.46] (HELO mail-wg0-f46.google.com) (74.125.82.46) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Apr 2015 07:31:49 +0000 Received: by wgdm6 with SMTP id m6so76301886wgd.2 for ; Thu, 02 Apr 2015 00:30:43 -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; bh=teeDhNlmUOqFX5QDP4ONDpN/XRAo1+Eq0/WNLWzWzq8=; b=yR+ETUG9x/3y9eTi2FCs8ZVhaZdpedIzn/k/WTQBXvTatHKWHB/tdyKP4+jmO3U5hV yyEonADa8dPdlc1bTlEWfWLX0Of24/hmncOwunKtlM4FPIFeogpwa2gMpN2b0PqM9Vv6 mLMb6sz0X8BXYXWq+M1vDnTJK9uJc6dvRd4SOWSc/BEQzMZT6KNLAsgGPPvHUIwESonS h/2HyYhD+2rzUqpfVZy4qa6lh9b+EfmfCImUqxa5+TtuMcOQaN6gTcH7RarW07mzTD+K mBbFMoXutbCES8U9ljpdNh4+7dgCrluLjEy/6415+SonSUc+wJ7Y34XRZR24T9iqHZ5a s0KA== MIME-Version: 1.0 X-Received: by 10.194.170.226 with SMTP id ap2mr13507733wjc.126.1427959843353; Thu, 02 Apr 2015 00:30:43 -0700 (PDT) Received: by 10.194.20.105 with HTTP; Thu, 2 Apr 2015 00:30:43 -0700 (PDT) In-Reply-To: <551AE6A7.1080707@javactivity.org> References: <551AE6A7.1080707@javactivity.org> Date: Thu, 2 Apr 2015 08:30:43 +0100 Message-ID: Subject: Re: Can Maven be used in an nmake environment with VPATH? From: Stephen Connolly To: Maven Users List Content-Type: multipart/alternative; boundary=089e013c637437790f0512b8cfe2 X-Virus-Checked: Checked by ClamAV on apache.org --089e013c637437790f0512b8cfe2 Content-Type: text/plain; charset=UTF-8 On 31 March 2015 at 19:25, Steve Cohen wrote: > The problem is this. Alcatel-Lucent nmake (and other versions of make > such as GNU make) includes the concept of the VPATH, an environment > variable containing a path (similar to PATH, etc.) along which to search > for dependent source. If a necessary file is not found along the first > node of the path, the second is searched for it, then the third, etc. Only > if the full VPATH is exhausted is the dependency not satisfied and the > build fails. Importantly, if the dependency IS satisfied, then nodes > further down the path are not looked at for that dependency. > > There is a little tutorial here, explaining how this works: > http://nmake.alcatel-lucent.com/tutorial/s10.html > > Needless to say, this is not the way Maven works, especially the compiler > plugin, certainly not under default settings. There is the sourcepath > setting which invokes the -sourcepath switch on javac, which might be part > of a solution. There would then be a need for something that could > translate the $VPATH envvar to a sourcepath which would need to dig down > through several layers of a directory tree (at least they would be > identical in each node -e.g. $NODE/$PROJECT/src/main/java) to produce a > sourcepath. > > So I think you are on a hiding to nothing with regards to VPATH support. Let's take the use case where your VPATH=/tmp/n1:/tmp/n2 If I have /tmp/n2/pom.xml and /tmp/n2/src/main/java/com/lucent/Foo.java proper VPATH support would mean that I could do $ cd /tmp/n1 $ mkdir -p src/main/java/com/lucent $ cp /tmp/n2/src/main/java/com/lucent/Foo.java src/main/java/com/lucent/ and the the VPATH support would mean that in /tmp/n1 Maven would pick up the pom.xml as being from /tmp/n2 but to be used in /tmp/n1 It seems to me that VPATH was really a feature added to make working without a SCM possible. With a good SCM I would never need the VPATH feature at all. The best you could do is have VPATH support for non-pom.xml files but users will still need to propagate the pom.xml files to the "current" VPATH node --089e013c637437790f0512b8cfe2--