Access final artifact properties such as uniqueVersion within Maven
-------------------------------------------------------------------

                 Key: MNG-4712
                 URL: http://jira.codehaus.org/browse/MNG-4712
             Project: Maven 2 & 3
          Issue Type: Improvement
          Components: Artifacts and Repositories
    Affects Versions: 2.2.1
         Environment: 64-bit Linux 2.6.18-128 (x86_64)
            Reporter: thinkpipes


Access to properties about the final artifact, such as the final, constructed 
uniqueVersion, filename, would be extremely useful.

During deployment, I store a build's info in a local MySQL db that includes the 
URL where the artifact is deployed (to Nexus). However, I can't reliably do 
this when uniqueVersion=true.

With the assembly plugin, I can construct a file name myself (and store in the 
db with the sql-maven-plugin), however this requires the developer to adhere to 
my final name format. Plus, with multi-module projects, I'd have to define a 
different assembly plugin for each module.

I want to be able to save the final constructed artifact name (with the 
uniqueVersion already defined) in a user-definable property, like so:
   <deployableArtifactFinalName>this.jar.final</deployableArtifactFinalName>
   (call the XML tag whatever fits best)

This would be perfect for multi-module projects, as I would be able to save and 
reference each modules' final constructed artifact name in a property I define, 
if I so choose (e.g. ${this.jar.final} using the example above).

I looked through the code, and unless I'm reading it incorrectly, referencing 
/[Apache-SVN]/maven/maven-2/branches/maven-2.2.x/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/SnapshotTransformation.java,
 I'm basically suggesting having an easy way to expose the members in the 
Snapshot object, as used in the transformForDeployment and constructVersion 
methods.

It would be great if this could then be extended to things like file size and 
extension, however for now, just getting the uniqueVersion would be terrific.

Thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to