incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: rev 20484 - in incubator/depot/trunk/update: . src/java/org/apache/depot/update/ant/cache src/java/org/apache/depot/update/ant/tool src/test/org/apache/depot/update/ant/sync src/test/org/apache/depot/update/ant/tool
Date Wed, 26 May 2004 15:18:06 GMT
Author: ajack
Date: Wed May 26 08:18:05 2004
New Revision: 20484

Added:
   incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/tool/
   incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/tool/RepositoryToolTaskTests.java
   incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/tool/repotool.xml
Removed:
   incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/sync/
Modified:
   incubator/depot/trunk/update/build.xml
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedResourceSet.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/tool/EnvironmentToolTask.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/tool/RepositoryToolTask.java
Log:
SVN commandline and Eclipse (refactoring) just don't play nice!


Modified: incubator/depot/trunk/update/build.xml
==============================================================================
--- incubator/depot/trunk/update/build.xml	(original)
+++ incubator/depot/trunk/update/build.xml	Wed May 26 08:18:05 2004
@@ -68,7 +68,7 @@
 	<path id="depot-update.classpath">
 		<fileset refid="depot-update.dependent.jars.fileset" />
 		<fileset dir=".">
-			<!-- put the latest  depot common and depot-version here -->
+			<!-- put the latest depot common and depot-version here -->
 			<include name="lib/*.jar" />
 		</fileset>
 	</path>
@@ -82,8 +82,6 @@
 		</not>
 	</selector>
 
-
-
 	<target name="all" depends="dist" />
 	<target name="compile"
 	        depends="-init-path,version-stamp,java.antlet.compile"
@@ -91,7 +89,6 @@
 	<target name="-init-path" depends="get-all">
 
 	</target>
-
 
 	<target name="gump" depends="compile,dist-jar">
 		<move file="${dist.dir}/${project.name}-${project.version}.jar"

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedResourceSet.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedResourceSet.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedResourceSet.java
Wed May 26 08:18:05 2004
@@ -22,6 +22,8 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.depot.common.ant.util.AntLogListener;
+import org.apache.depot.common.log.Logger;
 import org.apache.depot.update.ResourceUpdater;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.ant.AntUtils;
@@ -85,10 +87,20 @@
 	/**
 	 * @return
 	 */
-	FileScanner getFileScanner() throws UpdateException {
+	FileScanner getFileScanner() throws UpdateException {		
 		final DirectoryScanner scanner = new DirectoryScanner();
-		scanner.setBasedir(getRepoDir());
-		addResources(scanner);
+		
+		// Set logging context..
+		Logger logger = Logger.pushContext(new AntLogListener(this));
+
+		try {			
+			scanner.setBasedir(getRepoDir());
+			addResources(scanner);
+		}
+		finally {
+			Logger.popContext(logger);
+		}
+		
 		return scanner;
 	}
 	/**

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/tool/EnvironmentToolTask.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/tool/EnvironmentToolTask.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/tool/EnvironmentToolTask.java
Wed May 26 08:18:05 2004
@@ -19,7 +19,7 @@
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.common.util.envsafe.ClassLoaderContext;
 import org.apache.depot.update.protocols.DefaultProtocolOperationsManager;
-import org.apache.depot.version.ant.util.AntLogListener;
+import org.apache.depot.common.ant.util.AntLogListener;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Task;

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/tool/RepositoryToolTask.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/tool/RepositoryToolTask.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/tool/RepositoryToolTask.java
Wed May 26 08:18:05 2004
@@ -33,7 +33,7 @@
 import org.apache.depot.update.resource.ResourceSpecifier;
 import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.select.AllSelector;
-import org.apache.depot.version.ant.util.AntLogListener;
+import org.apache.depot.common.ant.util.AntLogListener;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Task;

Added: incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/tool/RepositoryToolTaskTests.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/tool/RepositoryToolTaskTests.java
Wed May 26 08:18:05 2004
@@ -0,0 +1,51 @@
+/*
+ * Copyright  2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.depot.update.ant.tool;
+
+import org.apache.tools.ant.BuildFileTest;
+
+/**
+ * 
+ * @author $Author: arb_jack $
+ * @version $Revision: 1.1 $
+ */
+public class RepositoryToolTaskTests extends BuildFileTest {
+
+	/**
+	 * Constructor for RuperDependTaskTest.
+	 * @param arg0
+	 */
+	public RepositoryToolTaskTests(String arg0) {
+		super(arg0);
+	}
+
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(RepositoryToolTaskTests.class);
+	}
+
+	public void setUp() {
+		configureProject("src/test/org/apache/depot/update/ant/tool/repotool.xml");
+	}
+
+	public void test1() {
+		executeTarget("test1");
+	}
+
+	public void test2() {
+		executeTarget("test2");
+	}
+}

Added: incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/tool/repotool.xml
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/ant/tool/repotool.xml	Wed
May 26 08:18:05 2004
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<project name="ruper-repotool-test" basedir="." default="all">
+	<taskdef resource="depot-update-antlib.xml"/>	
+		
+	<target name="test1">
+		<repotool />
+	</target>
+	
+	<target name="test2">
+		<repotool group="test"/>
+	</target>
+	
+	<target name="all" depends="test1,test2" />
+</project>

Mime
View raw message