sonatype/nexus — pull request #818 by cstamas (2013-04-15 08:48:11+00:00)
Title: [POC] Exposing attributes to deployer.

With this change, item attributes might be contributes at
deploy, sourced from HTTP headers and/or from query parameters.

One possible use case with current maven (where it's impossible
to add query parameters to PUT requests AFAIK) is following:

Modify your settings.xml server entry with something like
this:

```

nexus
deployment
deployment123

X-Nexus-Deploy-Attribute-BuildId
NXOSS-1234

```

Note1: the part AFTER "X-Nexus-Deploy-Attribute-" prefix is
used as attribute key, so you can add "X-Nexus-Deploy-Attribute-Foo"
and also "X-Nexus-Deploy-Attribute-Bar" etc. As many entries you want.

Note2: on CI it is worth to filter the header value with something meaningful,
like job ID, or current SCM commit, etc...

If you have settings.xml set up and used in Maven as above, and
you deploy, all deployed artifacts will have an attribute(s)
added like this (for details read javadoc):

deploy.BuildId=NXOSS-1234

Now, if you combine this with the example plugin
https://github.com/sonatype/nexus-example-plugins/tree/master/selectionactors

TagSelector (where you could have `?attributeKey=nexus.BuildId&attributeValue=NXOSS-1234`)
you can act on whole set of artifacts originating from same CI job or
similar.