Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-java
Navigation:
Lists: gentoo-java: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: Gentoo Java <gentoo-java@g.o>
From: Joshua Nichols <nichoj@g.o>
Subject: Re: ideas for packages which use maven to build
Date: Wed, 14 Dec 2005 20:14:25 -0500
On Wed, 2005-12-14 at 19:39 +0100, Karl Trygve Kalleberg wrote:
> Joshua Nichols wrote:
> > I have been thinking recently, and I think I came up with a viable
> > solution for packaging this that use maven for building.
> > 
> > The first problem is that maven will attempt to download jar
> > dependencies from a remote repository. This can be avoided by calling
> > maven with -o, for offline mode.
> > 
> > This leads to the question of where, then, to get the jars from. I had
> > first thought at build time, we could populate a local repository with
> > symlinks to jars that we provide from packages. This would work, and
> > could be automated to some extent, but I think it would be tedious to
> > maintain a list of jars that each package needs. 
> 
> Even in the face of such tedium, there is one thing this gives us that 
> your suggestion does not: the ability to actually check for hidden 
> dependencies.
> 
> If we create a local, minimal .jar environment for each maven-built 
> package, we know exactly which jars (and therefore which ebuilds) it 
> depends on.
> 
> In the case where maven itself goes into the system and looks around for 
> .jars that are there, we may quickly end up with it depending on stuff 
> we didn't see.
> 
> This happens with configure scripts and C/C++ applications all the time. 
> Most of the time, we can do ./configure --enable/disable, but sometimes 
> flipping this switch has no effect: it will still automatically 
> autodetect stuff.

> 
> Before abandoning the idea of ebuild-local maven repos, I think we 
> should be very certain that we're not opening up this Pandora's box of 
> bad mojo.
As I mentioned, we could do sanity checks. The project.xml of the
project lists EVERY dependency of the project. So, we could parse this
file and know what jars will be used from the local repo. We can check
if the jar's symlink is valid (the package is installed), and based on
where it points to, you can figure out what package it comes from, and
consequently check that this package is in DEPEND or RDEPEND.

> That being said, a system-wide maven repo that users can avail 
> themselves of would be great! And AFAICT, it would only need minor 
> tweaks to the java-*.eclasses.

I was just thinking, and there wouldn't be much needed to support both
standard java eclasses and the ones from axxo-overlay.

Maven has some properties for specifying which target/source to use, so
if it's on a system using axxo-overlay, it could use
java-pkg_get-{source,target}, and otherwise default to 1.4.


I do have an alternative approach (which I thought I had discussed on
the list at some point...).

Instead of having a local repo, there would be a file that contains
information about how a repo path maps to a jar from a package. For
example,

commons-logging/jars/commons-logging-api-1.0.8=commons-logging-api@commons-logging

>From here, there are a couple of paths... there could either be a
package that provides this file for every jar under the sun, this file
could live somewhere in /usr/portage. Alternatively, there could be a
file for each package/version... but this would add a bit of extra
maintenence.


At this point I think either approach would be sufficient. Right now,
I'm leaning towards the symlink-populated repo package. It has the added
benefit of providing a local repository that a user could use if they
wanted 

- Josh
-- 
gentoo-java@g.o mailing list


References:
ideas for packages which use maven to build
-- Joshua Nichols
Re: ideas for packages which use maven to build
-- Karl Trygve Kalleberg
Navigation:
Lists: gentoo-java: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: ideas for packages which use maven to build
Next by thread:
Re: ideas for packages which use maven to build
Previous by date:
Re: ideas for packages which use maven to build
Next by date:
Installing Javadoc documentation with java-pkg_dohtml


Updated Jun 17, 2009

Summary: Archive of the gentoo-java mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.