Module | Buildr::ActsAsArtifact |
In: |
lib/buildr/packaging/artifact.rb
(CVS)
|
Mixin with a task to make it behave like an artifact. Implemented by the packaging tasks.
An artifact has an identifier, group identifier, type, version number and optional classifier. All can be used to locate it in the local repository, download from or upload to a remote repository.
The to_spec and to_hash methods allow it to be used everywhere an artifact is accepted.
ARTIFACT_ATTRIBUTES | = | [:group, :id, :type, :classifier, :version] |
classifier | [R] | Optional artifact classifier. |
group | [R] | The group identifier. |
id | [R] | The artifact identifier. |
type | [R] | The file type. (Symbol) |
version | [R] | The version number. |
Returns the artifact specification, in the structure:
<group>:<artifact>:<type>:<version>
or
<group>:<artifact>:<type>:<classifier>:<version>
Returns the artifact specification as a hash. For example:
com.example:app:jar:1.2
becomes:
{ :group=>'com.example', :id=>'app', :type=>:jar, :version=>'1.2' }
Uploads the artifact, its POM and digital signatures to remote server.
In the first form, uses the upload options specified by repositories.release_to. In the second form, uses a URL that includes all the relevant information. In the third form, uses a hash with the options :url, :username, :password, and :permissions. All but :url are optional.