/usr/share/java as maven repository?

Paul Cager paul-debian at home.paulcager.org
Wed Dec 19 00:00:25 UTC 2007


Dalibor Topic wrote:
> Paul Cager wrote:
>> Marcus Better wrote:
>>> Arnaud Vandyck wrote:
>>>
>>>> What about a maven plugin that leave the jar in /usr/share/java, but
>>>> "register" the jar.
>>>>
>>>> if mvn present:
>>>>   mvn install -DgroupId=... -DversionId=... -DartifactId=...
>>>> /usr/share/java/my.jar
>>> If it's meant to be run in postinst then Maven might not be installed
>>> yet.
>>>
>>> But I wonder how we are going to handle versioned dependencies. Maven
>>> projects tend to specify exact version numbers, right? That could be
>>> a real
>>> headache. I don't think we can ignore the version number, but we
>>> cannot use
>>> it as a hard dependency either.
>>>
>>> Cheers,
>>>
>>> Marcus
>>
>> The install:install-file plugin does almost what Arnaud suggests:
>>
>> http://maven.apache.org/guides/mini/guide-installing-3rd-party-jars.html
>>
>> mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \
>>     -DartifactId=<artifact-id> -Dversion=<version> \
>>     -Dpackaging=<packaging>
>>
>> But I wonder just how important it is to have a system-wide local repo?
>> It would certainly reduce the number of Jars an end-user needed to
>> download (clearly a good thing), but it seems like a lot of work (for
>> us).
> 
> I assume it's going to be a necessity for us for reproducible offline
> maven builds to inform maven about our own jars.
> 
> cheers,
> dalibor topic

Yes, I'd agree with that. When using maven as part of a Debian package
build, you'd need to use install:install-file or similar to create a
(presumably temporary) maven repo from the jars in /usr/share/java. Or,
more efficiently, we could just set up symlinks.

What I'm not so sure about is exporting the jars in /usr/share/java as a
Maven repo to *end users*. I can see it would be a useful way to reduce
network traffic (especially on multi-user systems), but it seems like a
lot of additional complexity and work for a relatively small gain. The
system admin could always set up a Maven-Proxy
(http://maven-proxy.codehaus.org/). Just my opinion, of course, but I
think there's a lot of things that should be higher priority.

Thanks,
Paul



More information about the pkg-java-maintainers mailing list