On Thu, Jan 15, 2015 at 6:19 PM, Andreas Färber <afaerber@suse.de> wrote:
Am 15.01.2015 um 14:43 schrieb Robert Munteanu:
On Tue, Jan 6, 2015 at 11:36 PM, Andreas Färber <afaerber@suse.de> wrote:
I had noticed that in Java:base Duncan has some patches tweaking Maven for OBS usage whereas the one in yet another location https://build.opensuse.org/package/show/devel:tools:building/maven was just a repackaging of binaries, which didn't work for building anything I tried but is a newer version (despite still not the latest).
https://build.opensuse.org/request/show/281405 brings in the latest version for Maven. Would be interesting to find out how this fails when you try building with it.
https://build.opensuse.org/package/live_build_log/home:a_faerber:hadoop/hado...
You're not applying any patch, so according to my earlier tests, Maven will still be trying to download stuff from the Internet, which is prohibited in OBS. Instead, Maven needs to reuse packages in whatever minor version installed by zypper before attempting to access the net.
I have a better understanding of Maven than of RPM packaging, so bear with me a little while I try to understand the issue. Maven looks by default for RPMs and associated metadata ( pom.xml files ) under the current users $HOME/.m2/repository . If it does not find them, it attempts to downloads them from the configured Maven repositories ( Maven Central by default ). What we want to achieve is to have Maven consider installed RPMs when looking for artifacts. IIUC this requires two things: 1. Installed RPM packages contain both .jar and pom.xml files . 2. Files installed by RPM packages are consumed by Maven. The most straightforward that that I can imagine ( again, with my Maven user's hat on is ) a. Include pom.xml in the RPM packages b. Create a Maven-compatible structure from the installed RPMs ( can be a symlink tree somewhere under /usr or /var ) c. Point Maven to that repository when building. The most straightforward way is to use a %maven macro which expands to mvn --setings /some/special/setttings.xml , which configures Maven to look for our RPM -based repository. Note that for none of these require any patches to the main Maven package. Robert
Regards, Andreas
-- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg)
-- http://robert.muntea.nu/ -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org