You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by da...@apache.org on 2007/04/09 22:51:00 UTC

svn commit: r526909 - /incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java

Author: dashorst
Date: Mon Apr  9 13:50:55 2007
New Revision: 526909

URL: http://svn.apache.org/viewvc?view=rev&rev=526909
Log:
Fixed running license tests from root project

Modified:
    incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java

Modified: incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java?view=diff&rev=526909&r1=526908&r2=526909
==============================================================================
--- incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java (original)
+++ incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java Mon Apr  9 13:50:55 2007
@@ -189,6 +189,20 @@
 	}
 
 	/**
+	 * 
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	public final void setUp() 
+	{
+		// setup the base directory for when running inside maven (building a release
+		// comes to mind).
+		String property = System.getProperty("basedir");
+		if(!Strings.isEmpty(property))
+		{
+			baseDirectory = new File(property).getAbsoluteFile();
+		}
+	}
+	/**
 	 * Test all the files in the project which has an associated
 	 * {@link ILicenseHeaderHandler}.
 	 */