You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Marshall Schor <ms...@schor.com> on 2009/09/16 18:28:56 UTC

Issues around naming of jar files, and maven repositories naming standards renaming our jars

We have artifact names like:

uimaj-ep-cas-editor

and the builds for these have a <finalName> element which assigns the
name of the jar to be something different from the artifact, for
instance, in the above case,

<finalName>org.apache.uima.caseditor_${uimaj-release-eclipse-version}</finalName>

For Eclipse plug-in jars, the jar name needs to match the assigned
plugin-id.

This works fine.  However, when maven does the "install" (to the local
repository), the jar files are renamed (I guess to conform to maven
conventions) to be
<artifactId>-<version>.jar, or in this case

uimaj-ep-cas-editor-2.3.0.incubating-SNAPSHOT.jar

So, we have many cases (not just for Eclipse, plugins, but also for jars
like uima-core) which are renamed along these lines.

This apparently has not been a problem up to now, because (in part) we
are not using maven-sourced jars other than via the eclipse:eclipse
goals, and that plugin just goes ahead and makes the jar in the repo
(under it's maven-convention-name) available on the Eclipse project's
classpath.

I found one issue that took quite a bit of time to solve: I was redoing
our Eclipse update site generation in maven; one thing that is needed is
to get the "jars" of the plugins and I was using the maven dependency
plugin to go get these jars.  That plugin nicely obtained the jars from
the repository (my local one) and that caused a problem, because the jar
names were the maven-convention ones, and not the ones set using the
<finalName> build element.  I worked around this by using an ant script
to get the jars from the other projects' target/ folder, where they have
the right (by Eclipse standards) jar name.

If at some point we wanted to conform better to Maven "standards", we
could rename our artifacts such that the final jar name matched without
using the <finalName> element.  (You might be thinking there's still a
"problem" because the final jar name has no "version" info on it, while
the one in the maven repo does.  There's a parameter in the dependency
plugin, "stripVersion" which takes care of this.)

Please post your further insight into this issue, and/or opinions re: if
we should change our artifact names to match our final jar target names.

-Marshall

Re: Issues around naming of jar files, and maven repositories naming standards renaming our jars

Posted by Adam Lally <al...@alum.rpi.edu>.
 Wed, Sep 16, 2009 at 12:28 PM, Marshall Schor <ms...@schor.com> wrote:
> <snip/>
> If at some point we wanted to conform better to Maven "standards", we
> could rename our artifacts such that the final jar name matched without
> using the <finalName> element.  (You might be thinking there's still a
> "problem" because the final jar name has no "version" info on it, while
> the one in the maven repo does.  There's a parameter in the dependency
> plugin, "stripVersion" which takes care of this.)
>
> Please post your further insight into this issue, and/or opinions re: if
> we should change our artifact names to match our final jar target names.
>

Is it even possible to rename the eclipse plugins to match Maven
conventions?  I seem to recall the maven naming being incompatible
with the eclipse plugin naming (for example, they differ on whether to
use _ or - as the separator between the artifact name and version
number.

For the non-eclipse stuff, I guess we could rename them, but it might
annoy users who would have to mess with their classpath settings.

  -Adam