conor 01/02/13 04:34:22
Modified: src/antidote/org/apache/tools/ant/gui/modules Tag:
ANT_13_BRANCH TargetMonitor.java
src/antidote/org/apache/tools/ant/gui/modules/console Tag:
ANT_13_BRANCH BuildConsole.java
src/main/org/apache/tools/ant/taskdefs Tag: ANT_13_BRANCH
Tar.java
src/main/org/apache/tools/ant/taskdefs/optional Tag:
ANT_13_BRANCH Test.java
webpage Tag: ANT_13_BRANCH build.xml
webpage/docs Tag: ANT_13_BRANCH index.html
webpage/xdocs/stylesheets Tag: ANT_13_BRANCH project.xml
Log:
Merge of changes on main branch to the 1.3 branch
Revision Changes Path
No revision
No revision
1.3.2.1 +8 -4
jakarta-ant/src/antidote/org/apache/tools/ant/gui/modules/TargetMonitor.java
Index: TargetMonitor.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/modules/TargetMonitor.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- TargetMonitor.java 2001/01/08 19:43:46 1.3
+++ TargetMonitor.java 2001/02/13 12:34:20 1.3.2.1
@@ -68,7 +68,7 @@
/**
* A widget for displaying the currently selected targets.
*
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.3.2.1 $
* @author Simeon Fitch
*/
public class TargetMonitor extends AntModule {
@@ -144,13 +144,17 @@
if(selected != null && selected.length > 0) {
StringBuffer buf = new StringBuffer();
+ String name = null;
for(int i = 0; i < selected.length; i++) {
if(selected[i] instanceof ACSTargetElement) {
- if(buf.length() > 0) {
- buf.append(", ");
+ name = ((ACSTargetElement)selected[i]).getName();
+ if( buf.toString().indexOf( name ) < 0 ) {
+ if(buf.length() > 0) {
+ buf.append(", ");
+ }
+ buf.append( name );
}
-
buf.append(((ACSTargetElement)selected[i]).getName());
}
}
No revision
No revision
1.4.2.1 +37 -18
jakarta-ant/src/antidote/org/apache/tools/ant/gui/modules/console/BuildConsole.java
Index: BuildConsole.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/modules/console/BuildConsole.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- BuildConsole.java 2001/01/08 19:43:50 1.4
+++ BuildConsole.java 2001/02/13 12:34:20 1.4.2.1
@@ -64,11 +64,12 @@
import java.awt.Dimension;
import java.awt.Color;
import java.util.EventObject;
+import java.util.Date;
/**
* Logging console display.
*
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.4.2.1 $
* @author Simeon Fitch
*/
public class BuildConsole extends AntModule {
@@ -78,6 +79,8 @@
private JComboBox _logLevel = null;
/** Display styles. */
private ConsoleStyleContext _styles = null;
+ /** ClearLog Button. */
+ private JButton _clearLog = null;
/**
* Default ctor.
@@ -112,11 +115,33 @@
_logLevel.setSelectedItem(LogLevelEnum.INFO);
controls.add(_logLevel);
+ // Padding.
+ controls.add(Box.createHorizontalStrut(10));
+ _clearLog = new JButton(
+ context.getResources().getString(
+ getClass(), "clearLog"));
+ _clearLog.addActionListener(new ActionHandler());
+ controls.add(_clearLog);
+
add(BorderLayout.NORTH, controls);
}
+ /**
+ * Clear the contents of the console.
+ *
+ */
+ private void clearDisplay() {
+ Document doc = _text.getDocument();
+ try {
+ doc.remove(0, doc.getLength());
+ }
+ catch(Exception ex) {
+ // Intentionally ignored.
+ }
+ }
+
/** Class for handling project events. */
private class Handler implements BusMember {
private final Filter _filter = new Filter();
@@ -132,20 +157,6 @@
}
/**
- * Clear the contents of the console.
- *
- */
- private void clearDisplay() {
- Document doc = _text.getDocument();
- try {
- doc.remove(0, doc.getLength());
- }
- catch(Exception ex) {
- // Intentionally ignored.
- }
- }
-
- /**
* Called when an event is to be posed to the member.
*
* @param event Event to post.
@@ -154,7 +165,6 @@
*/
public boolean eventPosted(EventObject event) {
if(event instanceof ProjectSelectedEvent) {
- clearDisplay();
return true;
}
@@ -164,9 +174,10 @@
switch(buildEvent.getType().getValue()) {
case BuildEventType.BUILD_STARTED_VAL:
- clearDisplay();
+
case BuildEventType.BUILD_FINISHED_VAL:
- text = buildEvent.getType().toString();
+ text = buildEvent.getType().toString() +
+ " (" + new Date().toString() + ")";
style = _styles.getHeadingStyle();
break;
case BuildEventType.TARGET_STARTED_VAL:
@@ -205,6 +216,14 @@
return true;
}
}
+
+ /** Handles press of the ClearLog button. */
+ private class ActionHandler implements java.awt.event.ActionListener {
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ if (e.getSource() == _clearLog) clearDisplay();
+ }
+ }
+
/** Class providing filtering for project events. */
private static class Filter implements BusFilter {
/**
No revision
No revision
1.10.2.3 +25 -12
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java
Index: Tar.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -u -r1.10.2.2 -r1.10.2.3
--- Tar.java 2001/02/11 09:21:45 1.10.2.2
+++ Tar.java 2001/02/13 12:34:20 1.10.2.3
@@ -70,13 +70,16 @@
public class Tar extends MatchingTask {
+ // permissable values for longfile attribute
+ static public final String WARN = "warn";
+ static public final String FAIL = "fail";
static public final String TRUNCATE = "truncate";
static public final String GNU = "gnu";
File tarFile;
File baseDir;
- String longFileMode = null;
+ String longFileMode = WARN;
Vector filesets = new Vector();
Vector fileSetFiles = new Vector();
@@ -107,10 +110,12 @@
*
* Allowable values are
* truncate
+ * fail
+ * warn
* gnu
*/
- public void setLongfile(String method) {
- this.longFileMode = method;
+ public void setLongfile(String mode) {
+ this.longFileMode = mode;
}
public void execute() throws BuildException {
@@ -166,15 +171,7 @@
try {
tOut = new TarOutputStream(new FileOutputStream(tarFile));
tOut.setDebug(true);
- if (longFileMode == null) {
- tOut.setLongFileMode(TarOutputStream.LONGFILE_ERROR);
- }
- else if (longFileMode.equalsIgnoreCase(TRUNCATE)) {
- tOut.setLongFileMode(TarOutputStream.LONGFILE_TRUNCATE);
- }
- else if (longFileMode.equalsIgnoreCase(GNU)) {
- tOut.setLongFileMode(TarOutputStream.LONGFILE_GNU);
- }
+ tOut.setLongFileMode(TarOutputStream.LONGFILE_GNU);
for (Enumeration e = filesets.elements(); e.hasMoreElements();) {
TarFileSet fs = (TarFileSet)e.nextElement();
@@ -206,6 +203,22 @@
FileInputStream fIn = new FileInputStream(file);
try {
+ if (vPath.length() >= TarConstants.NAMELEN) {
+ if (longFileMode.equalsIgnoreCase(TRUNCATE)) {
+ log("Skipping: "+ vPath, Project.MSG_INFO);
+ return;
+ } else if (longFileMode.equalsIgnoreCase(WARN)) {
+ log("Entry: "+ vPath + " longer than " +
+ TarConstants.NAMELEN + " characters.",
Project.MSG_WARN);
+ log("Resulting tar file can only be processed
successfully"
+ + " by GNU compatible tar commands",
Project.MSG_WARN);
+ } else if (longFileMode.equalsIgnoreCase(FAIL)) {
+ throw new BuildException(
+ "Entry: "+ vPath + " longer than " +
+ TarConstants.NAMELEN + "characters.", location);
+ }
+ }
+
TarEntry te = new TarEntry(vPath);
te.setSize(file.length());
te.setModTime(file.lastModified());
No revision
No revision
1.3.2.1 +2 -2
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Test.java
Index: Test.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Test.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- Test.java 2001/01/03 14:18:35 1.3
+++ Test.java 2001/02/13 12:34:21 1.3.2.1
@@ -97,11 +97,11 @@
createArg().setValue( "-b=" + showBanner );
}
- public void setShowTrace( final String showTrace ) {
+ public void setShowTrace( final boolean showTrace ) {
createArg().setValue( "-t=" + showTrace );
}
- public void setForceShowTrace( final String forceShowTrace ) {
+ public void setForceShowTrace( final boolean forceShowTrace ) {
createArg().setValue( "-f=" + forceShowTrace );
}
No revision
No revision
1.1.2.1 +13 -2 jakarta-ant/webpage/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/webpage/build.xml,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- build.xml 2001/02/05 12:28:52 1.1
+++ build.xml 2001/02/13 12:34:21 1.1.2.1
@@ -5,9 +5,17 @@
<property name="docs.src" value="./xdocs"/>
<property name="docs.dest" value="./docs"/>
+ <path id="anakia.classpath">
+ <fileset dir="../../jakarta-site2/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
<target name="prepare">
<available classname="org.apache.velocity.anakia.AnakiaTask"
- property="AnakiaTask.present"/>
+ property="AnakiaTask.present">
+ <classpath refid="anakia.classpath"/>
+ </available>
</target>
<target depends="prepare" name="prepare-error"
unless="AnakiaTask.present">
@@ -18,7 +26,10 @@
</target>
<target name="docs" depends="prepare-error" if="AnakiaTask.present">
- <taskdef name="anakia"
classname="org.apache.velocity.anakia.AnakiaTask"/>
+ <taskdef name="anakia"
classname="org.apache.velocity.anakia.AnakiaTask">
+ <classpath refid="anakia.classpath"/>
+ </taskdef>
+
<anakia basedir="${docs.src}" destdir="${docs.dest}/"
extension=".html" style="./site.vsl"
projectFile="stylesheets/project.xml"
No revision
No revision
1.1.2.1 +11 -13 jakarta-ant/webpage/docs/index.html
Index: index.html
===================================================================
RCS file: /home/cvs/jakarta-ant/webpage/docs/index.html,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- index.html 2001/02/05 12:28:54 1.1
+++ index.html 2001/02/13 12:34:21 1.1.2.1
@@ -67,29 +67,27 @@
<li> <a
href="http://jakarta.apache.org/site/bugs.html">Bug Database</a>
</li>
</ul>
- <strong>SubProjects</strong>
+ <strong>Other Projects</strong>
<ul>
- <li> <a href="./ant/index.html">Ant</a>
+ <li> <a
href="http://jakarta.apache.org/ecs/index.html">ECS</a>
</li>
- <li> <a href="./ecs/index.html">ECS</a>
+ <li> <a
href="http://jakarta.apache.org/log4j/doc/index.html">Log4J</a>
</li>
- <li> <a href="./log4j/index.html">Log4J</a>
+ <li> <a
href="http://jakarta.apache.org/oro/index.html">ORO</a>
</li>
- <li> <a href="./oro/index.html">ORO</a>
+ <li> <a
href="http://jakarta.apache.org/regexp/index.html">Regexp</a>
</li>
- <li> <a href="./regexp/index.html">Regexp</a>
+ <li> <a
href="http://jakarta.apache.org/slide/index.html">Slide</a>
</li>
- <li> <a href="./slide/index.html">Slide</a>
+ <li> <a
href="http://jakarta.apache.org/struts/index.html">Struts</a>
</li>
- <li> <a href="./struts/index.html">Struts</a>
+ <li> <a
href="http://jakarta.apache.org/taglibs/index.html">Taglibs</a>
</li>
- <li> <a href="./taglibs/index.html">Taglibs</a>
+ <li> <a
href="http://jakarta.apache.org/tomcat/index.html">Tomcat</a>
</li>
- <li> <a href="./tomcat/index.html">Tomcat</a>
+ <li> <a
href="http://jakarta.apache.org/velocity/index.html">Velocity</a>
</li>
- <li> <a href="./velocity/index.html">Velocity</a>
-</li>
- <li> <a href="./watchdog/index.html">Watchdog</a>
+ <li> <a
href="http://jakarta.apache.org/watchdog/index.html">Watchdog</a>
</li>
</ul>
<strong>Misc</strong>
No revision
No revision
1.1.2.1 +24 -14 jakarta-ant/webpage/xdocs/stylesheets/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/jakarta-ant/webpage/xdocs/stylesheets/project.xml,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- project.xml 2001/02/05 12:28:58 1.1
+++ project.xml 2001/02/13 12:34:22 1.1.2.1
@@ -29,20 +29,30 @@
<item name="Bug Database" href="/site/bugs.html"/>
</menu>
- <menu name="SubProjects">
- <item name="Ant" href="/ant/index.html"/>
-<!-- <item name="Avalon" href="/avalon/index.html"/> -->
- <item name="ECS" href="/ecs/index.html"/>
- <item name="Log4J" href="/log4j/index.html"/>
- <item name="ORO" href="/oro/index.html"/>
- <item name="Regexp" href="/regexp/index.html"/>
- <item name="Slide" href="/slide/index.html"/>
- <item name="Struts" href="/struts/index.html"/>
- <item name="Taglibs" href="/taglibs/index.html"/>
- <item name="Tomcat" href="/tomcat/index.html"/>
- <item name="Velocity" href="/velocity/index.html"/>
- <item name="Watchdog" href="/watchdog/index.html"/>
- </menu>
+ <menu name="Other Projects">
+<!-- <item name="Avalon"
+ href="http://jakarta.apache.org/avalon/index.html"/> -->
+ <item name="ECS"
+ href="http://jakarta.apache.org/ecs/index.html"/>
+ <item name="Log4J"
+ href="http://jakarta.apache.org/log4j/doc/index.html"/>
+ <item name="ORO"
+ href="http://jakarta.apache.org/oro/index.html"/>
+ <item name="Regexp"
+ href="http://jakarta.apache.org/regexp/index.html"/>
+ <item name="Slide"
+ href="http://jakarta.apache.org/slide/index.html"/>
+ <item name="Struts"
+ href="http://jakarta.apache.org/struts/index.html"/>
+ <item name="Taglibs"
+ href="http://jakarta.apache.org/taglibs/index.html"/>
+ <item name="Tomcat"
+ href="http://jakarta.apache.org/tomcat/index.html"/>
+ <item name="Velocity"
+ href="http://jakarta.apache.org/velocity/index.html"/>
+ <item name="Watchdog"
+ href="http://jakarta.apache.org/watchdog/index.html"/>
+ </menu>
<menu name="Misc">
<item name="Who We Are" href="/site/whoweare.html"/>