From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QPd5b-0004WV-NE for garchives@archives.gentoo.org; Thu, 26 May 2011 16:07:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 10B891C168; Thu, 26 May 2011 16:06:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C3E791C16B for ; Thu, 26 May 2011 16:06:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 8C42C1B4007 for ; Thu, 26 May 2011 16:06:43 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Score: -4.627 X-Spam-Level: X-Spam-Status: No, score=-4.627 required=5.5 tests=[AWL=1.972, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lr0dPjzihJDq for ; Thu, 26 May 2011 16:06:35 +0000 (UTC) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by smtp.gentoo.org (Postfix) with ESMTP id 877661B400E for ; Thu, 26 May 2011 16:06:32 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QPd4t-0001nm-0K for gentoo-java@gentoo.org; Thu, 26 May 2011 18:06:27 +0200 Received: from hsi-kbw-078-042-100-035.hsi3.kabel-badenwuerttemberg.de ([78.42.100.35]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 May 2011 18:06:26 +0200 Received: from joerg.schaible by hsi-kbw-078-042-100-035.hsi3.kabel-badenwuerttemberg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 May 2011 18:06:26 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: gentoo-java@gentoo.org To: gentoo-java@lists.gentoo.org From: =?UTF-8?B?SsO2cmc=?= Schaible Subject: [gentoo-java] Re: Re: Maven from source - version 2.x or 3.x ? Followup-To: gmane.linux.gentoo.java Date: Thu, 26 May 2011 18:06:15 +0200 Message-ID: References: <4DD923B5.6060508@codelutin.com> <4DD985FA.3020904@gentoo.org> <4DDA00D4.3060603@gentoo.org> <4DDB753E.4020908@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-java@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: hsi-kbw-078-042-100-035.hsi3.kabel-badenwuerttemberg.de Mail-Copies-To: nobody User-Agent: KNode/4.4.11 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 9db6417ec34f2169c85dcebfacb0e439 Robert Burrell Donkin wrote: > On Wed, May 25, 2011 at 5:09 PM, J=C3=B6rg Schaible > wrote: >> Hi Robert, >=20 > Hi J=C3=B6rg >=20 >> Robert Burrell Donkin wrote: >=20 > >=20 >>> maven seems to be moving towards requiring specific core versions for >>> builds. some projects i develop require maven 2, some maven 3. i >>> manage this situation with a set of custom scripts and installations >>> independent of gentoo. i expect other developers now work in a simila= r >>> way. (same goes for jdks.) the gentoo java stuff just gets in my way >>> now for development. >> >> Why? I have emerged maven:1.0, maven:1.1, maven:2.0, maven:2.2 and >> maven:3.0. I've selected my default version with eselect. However, I c= an >> use any of those versions at the same time: >> >> /usr/bin $ ls -lGgo m*v*n* >> lrwxrwxrwx 1 34 Jan 22 14:07 maven-1.0 -> /usr/share/maven- >> bin-1.0/bin/maven >> lrwxrwxrwx 1 34 Jan 22 14:07 maven-1.1 -> /usr/share/maven- >> bin-1.1/bin/maven >> lrwxrwxrwx 1 7 Jul 19 2010 mvn -> mvn-3.0 >> lrwxrwxrwx 1 32 Apr 30 2010 mvn-2.0 -> >> /usr/share/maven-bin-2.0/bin/mvn lrwxrwxrwx 1 32 Apr 30 2010 mvn-2= .2 >> -> /usr/share/maven-bin-2.2/bin/mvn lrwxrwxrwx 1 32 Mar 10 18:17 >> mvn-3.0 -> /usr/share/maven-bin-3.0/bin/mvn >> >> All that eselect effectively does is to switch the unversioned link. Y= ou >> may call any of those scripts (well, you should not have set MAVEN_HOM= E >> at all, the Maven start script will do this for you anyway). >=20 > eselect edits the symlinks. this switches the maven version for the > entire system. i want to be able to switch maven (and ant and java) > versions for just a terminal. is there some way to make this work with > eselect? Defining aliases? Or use prepend a terminal specific directory to the pat= h=20 where you define your own symlinks. export PATH=3D~/tmp/term-1:$PATH ls ~/tmp/term-1 mvn -> /usr/bin/mvn-2.2 jar -> /usr/lib/jvm/sun-jdk-1.6/bin/jar java -> /usr/lib/jvm/sun-jdk-1.6/bin/java javac -> /usr/lib/jvm/sun-jdk-1.6/bin/javac javah -> /usr/lib/jvm/sun-jdk-1.6/bin/javah For Ant you might create your own slotted ebuilds (maybe as ant-bin to=20 separate from the one provided with Gentoo) and use symlinks again. I am quite sure you can create a little helper script that sets up such=20 links for the current terminal when you provide the version for those=20 packages as argument. Cheers, J=C3=B6rg