Hi Karl,
Karl Trygve Kalleberg wrote:
> In place of a virtual, one can do:
> DEPEND="|| ( dev-java/connectorj dev-db/postgresql )"
>
> Which tells Portage that if either of the two packages are installed, it's
> okay to merge this package. If none is installed, it's up to Portage
> itself to select (at random).
Interesting. Something new again.
> We have been looking into Maven a few times already, but have not been
> able to make it play nice with Gentoo.
>
> The main problem is that, from cursory inspection, there does not seem to
> be a generic mechanism for specifying the path of external libraries that
> Maven otherwise would download.
>
> It's easy enough to force Maven not do download anything, but it will
> still look for a very particular file in the lib/ dir.
Nope. If you use (or generate) a local build.properties file that overrides
the dependencies, Maven will not look elsewhere. E.g.
maven.jar.override=on
maven.jar.junit=/usr/share/junit/lib/junit.jar
Will take the local junit.jar independent of the version mensioned in the
dependencies of the corresponding POM and Maven will neither look in a
remote repository nor in a local one for this file. Naturally this version
should be compatible with the version referenced in the POM though.
With an ebuild that can read the POMs this procedure can be improved a lot
though. Otherwise it is a manual task.
> We do indeed want a good solution to the entire Maven headache. Currently,
> we supply our own build.xml files, some of the time with the Maven
> build.xml generator.
The Maven Ant-plugin will generate build.xml files, that also try to
download the dependencies. So you'll win nothing.
[snip]
>> And what about the situation, when we lately have a real sourced package
>> (e.g. Maven)?
>
> Well, if we can build Maven from sources, and force Maven into using
> ebuild-packaged libraries instead of ones from its own repository,
> depending on Maven is perfectly okay.
With the solution above, it is regardless for the ebuild, whether Maven was
build from source or is a binary package. You'll just need either maven or
maven-bin as build dependency.
- Jörg
--
gentoo-java-aBrp7R+bbdUdnm+yROfE0A@xxxxxxxxxxxxxxxx mailing list
|