On 12/01/2010, at 8:06 AM, Nigel Magnay wrote:

> How burnt-in to maven (and repo managers) is the snapshot resolution
> metadata ? Specifically, when I pull metadata like
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <metadata>
>  <groupId>org.company</groupId>
>  <artifactId>artifact</artifactId>
>  <version>2.3-SNAPSHOT</version>
>  <versioning>
>    <snapshot>
>      <timestamp>20081030.213329</timestamp>
>      <buildNumber>5</buildNumber>
>    </snapshot>
>    <lastUpdated>20081030213342</lastUpdated>
>  </versioning>
> </metadata>
> 
> Does the resultant resolved snapshot *have* to be called
> artifact-${timestamp}-${buildnumber}.jar ?

ATM, yes.

> 
> It would be useful if it could be configured to be artifact-${git
> sha1}.jar instead. Or even for it to be artifact-${uuid}, which is
> resolved in the <snapshot> section
> 
> Even if it couldn't, an extensible tags element would be good; something like
> ...
> <snapshot>
>      <timestamp>20081030.213329</timestamp>
>      <buildNumber>5</buildNumber>
>      <properties>
>        <revision>df360a1e8df170892de84df8876aaf28e3815598</revision>
>        <buildId>B2A7A1E7-FE24-4A81-B87C-88298C1D4CE5</buildId>
>        <branch>master</branch>
>        <hudson.project>Main-Build</hudson.project>
>        <hudson.build.number>123</hudson.build.number>
>        <flags>passed-integration, passed-regression</flags>
> ....
>      <properties>
>    </snapshot>
> 
> Would that be difficult to add without breaking many things?

Not that hard in Maven itself, but the flow on to other tools would probably be 
significant. This is the same for any POM or metadata change where we need to 
consider backwards compat with Maven 2 and other tools. It's a good thing to 
consider for 3.1+ as we revisit repository metadata for things like 
classifiers, etc.

(In Archiva, we recently flipped to using a single ID in the metadata apart 
from the GAV which defaults to the whole filename. That way individual 
repository types and resolvers can construct from metadata and derive to 
metadata things like the type, classifier, artifact build version, etc however 
they like).

- Brett

--
Brett Porter
br...@apache.org
http://brettporter.wordpress.com/





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to