On Sat, Mar 28, 2009 at 8:02 PM, Greg Brown <[email protected]> wrote:
> I'm not especially familiar with Maven - does it actually enforce that you
> include the version number in the JAR file name, or simply the names of the
> artifacts you publish? Put another way - is Maven specifically a JAR
> repository, or is it more general than that?

To 'upload' a jar to Maven's repository, you must provide artifact,
group and version, and Maven will change the names, since there is a
simple conversion algorithm for it;

URL url = new URL(
    repoLocation + "/" +
    groupId.replace( '.', '/' ) + "/"
    artifactId + "/" +
    version + "/" +
    artifactId + "-" + version
    ( classifier != null ? "-" + classifier : "" )
    + "." + packaging
);

Or something to that extent. For that to work, there are very strict
restrictions of naming that you can not override.

BUT, if you ask for an upload from the Maven community, they will ask
for group, artifact, version and so on, together with the jar file
itself, and then the Maven tool (deploy:deploy-file) will
automatically make the correct naming, no matter what the jar filename
is.


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Reply via email to