diff --git a/docs/manual/CoreTasks/libraries.html b/docs/manual/CoreTasks/libraries.html deleted file mode 100644 index 9d7ed9f3d..000000000 --- a/docs/manual/CoreTasks/libraries.html +++ /dev/null @@ -1,411 +0,0 @@ - - - - - -Libraries Task - - - - -

Libraries

-

Description

-

- - Extensible library download mechanism, integrated with the - Maven repository hosted - at ibiblio.org. - -

- -

- This task can: -

-
    -
  1. Download publicly published JAR files by version
  2. -
  3. Download JAR files from private file: or http: repositories
  4. -
  5. Cache the JAR files in a directory tree
  6. -
  7. Check for updates on a regular schedule
  8. -
  9. Build paths for compilation/execution
  10. -
  11. Fail the build if needed libraries are missing
  12. -
  13. Force an update of all libraries
  14. -
  15. Skip all downloading when offline -
- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeDescriptionRequired
destDirDestination directory for all downloads - No - default is ${user.home}/.maven/repository
offlineFlag to indicate that the system is offline, and that - no downloads should take place. - No
flattenflag to indicate that files should be flattened when downloaded - No -default false
usetimestampflag to indicate that timestamps should - be compared when probing for updates. - No -default false
pathIDName of a path to create containing all - libraries in this declaration. - No
repositoryRefReference to a predefined repository - No
- -

-The default destination is that used by Maven, -${user.home}/.maven/repository . It can be overridden by setting the -property ant.maven.repository.dir to a new location. -

- - -

Nested Elements

- - -

library

-This is the core of the system: a library to (potentially) download. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeDescriptionRequired
projectName of the project - Yes
version - Yes
archiveName of the archive - No
destinationNameFilename of downloaded file - No, default remote name
suffixSuffix of the archive - No -default ".jar"
enabledflag to turn on or off specific download/use - of an archive - No -default "true"
- -

Repository

-

-A repository is an Ant datatype that extends the Repository -type. Ant only ships with one: the mavenrepository. If no repository is -declared inline, and no repositoryref attribute set, the task -will default to the maven repository. -

- - - - - - - - - - - - -
AttributeDescriptionRequired
urlURL of the repository - No
- -

Example:

-
-    <repository ref="predefined.repository" />
-
- -

mavenrepository

- -

-This connects to the Maven repository at ibiblio.org, or another -chosen. Private repositories should copy the existing layout. -

-

-If no url is set, the default URL is -http://ibiblio.org/maven, unless the property -ant.maven.repository.url is set to something else. - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeDescriptionRequired
urlURL of the repository - No
checkMD5Flag to turn on MD5 checking - (unimplemented) - No
usernameHTTP authentication username - No
passwordHTTP authentication password - Only if username is set
- -

UpdatePolicies

- -

Update policies are an (extensible) means of tuning the download, running -code before and possibly after a download. They can enable or disable -checks for individual files, skip the download process, or perform some -post-download validation. -

- -

All policies have at least the common set of attributes; some may have more, -in which case an updated attribute list is shown.

- - - - - - - - - - - - -
AttributeDescriptionRequired
enabledEnabled flag - No -default "true"
- -

Policies can be chained by listing them in order. Before an update/download -takes place, all policies will be executed in order. After the download, the -policies will be invoked in reverse order. The compound policy in such a -situation is left to the experimentor, though reading the source will help. -

- -

-Developers may add new policies (such as signing incoming files) by adding -new datatypes extending the LibraryPolicy class.

- -

noupdate

- -

This policy will disable remote downloads when enabled. It is the policy -equivalent of the offline flag.

- - -

Example:

-
-    <noupdate />
-
- -

forceupdate

- -

This policy forces all libraries to be downloaded. If any download failed, -the build will halt.

-

Example:

-
-    <forceupdate />
-
- -

timestamp

- -

This policy tells Ant to check the repository to see if the files have changed -using timestamp checks. Any files which are up to date will not be downloaded again. -It is equivalent to setting the useTimestamp flag.

- -

Example:

-
-    <timestamp />
-
- -

scheduledupdate

- -This policy tells Ant to check the repository to see if the files have changed, -but only intermittently. An interval of the size of the schedule has to have -passed, or the set of files to check has to have changed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeDescriptionRequired
enabledEnabled flag - No -default "true"
markerFileName of a file to cache download history - Yes
Daysnumber of days between update checks - No
Hoursnumber of hours between update checks - No
Minutesnumber of minutes between update checks - No
- -

Example:

-
-    <scheduledupdate days="1" hours="3" minutes="17" />
-
- -

Check for an update every 27 hours, 17 minutes.

- - -

assertdownloaded

- -

This policy is really for testing the library. It does not -alter the download policy, but after any download has taken place, -it verifies that the number of files downloaded matches the number -expected.

- - - - - - - - - - - - - - - - - -
AttributeDescriptionRequired
countnumber of downloaded files expected. - Yes
enabledEnabled flag - No -default "true"
- -

Example:

-
-    <assertdownloaded count="4" />
-
- -

Examples

-
-    <!--
-    versions.properties says
-    xdoclet.version=2.0
-    commons-logging.version=1.0.3
-    commons-collections.version=3.1
-    -->
-    <property file="versions.properties" />
-    
-    <libraries destDir="${lib.dir}" pathid="xdoclet.lib" >
-      <mavenrepository />
-      <library project="xdoclet" 
-        version="${xdoclet.version}" />
-      <library project="commons-logging"  
-        version="${commons-logging.version}" />
-      <library project="commons-collections"  
-        version="${commons-collections.version}" />
-    </libraries>
-
- -

Load in versions from a file, then download the relevant archives. No -update schedule is defined, but a path is created for insertion into a -classpath. This property file driven dependency model is what we recommend -over hard coding versions in a build file. -

-
   <libraries destDir="build/lib" offline="${offline}" flatten="true">
-      <mavenrepository url="${private.server}"/>
-      <library project="doomed" archive="dead-code"
-        suffix=".war"
-        destinationName="product.war"
-        version="LATEST" />
-      <scheduledupdate markerfile="build/lib/marker.properties"
-        hours="11" />
-    </libraries>
-
- -

Download doomed/dead-code.LATEST.war from a private repository, save it to -build/lib/product.war with an update schedule of every eleven hours. -

- -
- -

Copyright © 2005 The Apache Software Foundation. All rights -Reserved.

- - - - diff --git a/docs/manual/coretasklist.html b/docs/manual/coretasklist.html index 5e4609f53..581f9f854 100644 --- a/docs/manual/coretasklist.html +++ b/docs/manual/coretasklist.html @@ -62,7 +62,6 @@ Javac
Javadoc/Javadoc2
Length
-Libraries
LoadFile
LoadProperties
LoadResource
diff --git a/docs/manual/running.html b/docs/manual/running.html index 831ea3e69..96d04e93e 100644 --- a/docs/manual/running.html +++ b/docs/manual/running.html @@ -289,18 +289,6 @@ org.apache.tools.ant.Executor implementation specified here. AnsiColorLogger. - - ant.maven.repository.dir - directory e.g. ${user.home}/.maven/repository - Override the default download location for libraries. - - - - ant.maven.repository.url - URL e.g. http://ibiblio.org/maven - Override the default source location for libraries. - - ant.netrexxc.* several formats