Class | Buildr::Artifact |
In: |
lib/buildr/packaging/artifact.rb
(CVS)
|
Parent: | Rake::FileTask |
A file task referencing an artifact in the local repository.
This task includes all the artifact attributes (group, id, version, etc). It points to the artifact‘s path in the local repository. When invoked, it will download the artifact into the local repository if the artifact does not already exist.
Note: You can enhance this task to create the artifact yourself, e.g. download it from a site that doesn‘t have a remote repository structure, copy it from a different disk, etc.
DEFAULT_TYPE | = | :jar | The default artifact type. |
Returns an array of specs for all the registered artifacts. (Anything created from artifact, or package).
Lookup a previously registered artifact task based on its specification (String or Hash).
Turn a spec into a hash. This method accepts a String, Hash or any object that responds to the method to_spec. There are several reasons to use this method:
Convert a hash back to a spec string. This method accepts a string, hash or any object that responds to to_spec.
Use this when you want to install or upload an artifact from a given content, for example:
readme = artifact('com.example:readme:txt:1.0').content(<<-EOF Please visit our website at http://example.com/readme <<EOF install readme
If the argument is not a string, it will be converted to a string using to_s
Use this when you want to install or upload an artifact from a given file, for example:
test = artifact('group:id:jar:1.0').from('test.jar') install test
See also Buildr#install and Buildr#upload.