/usr/share/java as maven repository?

Paul Cager paul-debian at home.paulcager.org
Tue Dec 18 22:44:33 UTC 2007

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:


mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \
    -DartifactId=<artifact-id> -Dversion=<version> \

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).

More information about the pkg-java-maintainers mailing list