The list of changes:
- indent the xml output
- add a 'priority' attribute to project - to move some projects
to the beginning
- in bash - check if a file gump_local is found, and if so
source it ( it allows setting the CLASSPATH, java_home and
ant options like compiler - usefull to test with different
compilers/vms ).
- I also use a special script instead of rsync - it'll basically
create symlinks ( and save a lot of time for repeated runs ).
Please select what you find usefull and maybe check in.
( I also have a separate descriptor for stratum so it
can compile it and all the deps )
Costin
Index: java/Jenny.java
===================================================================
RCS file: /home/cvs/jakarta-alexandria/proposal/gump/java/Jenny.java,v
retrieving revision 1.19
diff -u -r1.19 Jenny.java
--- java/Jenny.java 27 Aug 2002 14:54:09 -0000 1.19
+++ java/Jenny.java 10 Oct 2002 03:13:30 -0000
@@ -62,7 +62,7 @@
// TRaX classes
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.*;
// Java API for XML Parsing classes
import javax.xml.parsers.DocumentBuilder;
@@ -328,7 +328,9 @@
private void output(Node dom, String dest) throws Exception {
DOMSource in = new DOMSource(dom);
StreamResult out = new StreamResult(dest);
- tFactory.newTransformer().transform(in, out);
+ Transformer t=tFactory.newTransformer();
+ t.setOutputProperty( OutputKeys.INDENT, "yes" );
+ t.transform(in, out);
}
/**
Index: java/Project.java
===================================================================
RCS file: /home/cvs/jakarta-alexandria/proposal/gump/java/Project.java,v
retrieving revision 1.44
diff -u -r1.44 Project.java
--- java/Project.java 27 Aug 2002 14:54:09 -0000 1.44
+++ java/Project.java 10 Oct 2002 03:13:31 -0000
@@ -497,8 +497,10 @@
}
/**
- * Implement a deterministing sort order. Projects which are most
- * referenced get priority. After that, order is determined
alphabetically.
+ * Implement a deterministing sort order. Projects with high
'priority' attribute
+ * are first. Then projects which are most referenced get priority.
+ * After that, order is determined alphabetically.
+ *
*/
private static class Ranker implements Comparator {
public int compare(Object o1, Object o2) {
@@ -508,6 +510,16 @@
if (p1 == null) return -1;
if (p2 == null) return 1;
+ String p1Priority=p1.get("priority");
+ if( "".equals( p1Priority )) p1Priority=null;
+ String p2Priority=p2.get("priority");
+ if( "".equals( p2Priority )) p2Priority=null;
+ if( p1Priority!=null || p2Priority!=null ) {
+ if( p1Priority==null ) return 1;
+ if( p2Priority==null ) return -1;
+ return (p1Priority).compareTo( p2Priority);
+ }
+
int diff = p2.referencedBy.size() - p1.referencedBy.size();
if (diff != 0) return diff;
Index: profile/gump.xml
===================================================================
RCS file: /home/cvs/jakarta-alexandria/proposal/gump/profile/gump.xml,v
retrieving revision 1.124
diff -u -r1.124 gump.xml
--- profile/gump.xml 18 Sep 2002 09:22:49 -0000 1.124
+++ profile/gump.xml 10 Oct 2002 03:13:32 -0000
@@ -50,7 +50,8 @@
<module
href="http://cvs.apache.org/viewcvs/~checkout~/jakarta-turbine-3/Attic/gump.xml"/>
<module
href="http://cvs.apache.org/viewcvs/~checkout~/jakarta-turbine-fulcrum/gump.xml"/>
<module
href="http://cvs.apache.org/viewcvs/~checkout~/jakarta-turbine-jcs/gump.xml"/>
- <module
href="http://cvs.apache.org/viewcvs/~checkout~/jakarta-turbine-stratum/gump.xml"/>
+ <!-- <module
href="http://cvs.apache.org/viewcvs/~checkout~/jakarta-turbine-stratum/gump.xml"/
-->
+ <module href="project/jakarta-turbine-stratum.xml"/>
<module
href="http://cvs.apache.org/viewcvs/~checkout~/jakarta-turbine-torque/gump.xml"/>
<!-- Turbine projects not fully mavenized -->
Index: project/checkstyle.xml
===================================================================
RCS file:
/home/cvs/jakarta-alexandria/proposal/gump/project/checkstyle.xml,v
retrieving revision 1.13
diff -u -r1.13 checkstyle.xml
--- project/checkstyle.xml 26 Sep 2002 06:14:38 -0000 1.13
+++ project/checkstyle.xml 10 Oct 2002 03:13:32 -0000
@@ -11,7 +11,8 @@
<package>com.puppycrawl.tools.checkstyle</package>
<mkdir dir="target/checkstyle"/>
- <ant target="gump">
+ <ant target="build.bindist">
+ <property name="todo.pattern" value="NOTHingWillMatCH_-"/>
<property name="version" value="@@DATE@@"/>
</ant>
Index: stylesheet/bash.xsl
===================================================================
RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/bash.xsl,v
retrieving revision 1.81
diff -u -r1.81 bash.xsl
--- stylesheet/bash.xsl 24 Jul 2002 11:34:37 -0000 1.81
+++ stylesheet/bash.xsl 10 Oct 2002 03:13:34 -0000
@@ -58,6 +58,7 @@
<xsl:template match="build">
<xsl:text>#!/bin/bash </xsl:text>
+ <xsl:text>if [ -f gump_local.sh ] ; then source gump_local.sh ; fi
</xsl:text>
<xsl:text>export SCORECARD_FILE="</xsl:text><xsl:value-of
select="scorecard/@file"/><xsl:text>" </xsl:text>
<xsl:text>export SCORECARD=">>$SCORECARD_FILE" </xsl:text>
<xsl:text>rm -f $SCORECARD_FILE </xsl:text>
@@ -423,13 +424,67 @@
<xsl:text>`cygpath --path --windows "$CLASSPATH"` </xsl:text>
</xsl:if>
+ <!-- Display the executed command and params -->
+ <xsl:text>eval "pwd $OUT 2>&1" </xsl:text>
+ <xsl:text>eval "echo CLASSPATH=$CLASSPATH </dev/null $OUT
2>&1" </xsl:text>
+
+ <xsl:text>eval "echo </xsl:text>
+ <xsl:text>java </xsl:text>
+
+ <xsl:if test="bootclass">
+ <xsl:text> -Xbootclasspath/p:</xsl:text>
+ <xsl:for-each select="bootclass">
+ <xsl:if test="position()!=1">
+ <xsl:text>:</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="translate(@location,'\','/')"/>
+ </xsl:for-each>
+ </xsl:if>
+
+ <xsl:text> </xsl:text><xsl:value-of select="$ant-cmd"/>
+
+ <xsl:text> $GUMP_ANT_OPTS</xsl:text>
+
+ <xsl:if test="@buildfile">
+ <xsl:text> -f </xsl:text>
+ <xsl:value-of select="translate(@buildfile,'\','/')"/>
+ </xsl:if>
+
+ <xsl:for-each select="property">
+ <xsl:text> -D</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>=</xsl:text>
+ <xsl:choose>
+ <xsl:when test="@type = 'path' and $cygwin = 1">
+ <xsl:text>'`cygpath --path --windows "</xsl:text>
+ <xsl:value-of select="@value"/>
+ <xsl:text>"`'</xsl:text>
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="@value"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+
+ <xsl:choose>
+ <xsl:when test="count(../ant)=1">
+ <xsl:text> $TARGET</xsl:text>
+ </xsl:when>
+ <xsl:when test="@target">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@target"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:text> </dev/null $OUT 2>&1" </xsl:text>
+
+ <!-- Do the real thing -->
+
<xsl:text>eval </xsl:text>
<xsl:if test="$cmd-prefix">
<xsl:text>"</xsl:text>
<xsl:value-of select="$cmd-prefix"/>
<xsl:text>" </xsl:text>
</xsl:if>
- <xsl:text>"java</xsl:text>
+ <xsl:text>"java </xsl:text>
<xsl:if test="bootclass">
<xsl:text> -Xbootclasspath/p:</xsl:text>
Index: stylesheet/update.xsl
===================================================================
RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/update.xsl,v
retrieving revision 1.18
diff -u -r1.18 update.xsl
--- stylesheet/update.xsl 24 Jul 2002 11:34:37 -0000 1.18
+++ stylesheet/update.xsl 10 Oct 2002 03:13:34 -0000
@@ -1,4 +1,5 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+ <xsl:output method="XML" indent="yes" />
<xsl:variable name="basedir" select="/workspace/@basedir"/>
<xsl:variable name="logdir" select="/workspace/@logdir"/>
--
Costin
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>