Browse Source

renaming as per Peter's suggestion. Made one of the attributes visible, too.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277409 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 21 years ago
parent
commit
7e5302e625
5 changed files with 22 additions and 14 deletions
  1. +9
    -1
      docs/manual/CoreTasks/libraries.html
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/repository/ForceUpdatePolicy.java
  3. +4
    -4
      src/main/org/apache/tools/ant/taskdefs/repository/Libraries.java
  4. +7
    -7
      src/main/org/apache/tools/ant/taskdefs/repository/Library.java
  5. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/repository/TimestampPolicy.java

+ 9
- 1
docs/manual/CoreTasks/libraries.html View File

@@ -57,6 +57,13 @@
</td>
<td valign="top" align="center">No -default false</td>
</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>
<td valign="top">pathID</td>
<td valign="top">Name of a path to create containing all
@@ -261,7 +268,8 @@ the build will halt.</P>
<h4>timestamp</h4>

<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>
<pre>


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/repository/ForceUpdatePolicy.java View File

@@ -47,7 +47,7 @@ public class ForceUpdatePolicy extends BaseLibraryPolicy {
*/
public boolean beforeConnect(Libraries owner, ListIterator libraries) {
owner.markAllLibrariesForFetch(true);
owner._setUseTimestamp(false);
owner.setUseTimestamp(false);
return true;
}



+ 4
- 4
src/main/org/apache/tools/ant/taskdefs/repository/Libraries.java View File

@@ -325,7 +325,7 @@ public final class Libraries extends Task {
* set the timestamp flag. Not for export into XML
* @param useTimestamp
*/
public void _setUseTimestamp(boolean useTimestamp) {
public void setUseTimestamp(boolean useTimestamp) {
this.useTimestamp = useTimestamp;
}

@@ -501,7 +501,7 @@ public final class Libraries extends Task {
//record the fact in the library
log("success; marking as fetched",
Project.MSG_DEBUG);
library._setFetched(fetched);
library.assignFetched(fetched);
} catch (IOException e) {
log(ERROR_LIBRARY_FETCH_FAILED + library);
log(e.getMessage());
@@ -540,7 +540,7 @@ public final class Libraries extends Task {
Iterator it = libraryIterator();
while (it.hasNext()) {
Library library = (Library) it.next();
library._setToFetch(fetch);
library.assignToFetch(fetch);
}
}

@@ -553,7 +553,7 @@ public final class Libraries extends Task {
Iterator it = libraryIterator();
while (it.hasNext()) {
Library library = (Library) it.next();
library._setToFetch(!library.exists());
library.assignToFetch(!library.exists());
}
}



+ 7
- 7
src/main/org/apache/tools/ant/taskdefs/repository/Library.java View File

@@ -193,7 +193,7 @@ public class Library implements EnabledLibraryElement {
* set the library file. Hidden from Ant users.
* @param file
*/
public void _setLibraryFile(File file) {
public void assignLibraryFile(File file) {
this.libraryFile = file;
}

@@ -330,10 +330,10 @@ public class Library implements EnabledLibraryElement {
/**
* prefixed to avoid ant picking up on it, this sets
* 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
* library has been fetched.
* @param fetched
* @param fetchflag
*/
public void _setFetched(boolean fetched) {
this.fetched = fetched;
public void assignFetched(boolean fetchflag) {
this.fetched = fetchflag;
}

/**


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/repository/TimestampPolicy.java View File

@@ -38,7 +38,7 @@ public class TimestampPolicy extends BaseLibraryPolicy {
*/
public boolean beforeConnect(Libraries owner, ListIterator libraries) {
owner.markAllLibrariesForFetch(true);
owner._setUseTimestamp(true);
owner.setUseTimestamp(true);
return true;
}



Loading…
Cancel
Save