Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 355507

Summary: dev-java/maven-bin should automatically set itself as the default target for eselect-maven
Product: Gentoo Linux Reporter: Dean Matzkov <Bapabooiee>
Component: [OLD] JavaAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: minor CC: kasun.gajasinghe
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch for maven-bin-2.0.10.
patch for maven-bin-2.0.11
patch for maven-bin-2.1.0
patch for maven-bin-2.2.1
patch for maven-bin-3.0
patch for maven-bin-3.0.2
patch for maven-bin-3.0.3
patch for maven-bin-2.0.10

Description Dean Matzkov 2011-02-19 02:17:50 UTC
When installing dev-java/maven-bin for the first time, no symlink for the `mvn' command is created. Thus, the user has to manually set the active Maven version using eselect.

I think it should be set automatically by the ebuild.

Steps to reproduce:

# emerge -av dev-java/maven-bin:2.2
$ mvn -v
   bash: mvn: command not found
# eselect maven set mvn-2.2
$ mvn -v
   Apache Maven 2.2.1 (r801777; 2009-08-06 13:16:01-0600)
Comment 1 Kasun Gajasinghe 2011-04-19 06:26:26 UTC
Created attachment 270471 [details, diff]
patch for maven-bin-2.0.10.

patch for maven-bin-2.0.10. Patches for other versions will follow. 
This creates the /usr/bin/mvn symlink when maven-bin get installed. It should be noted that this does not update the symlink if a working symlink already exist at /usr/bin/mvn. User may update the symlink to the latest installed maven version via "eselect maven update".
Comment 2 Kasun Gajasinghe 2011-04-19 06:28:03 UTC
Created attachment 270473 [details, diff]
patch for maven-bin-2.0.11

patch for maven-bin-2.0.11. Patches for other versions will follow. 
This creates the /usr/bin/mvn symlink when maven-bin get installed. It should be noted that this does not update the symlink if a working symlink already exist at /usr/bin/mvn. User may update the symlink to the latest installed maven version via "eselect maven update".
Comment 3 Kasun Gajasinghe 2011-04-19 06:29:26 UTC
Created attachment 270475 [details, diff]
patch for maven-bin-2.1.0
Comment 4 Kasun Gajasinghe 2011-04-19 06:30:06 UTC
Created attachment 270477 [details, diff]
patch for maven-bin-2.2.1
Comment 5 Kasun Gajasinghe 2011-04-19 06:30:43 UTC
Created attachment 270479 [details, diff]
patch for maven-bin-3.0
Comment 6 Kasun Gajasinghe 2011-04-19 06:31:13 UTC
Created attachment 270481 [details, diff]
patch for maven-bin-3.0.2
Comment 7 Kasun Gajasinghe 2011-04-19 06:31:46 UTC
Created attachment 270483 [details, diff]
patch for maven-bin-3.0.3
Comment 8 Kasun Gajasinghe 2011-04-22 13:57:37 UTC
Created attachment 270869 [details, diff]
patch for maven-bin-2.0.10

patch for maven-bin-2.0.10. In addition to the use of 'eselect', This includes a fix for a report in the bug 310331 by Serkan about another symlink issue which is related to this bug.
Added app-admin/eselect-maven as a RDEPEND.
Comment 9 Ralph Sennhauser (RETIRED) gentoo-dev 2011-12-14 16:04:57 UTC
Fixed in:

*maven-bin-3.0.3-r1 (14 Dec 2011)
*maven-bin-2.2.1-r1 (14 Dec 2011)
*maven-bin-2.1.0-r1 (14 Dec 2011)
*maven-bin-2.0.11-r1 (14 Dec 2011)
*maven-bin-1.1-r2 (14 Dec 2011)
*maven-bin-1.0.2-r2 (14 Dec 2011)

Thanks for the report and patches.