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.

Methods

Constants

ARTIFACT_ATTRIBUTES = [:group, :id, :type, :classifier, :version]

Attributes

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.

Public Instance methods

Convenience method that returns the associated javadoc artifact

Convenience method that returns a POM artifact.

Creates POM XML for this artifact.

Convenience method that returns a sources artifact.

to_hash()

Alias for to_spec_hash

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.

Protected Instance methods

Apply specification to this artifact.

[Validate]