ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Tar.java
Date Mon, 15 Mar 2004 14:36:21 GMT
peterreilly    2004/03/15 06:36:21

  Modified:    .        WHATSNEW
               docs/manual/CoreTasks tar.html
               src/main/org/apache/tools/ant/taskdefs Tar.java
  Log:
  Allow setting of uid and gid in a tarfileset - in addition or in place
  of user and group.
  PR: 19120
  Reported by: Dale Sherwood
  
  Revision  Changes    Path
  1.573     +2 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.572
  retrieving revision 1.573
  diff -u -r1.572 -r1.573
  --- WHATSNEW	15 Mar 2004 11:23:47 -0000	1.572
  +++ WHATSNEW	15 Mar 2004 14:36:20 -0000	1.573
  @@ -101,6 +101,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
   =============================================
   
  
  
  
  1.21      +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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- tar.html	9 Feb 2004 21:50:05 -0000	1.20
  +++ tar.html	15 Mar 2004 14:36:21 -0000	1.21
  @@ -135,14 +135,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>
  
  
  
  1.52      +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.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- Tar.java	12 Mar 2004 09:09:03 -0000	1.51
  +++ Tar.java	15 Mar 2004 14:36:21 -0000	1.52
  @@ -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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message