git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277409 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -57,6 +57,13 @@ | |||||
| </td> | </td> | ||||
| <td valign="top" align="center">No -default false</td> | <td valign="top" align="center">No -default false</td> | ||||
| </tr> | </tr> | ||||
| <tr> | |||||
| <td valign="top">usetimestamp</td> | |||||
| <td valign="top">flag to indicate that timestamps should | |||||
| be compared when probing for updates. | |||||
| </td> | |||||
| <td valign="top" align="center">No -default false</td> | |||||
| </tr> | |||||
| <tr> | <tr> | ||||
| <td valign="top">pathID</td> | <td valign="top">pathID</td> | ||||
| <td valign="top">Name of a path to create containing all | <td valign="top">Name of a path to create containing all | ||||
| @@ -261,7 +268,8 @@ the build will halt.</P> | |||||
| <h4>timestamp</h4> | <h4>timestamp</h4> | ||||
| <P>This policy tells Ant to check the repository to see if the files have changed | <P>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. </P> | |||||
| using timestamp checks. Any files which are up to date will not be downloaded again. | |||||
| It is equivalent to setting the <code>useTimestamp</code> flag. </P> | |||||
| <p>Example:</p> | <p>Example:</p> | ||||
| <pre> | <pre> | ||||
| @@ -47,7 +47,7 @@ public class ForceUpdatePolicy extends BaseLibraryPolicy { | |||||
| */ | */ | ||||
| public boolean beforeConnect(Libraries owner, ListIterator libraries) { | public boolean beforeConnect(Libraries owner, ListIterator libraries) { | ||||
| owner.markAllLibrariesForFetch(true); | owner.markAllLibrariesForFetch(true); | ||||
| owner._setUseTimestamp(false); | |||||
| owner.setUseTimestamp(false); | |||||
| return true; | return true; | ||||
| } | } | ||||
| @@ -325,7 +325,7 @@ public final class Libraries extends Task { | |||||
| * set the timestamp flag. Not for export into XML | * set the timestamp flag. Not for export into XML | ||||
| * @param useTimestamp | * @param useTimestamp | ||||
| */ | */ | ||||
| public void _setUseTimestamp(boolean useTimestamp) { | |||||
| public void setUseTimestamp(boolean useTimestamp) { | |||||
| this.useTimestamp = useTimestamp; | this.useTimestamp = useTimestamp; | ||||
| } | } | ||||
| @@ -501,7 +501,7 @@ public final class Libraries extends Task { | |||||
| //record the fact in the library | //record the fact in the library | ||||
| log("success; marking as fetched", | log("success; marking as fetched", | ||||
| Project.MSG_DEBUG); | Project.MSG_DEBUG); | ||||
| library._setFetched(fetched); | |||||
| library.assignFetched(fetched); | |||||
| } catch (IOException e) { | } catch (IOException e) { | ||||
| log(ERROR_LIBRARY_FETCH_FAILED + library); | log(ERROR_LIBRARY_FETCH_FAILED + library); | ||||
| log(e.getMessage()); | log(e.getMessage()); | ||||
| @@ -540,7 +540,7 @@ public final class Libraries extends Task { | |||||
| Iterator it = libraryIterator(); | Iterator it = libraryIterator(); | ||||
| while (it.hasNext()) { | while (it.hasNext()) { | ||||
| Library library = (Library) it.next(); | Library library = (Library) it.next(); | ||||
| library._setToFetch(fetch); | |||||
| library.assignToFetch(fetch); | |||||
| } | } | ||||
| } | } | ||||
| @@ -553,7 +553,7 @@ public final class Libraries extends Task { | |||||
| Iterator it = libraryIterator(); | Iterator it = libraryIterator(); | ||||
| while (it.hasNext()) { | while (it.hasNext()) { | ||||
| Library library = (Library) it.next(); | Library library = (Library) it.next(); | ||||
| library._setToFetch(!library.exists()); | |||||
| library.assignToFetch(!library.exists()); | |||||
| } | } | ||||
| } | } | ||||
| @@ -193,7 +193,7 @@ public class Library implements EnabledLibraryElement { | |||||
| * set the library file. Hidden from Ant users. | * set the library file. Hidden from Ant users. | ||||
| * @param file | * @param file | ||||
| */ | */ | ||||
| public void _setLibraryFile(File file) { | |||||
| public void assignLibraryFile(File file) { | |||||
| this.libraryFile = file; | this.libraryFile = file; | ||||
| } | } | ||||
| @@ -330,10 +330,10 @@ public class Library implements EnabledLibraryElement { | |||||
| /** | /** | ||||
| * prefixed to avoid ant picking up on it, this sets | * prefixed to avoid ant picking up on it, this sets | ||||
| * the fetch/no-fetch flag. | * the fetch/no-fetch flag. | ||||
| * @param toFetch | |||||
| * @param toFetchFlag | |||||
| */ | */ | ||||
| public void _setToFetch(boolean toFetch) { | |||||
| this.toFetch = toFetch; | |||||
| public void assignToFetch(boolean toFetchFlag) { | |||||
| this.toFetch = toFetchFlag; | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -355,10 +355,10 @@ public class Library implements EnabledLibraryElement { | |||||
| /** | /** | ||||
| * another not-for-end-users attribute; a flag set to true if the | * another not-for-end-users attribute; a flag set to true if the | ||||
| * library has been fetched. | * library has been fetched. | ||||
| * @param fetched | |||||
| * @param fetchflag | |||||
| */ | */ | ||||
| public void _setFetched(boolean fetched) { | |||||
| this.fetched = fetched; | |||||
| public void assignFetched(boolean fetchflag) { | |||||
| this.fetched = fetchflag; | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -38,7 +38,7 @@ public class TimestampPolicy extends BaseLibraryPolicy { | |||||
| */ | */ | ||||
| public boolean beforeConnect(Libraries owner, ListIterator libraries) { | public boolean beforeConnect(Libraries owner, ListIterator libraries) { | ||||
| owner.markAllLibrariesForFetch(true); | owner.markAllLibrariesForFetch(true); | ||||
| owner._setUseTimestamp(true); | |||||
| owner.setUseTimestamp(true); | |||||
| return true; | return true; | ||||
| } | } | ||||