gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: jakarta-gump/stylesheet build.xsl
Date Fri, 07 Feb 2003 01:09:26 GMT
rubys       2003/02/06 17:09:26

  Modified:    java     Module.java Project.java Repository.java
               project  jdom.xml junit.xml
               repository avalon.xml db.xml jakarta.xml mozilla.xml
                        whichever.xml xml.xml
               site/xdocs module.xml project.xml repository.xml
               stylesheet build.xsl
  Log:
  A quick implementation which only redistributes jar files that are
  explicitly marked redistributable.  To lessen the burden for this,
  one can mark projects, modules, and even entire repositories
  redistributables, and an example has been done for each.  The
  resulting build scripts have been visually inspected to verify that
  each is working as intended.
  
  At the moment, I can't see any reason to provide the additional
  functionallity to explicitly mark that something is NOT redistributable,
  but suggestions and alternate implementations are always welcome.
  
  Revision  Changes    Path
  1.22      +16 -5     jakarta-gump/java/Module.java
  
  Index: Module.java
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/java/Module.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Module.java	14 Jan 2003 15:49:50 -0000	1.21
  +++ Module.java	7 Feb 2003 01:09:25 -0000	1.22
  @@ -82,6 +82,7 @@
       private String srcdir;
       private Element description;
       private Element url;
  +    private boolean redistributable = false;
   
       private static String cvspass = System.getProperty("user.home")+"/.cvspass";
   
  @@ -161,6 +162,8 @@
               } else if (child.getNodeName().equals("svn")) {
                   Element svn = (Element) child;
                   svn.setAttribute("srcdir", name);
  +            } else if (child.getNodeName().equals("redistributable")) {
  +                redistributable = true;
               }
           }
           
  @@ -177,7 +180,6 @@
   
       /**
        * Property accessor for description attribute.
  -     * @param name attribute name
        * @return Value of the specified attribute.
        */
       public Element getDescription() {
  @@ -186,7 +188,6 @@
   
       /**
        * Property accessor for url attribute.
  -     * @param name attribute name
        * @return Value of the specified attribute.
        */
       public Element getUrl() {
  @@ -194,6 +195,14 @@
       }
   
       /**
  +     * Property accessor for redistributable attribute.
  +     * @return Value of the specified attribute.
  +     */
  +    public boolean getRedistributable() {
  +        return redistributable;
  +    }
  +
  +    /**
        * Append arbitrary XML data to this node.
        * @param child Node to be deep copied to this tree.
        */
  @@ -309,6 +318,8 @@
               if (cvs.getAttributeNode("compress") == null) {
                   cvs.setAttribute("compress", r.get("compress"));
               }
  +
  +            redistributable |= r.getRedistributable();
           }
       }
   
  
  
  
  1.49      +14 -3     jakarta-gump/java/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/java/Project.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- Project.java	27 Jan 2003 09:00:52 -0000	1.48
  +++ Project.java	7 Feb 2003 01:09:25 -0000	1.49
  @@ -85,6 +85,7 @@
       private Hashtable dependsOn = new Hashtable();
       private Hashtable referencedBy = new Hashtable();
       private Hashtable jars = new Hashtable();
  +    private boolean redistributable = false;
       private Element description;
       private Element url;
       private Vector deliver = new Vector();
  @@ -177,6 +178,8 @@
                   deliver.add(child);
               } else if (child.getNodeName().equals("nag")) {
                   expandNag((Element) child);
  +            } else if (child.getNodeName().equals("redistributable")) {
  +                redistributable = true;
               }
           }
   
  @@ -327,6 +330,8 @@
           } else {
               element.setAttribute("srcdir", result);
           }
  +
  +        redistributable |= module.getRedistributable();
       }
   
       /**
  @@ -336,6 +341,12 @@
        */
       private void expandDepends() throws Exception {
           String jardir = Workspace.getJarDir();
  +
  +        if (redistributable) {
  +            element.setAttribute("redistributable","true");
  +        } else {
  +            jardir = "";
  +        }
   
           for (Enumeration e=dependsOn.keys(); e.hasMoreElements(); ) {
               String name = (String)e.nextElement();
  
  
  
  1.5       +19 -3     jakarta-gump/java/Repository.java
  
  Index: Repository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/java/Repository.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Repository.java	14 Jan 2003 15:49:51 -0000	1.4
  +++ Repository.java	7 Feb 2003 01:09:25 -0000	1.5
  @@ -72,6 +72,7 @@
       static private Hashtable repositories = new Hashtable();
       private Element element;
       private String name;
  +    private boolean redistributable = false;
   
       /**
        * Create a set of Repository definitions based on XML nodes.
  @@ -106,7 +107,22 @@
   
           resolve(element);
   
  +        Node child=element.getFirstChild();
  +        for (; child != null; child=child.getNextSibling()) {
  +            if (child.getNodeName().equals("redistributable")) {
  +                redistributable = true;
  +            }
  +        }
  +
           repositories.put(name, this);
  +    }
  +
  +    /**
  +     * Property accessor for redistributable attribute.
  +     * @return Value of the specified attribute.
  +     */
  +    public boolean getRedistributable() {
  +        return redistributable;
       }
   
       /**
  
  
  
  1.9       +1 -0      jakarta-gump/project/jdom.xml
  
  Index: jdom.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/project/jdom.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jdom.xml	20 Jul 2002 06:11:25 -0000	1.8
  +++ jdom.xml	7 Feb 2003 01:09:25 -0000	1.9
  @@ -9,6 +9,7 @@
   
     <project name="jdom">
       <package>org.jdom</package>
  +    <redistributable/>
   
       <ant/>
       <depend project="jakarta-ant" inherit="runtime"/>
  
  
  
  1.12      +1 -0      jakarta-gump/project/junit.xml
  
  Index: junit.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/project/junit.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- junit.xml	3 Mar 2002 12:23:41 -0000	1.11
  +++ junit.xml	7 Feb 2003 01:09:25 -0000	1.12
  @@ -4,6 +4,7 @@
     <description>
       Unit test framework
     </description>
  +  <redistributable/>
   
     <cvs repository="sourceforge" host-prefix="cvs.JUnit" dir="junit"/>
     
  
  
  
  1.2       +1 -0      jakarta-gump/repository/avalon.xml
  
  Index: avalon.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/repository/avalon.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- avalon.xml	5 Feb 2003 22:59:03 -0000	1.1
  +++ avalon.xml	7 Feb 2003 01:09:25 -0000	1.2
  @@ -4,6 +4,7 @@
     <title>Apache Avalon</title>
     <home-page>http://avalon.apache.org/</home-page>
     <cvsweb>http://cvs.apache.org/viewcvs/</cvsweb>
  +  <redistributable/>
   
     <root>
       <method>pserver</method>
  
  
  
  1.2       +1 -0      jakarta-gump/repository/db.xml
  
  Index: db.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/repository/db.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- db.xml	3 Feb 2003 23:30:41 -0000	1.1
  +++ db.xml	7 Feb 2003 01:09:25 -0000	1.2
  @@ -4,6 +4,7 @@
     <title>Apache DB Project</title>
     <home-page>http://db.apache.org/</home-page>
     <cvsweb>http://cvs.apache.org/viewcvs/</cvsweb>
  +  <redistributable/>
   
     <root>
       <method>pserver</method>
  
  
  
  1.2       +1 -0      jakarta-gump/repository/jakarta.xml
  
  Index: jakarta.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/repository/jakarta.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jakarta.xml	5 Aug 2001 12:22:39 -0000	1.1
  +++ jakarta.xml	7 Feb 2003 01:09:25 -0000	1.2
  @@ -4,6 +4,7 @@
     <title>Jakarta</title>
     <home-page>http://jakarta.apache.org/</home-page>
     <cvsweb>http://cvs.apache.org/viewcvs/</cvsweb>
  +  <redistributable/>
   
     <root>
       <method>pserver</method>
  
  
  
  1.2       +1 -0      jakarta-gump/repository/mozilla.xml
  
  Index: mozilla.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/repository/mozilla.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mozilla.xml	5 Aug 2001 12:22:39 -0000	1.1
  +++ mozilla.xml	7 Feb 2003 01:09:25 -0000	1.2
  @@ -4,6 +4,7 @@
     <title>Mozilla</title>
     <home-page>http://www.mozilla.org/</home-page>
     <cvsweb>http://lxr.mozilla.org/mozilla/source/</cvsweb>
  +  <redistributable/>
   
     <root>
       <method>pserver</method>
  
  
  
  1.3       +1 -0      jakarta-gump/repository/whichever.xml
  
  Index: whichever.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/repository/whichever.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- whichever.xml	5 Oct 2001 00:24:31 -0000	1.2
  +++ whichever.xml	7 Feb 2003 01:09:25 -0000	1.3
  @@ -4,6 +4,7 @@
     <title>Whichever</title>
     <home-page>http://share.whichever.com/</home-page>
     <cvsweb>http://share.whichever.com/viewcvs.cgi/</cvsweb>
  +  <redistributable/>
   
     <root>
       <method>pserver</method>
  
  
  
  1.3       +1 -0      jakarta-gump/repository/xml.xml
  
  Index: xml.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/repository/xml.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- xml.xml	12 Oct 2001 09:58:55 -0000	1.2
  +++ xml.xml	7 Feb 2003 01:09:25 -0000	1.3
  @@ -4,6 +4,7 @@
     <title>XML</title>
     <home-page>http://xml.apache.org/</home-page>
     <cvsweb>http://cvs.apache.org/viewcvs/</cvsweb>
  +  <redistributable/>
   
     <root>
       <method>pserver</method>
  
  
  
  1.10      +6 -0      jakarta-gump/site/xdocs/module.xml
  
  Index: module.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/site/xdocs/module.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- module.xml	25 Jan 2003 18:38:02 -0000	1.9
  +++ module.xml	7 Feb 2003 01:09:25 -0000	1.10
  @@ -146,6 +146,12 @@
         <p>A definition of a <a href="project.html">project</a> which is
         physically contained in this module.</p>
       </subsection>
  +
  +    <subsection name="redistributable">
  +      <p>If present, indicates that outputs of builds from this module
  +      are redistributable.  Defaults to the redistributable value for
  +      the repository.</p>
  +    </subsection>
     </section>
   </body>
   </document>
  
  
  
  1.16      +6 -0      jakarta-gump/site/xdocs/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/site/xdocs/project.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- project.xml	3 Feb 2003 13:48:06 -0000	1.15
  +++ project.xml	7 Feb 2003 01:09:25 -0000	1.16
  @@ -497,6 +497,12 @@
   </nag>
   ]]></source>
       </subsection>
  +
  +    <subsection name="redistributable">
  +      <p>If present, indicates that outputs of builds from this module
  +      are redistributable.  Defaults to the redistributable value for
  +      the repository.</p>
  +    </subsection>
     </section>
   </body>
   </document>
  
  
  
  1.6       +5 -0      jakarta-gump/site/xdocs/repository.xml
  
  Index: repository.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/site/xdocs/repository.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- repository.xml	14 Jan 2003 15:49:52 -0000	1.5
  +++ repository.xml	7 Feb 2003 01:09:25 -0000	1.6
  @@ -59,6 +59,11 @@
           <td>Web interface to the repository</td>
           <td>No</td>
         </tr>
  +      <tr>
  +        <td>redistributable</td>
  +        <td>Are the outputs of this build redistributable?</td>
  +        <td>No</td>
  +      </tr>
       </table>
       <p/>
   
  
  
  
  1.52      +1 -1      jakarta-gump/stylesheet/build.xsl
  
  Index: build.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/stylesheet/build.xsl,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- build.xsl	11 Nov 2002 18:44:55 -0000	1.51
  +++ build.xsl	7 Feb 2003 01:09:26 -0000	1.52
  @@ -210,7 +210,7 @@
               <xsl:apply-templates select="ant|script"/>
   
               <!-- Optionally save any jars produced -->
  -            <xsl:if test="/workspace/@jardir">
  +            <xsl:if test="@redistributable and /workspace/@jardir">
                 <xsl:variable name="jardir" select="/workspace/@jardir"/>
                 <xsl:variable name="home" select="@home"/>
                 <xsl:variable name="module" select="@module"/>
  
  
  

Mime
View raw message