peterreilly 2004/03/15 07:32:41 Modified: . Tag: ANT_16_BRANCH WHATSNEW docs/manual/CoreTasks Tag: ANT_16_BRANCH tar.html src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH Tar.java Log: sync with head Revision Changes Path No revision No revision 1.503.2.61 +2 -0 ant/WHATSNEW Index: WHATSNEW =================================================================== RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.503.2.60 retrieving revision 1.503.2.61 diff -u -r1.503.2.60 -r1.503.2.61 --- WHATSNEW 15 Mar 2004 11:29:13 -0000 1.503.2.60 +++ WHATSNEW 15 Mar 2004 15:32:40 -0000 1.503.2.61 @@ -52,6 +52,8 @@ * spelling fixes, occurred. Bugzilla Report 27282. +* add uid and gid to tarfileset. Bugzilla Report 19120. + Changes from Ant 1.6.0 to Ant 1.6.1 =================================== No revision No revision 1.19.2.3 +17 -4 ant/docs/manual/CoreTasks/tar.html Index: tar.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/tar.html,v retrieving revision 1.19.2.2 retrieving revision 1.19.2.3 diff -u -r1.19.2.2 -r1.19.2.3 --- tar.html 9 Feb 2004 22:12:07 -0000 1.19.2.2 +++ tar.html 15 Mar 2004 15:32:40 -0000 1.19.2.3 @@ -136,14 +136,27 @@ </tr> <tr> <td valign="top">username</td> - <td valign="top">The username for the tar entry. This is not the same as the UID, which is - not currently set by the tar task.</td> + <td valign="top">The username for the tar entry. This is not the same as the UID. + </td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">group</td> - <td valign="top">The groupname for the tar entry. This is not the same as the GID, which is - not currently set by the tar task.</td> + <td valign="top">The groupname for the tar entry. This is not the same as the GID. + </td> + <td align="center" valign="top">No</td> + </tr> + <tr> + <td valign="top">uid</td> + <td valign="top">The user identifier (UID) for the tar entry. This is an integer value + and is not the same as the username. <em>since Ant 1.6.2</em>. + </td> + <td align="center" valign="top">No</td> + </tr> + <tr> + <td valign="top">gid</td> + <td valign="top">The group identifier (GID) for the tar entry. <em>since Ant 1.6.2</em>. + </td> <td align="center" valign="top">No</td> </tr> <tr> No revision No revision 1.46.2.6 +38 -4 ant/src/main/org/apache/tools/ant/taskdefs/Tar.java Index: Tar.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Tar.java,v retrieving revision 1.46.2.5 retrieving revision 1.46.2.6 diff -u -r1.46.2.5 -r1.46.2.6 --- Tar.java 12 Mar 2004 09:10:10 -0000 1.46.2.5 +++ Tar.java 15 Mar 2004 15:32:41 -0000 1.46.2.6 @@ -378,6 +378,8 @@ } te.setUserName(tarFileSet.getUserName()); te.setGroupName(tarFileSet.getGroup()); + te.setUserId(tarFileSet.getUid()); + te.setGroupId(tarFileSet.getGid()); tOut.putNextEntry(te); @@ -436,6 +438,8 @@ private String userName = ""; private String groupName = ""; + private int uid; + private int gid; private String prefix = ""; private String fullpath = ""; private boolean preserveLeadingSlashes = false; @@ -519,8 +523,7 @@ /** * The username for the tar entry - * This is not the same as the UID, which is - * not currently set by the task. + * This is not the same as the UID. * @param userName the user name for the tar entry. */ public void setUserName(String userName) { @@ -535,9 +538,24 @@ } /** + * The uid for the tar entry + * This is not the same as the User name. + * @param userName the user name for the tar entry. + */ + public void setUid(int uid) { + this.uid = uid; + } + + /** + * @return the uid for the tar entry + */ + public int getUid() { + return uid; + } + + /** * The groupname for the tar entry; optional, default="" - * This is not the same as the GID, which is - * not currently set by the task. + * This is not the same as the GID. * @param groupName the group name string. */ public void setGroup(String groupName) { @@ -549,6 +567,22 @@ */ public String getGroup() { return groupName; + } + + /** + * The GID for the tar entry; optional, default="0" + * This is not the same as the group name. + * @param groupName the group name string. + */ + public void setGid(int gid) { + this.gid = gid; + } + + /** + * @return the group identifier. + */ + public int getGid() { + return gid; } /**
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]