Installing maven2 requires gcj even though sun java is installed

Bug #446282 reported by Jens Askengren
80
This bug affects 16 people
Affects Status Importance Assigned to Milestone
Apache Maven
New
Undecided
Unassigned
ant (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Lucid by Volodymyr Buell
maven2 (Ubuntu)
Incomplete
Undecided
Unassigned
Nominated for Lucid by Volodymyr Buell

Bug Description

Binary package hint: maven2

The maven2 package depends on gcj. Why?
There is a proper sun java package. gcj is not really an alternative.

ProblemType: Bug
Architecture: i386
Date: Thu Oct 8 14:29:53 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: maven2 (not installed)
ProcEnviron:
 LANG=sv_SE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-12.40-generic
SourcePackage: maven2
Uname: Linux 2.6.31-12-generic i686

Revision history for this message
Jens Askengren (jens-askengren) wrote :
Revision history for this message
Artur Rona (ari-tczew) wrote :

Could you test this bug with latest update maven's packages? Now karmic has got maven 2.2.1 in repositories. In my opinion this bug has been fixed, but please reporter for test.

Changed in maven2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Jens Askengren (jens-askengren) wrote :

Maven2 2.2.1-1 depend on default-jre (>=1.4) | default-jre-headless (>=1.4) | java2-runtime | java2-runtime-headless

I have sun-java6-jre installed that provides java2-runtime and java2-runtime-headless.

But synaptic insists on installing gcj.

Maven2 also depends on ant which in turn recommends ant-gcj.

So maybe this is causes by Ubuntu installing recommended packages by default now days?

Revision history for this message
Matthias Klose (doko) wrote :

> So maybe this is causes by Ubuntu installing recommended packages
> by default now days?

yes

Revision history for this message
jtuchscherer (jtuchscherer) wrote :

Maybe this bug can be merged with this one:
https://bugs.launchpad.net/ubuntu/+source/maven2/+bug/463648

It is still a problem in Karmic with maven 2.2.1

Revision history for this message
Hendy Irawan (ceefour) wrote :

I'm not really sure why maven2 depends on ant, maven2 may suggest ant but a Java developer that uses Ant will install Ant explicitly, not "install Maven and get Ant for free".

Ant should not depend on gcj at all, it can depend on any Java runtime, be it GCJ, OpenJdk, and Sun. With Sun's Java being on partner repo, the default JDK should be OpenJDK, not GCJ.

I think this is more of problem with ant and ant-gcj than maven2 package.

Revision history for this message
bwana (marcusmarcus) wrote :

I'm on Maverick (10.10) and I see the same thing ... I guess that the only workaround is to (as usually is the case) to not use apt-get / synaptic for anything java-related (?)

I don't think I've ever been able to use the built in packaging of java libraries / ide's etc (bad dependencies, run-as user issues etc) .. these issues have been going on for years - maybe it is not worth the effort trying to provide java using apt-get / synaptic ?

To me, it seems as though using apt-get / synaptic for java related sw adds 0 value (as it never works cleanly) but introduces several problems that make it harder to manage your workstation.

Revision history for this message
Ludovic Claude (ludovicc) wrote :

This bug has been tracked and found in bsh. It should be fixed in the next Ubuntu release, provided that all synchronization with Debian has been done.

@bwana: packaging Java tools and libraries is a worthwhile effort, in that it enables a wider audience for Java on Linux, and facilitate installation of lots of software. Haven't you ever met a co-worker who could not start Ant or Maven because he did not' know how to setup the MAVEN_HOME or ANT_HOME environment variables, and then had trouble with his classpath because of spaces in the directory names? And you could not share your scripts with your team, because everybody installed the software in different places? Packaging removes those little annoyances and brings consistency. It brings also other features, for example with the maven2 package you have tab-completion enabled. Type mvn -- then press tab, and be surprised!
As the process of packaging is quite tedious and require some (easy) work, it takes time to get everything right, but I'm pleased to say that there is good progress already. If you call yourself a developer, then join the teams at ubuntu-java or debian-java (http://wiki.debian.org/Java)

Ludovic

Revision history for this message
Joe Littlejohn (joelittlejohn) wrote :

I never had this problem on Lucid but I've just moved to Natty and found the following:

I have sun-java6-jdk and sun-java6-jre installed (from the partner repo) but when I try to install the maven2 package I see the following NEW packages are going to be installed:

openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib

In Karmic once java is available (from Sun) then I can install maven2 without openjdk being needed. Is there a way to omit the openjdk dependencies?

Revision history for this message
Joe Littlejohn (joelittlejohn) wrote :

Solved my problem using:

 sudo apt-get install maven2 --no-install-recommends

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ant (Ubuntu):
status: New → Confirmed
Revision history for this message
Emmanuel Bourg (ebourg) wrote :

GCJ is gone

Changed in ant (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.