On 8 April 2015 at 10:04, Alec Leamas <leamas.alec@gmail.com> wrote:
On 08/04/15 10:17, Michal Srb wrote:
Hi Alec,

Hi! Thanks for taking time to reply.

On 04/08/2015 09:22 AM, Alec Leamas wrote:

All this metadata (groupId, artifactId, etc.) is available in the
/usr/share/maven-metadata/app.xml file. So, my question: is there any
tool which parses app.xml and installs the jar file to the local maven
repository?

Or have I just got it wrong, and there is another much more elegant
way to make system jar files available to the local maven?


You can call "xmvn" instead of "mvn" and it will first try to use system
jars.

I take this answer as "No, there is no such tool" (?)

To get this tool, you can:

# yum install xmvn

 

Only artifacts not available on your system will be downloaded
from Maven Central. It's important to note that "xmvn" ignores artifact
versions. It will first try to find exact version, but if it's not
available, it will look for any other version of given artifact.

Which IMHO makes perfect sense when working downstream (i. e., packaging) but isn't really sane while doing upstream developing which requires exact version matching.

As you can see, development against system jars can be a bit
problematic. That's because "system" jars are not really meant to be
used for development (IMO). We usually package jars into RPMs, because
some Java application needs them at runtime/compile time.

Still, I have some jars which are available in fedora packages but not in maven central. Which means that the reasonable way is to install (fedora-wise) the package and then maven-install the packaged jar into the maven repository to make them available as dependencies. Or?



--