Maven2 package requires too many dependencie

Bug #463648 reported by Michael Osipov
56
This bug affects 11 people
Affects Status Importance Assigned to Milestone
maven2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: maven2

Just installed Karmic and was pleased that Maven 2.2.1 is finally in the repos. I wanted to install it but was shocked to see the dependency tree. Not mentioning that recommended packages are installed for some stupid reason too, the weight of all necessary packages is way too much.

I ran apt-get with: sudo apt-get install maven2 --no-install-recommends
See the output as attached file. As you can see it wants to install 41 new packages with a total weight of 25,6 MiB on disk. Installing 2.2.1 manually to /opt requires only 3,2 MiB (du -h) on disk. This is it simply.

I am aware that the debian package completely dissects the uber jar to separate packages but consider the following:

1. Maven will download necessary packages on its own as it thinks fit, it does not care for any other packages in the system. Everything has to be oin the local repo. E.g. libplexus-utils-java and many others.
2. dissecting should have minimal deps which is easily feasible.

This package and its dependecy tree should be skimmed for 10.4!

Mike

Tags: maven2 package
Revision history for this message
Michael Osipov (michael-o) wrote :
Revision history for this message
jtuchscherer (jtuchscherer) wrote :

I second that. When I tried to install the maven2 package it tries to install - amongst many other things that I don't want and that are not necessary to run maven - gcj (I have the sun jdk, what do I need gcj for???) and ant. I attached my output from apt-get install maven2 since it is in English and might be easier to understand for some people.

If I know how to do it, I would provide a maven2 package for Ubuntu without the unnecessary dependencies. Are there any pointers on how to create a deb package from a java source?

Revision history for this message
Stian Soiland-Reyes (soiland-reyes) wrote :

It seems that Ubuntu's Maven prefers:

<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-4</version>

.. while Apache's Maven prefers:

<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-2</version>

(which does not fail on the element)

If I hardcode the version to either of these I get consistent behavior, ie. both work with 2.2-beta-2, or both fail with 2.2-beta-4.

Not sure if this is still a valid bug, it is still interesting that a different (newer) version is preferred by Ubuntu's Maven..

Revision history for this message
Stian Soiland-Reyes (soiland-reyes) wrote :

please ignore my comment #3 - it was meant for bug #551724

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

Can the thread starter provide more specifiy info:
- what are the 41 depended packages?
- what are the exact packages that are not necessary?

I for one, is aware of the problem, though I prefer Ubuntu providing "standard" Maven plugins, rather than Maven downloading yet another set of plugins during build. There's nothing that irritates me more than running a build or Maven goal and be blocked due to Maven cannot find a plugin that it needs, because I'm in a slow or no Internet connection.

Revision history for this message
jtuchscherer (jtuchscherer) wrote :

Hi Hendy,

- The thread starter added an attachment that will show the 41 packages.

- I think that most of them are not necessary. E.g. why do I need beanshell or plexus for a vanilla maven install?

- I want maven to download required plugins. I don't want to download a lot of "standard" plugins because maven thinks I might need them at one point. Maven has its own package management system. There is no need to use Ubuntu's. And IMHO there is nothing more irritating than installing an Ubuntu package and needing to download many unneeded dependencies while you have a slow internet connection (that is why I installed maven manually).

Revision history for this message
Michael Osipov (michael-o) wrote :

Hendy,

jtuchscherer exactly made the point. Maven handles the depenendencies on its own. Those deb deps will outdate anyway. If you want to avoid unecessary downloads, install Nexus locally and it will handle everything for you.

Let apt-get handle the Maven installation only and not interfere with its dependency system. I won't go through every dep but virtually 80 % of them are useless moreover, I am not able to purge my local repo since there prepared artifacts always remain.

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

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

Changed in maven2 (Ubuntu):
status: New → Confirmed
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.