You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ni...@apache.org on 2004/08/19 19:52:12 UTC
svn commit: rev 36617 - avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks
Author: niclas
Date: Thu Aug 19 10:52:11 2004
New Revision: 36617
Modified:
avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/HomeTask.java
Log:
Added check that the project dir correspond with current dir.
Modified: avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/HomeTask.java
==============================================================================
--- avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/HomeTask.java (original)
+++ avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/HomeTask.java Thu Aug 19 10:52:11 2004
@@ -17,6 +17,7 @@
package org.apache.avalon.tools.tasks;
+import org.apache.avalon.tools.model.Context;
import org.apache.avalon.tools.model.Definition;
import org.apache.avalon.tools.model.Info;
import org.apache.avalon.tools.model.Home;
@@ -115,10 +116,17 @@
private void verifyBaseDir( Definition def )
throws BuildException
{
- String defBase = def.getBaseDir().getAbsolutePath();
- String projBase = getProject().getBaseDir().getAbsolutePath();
+ String defBase = Context.getCanonicalPath( def.getBaseDir() );
+ String projBase = Context.getCanonicalPath( getProject().getBaseDir() );
if( defBase.equals( projBase ) )
return;
- throw new BuildException( "The basedir in the Magic Index file, does not correspond with the current working directory. Most probably, you have the wrong project name in the build.xml file." );
+ throw new BuildException(
+ "The basedir ["
+ + defBase
+ + "] declared in the project index for the key ["
+ + def.getKey()
+ + "] does not correspond with the current working directory ["
+ + projBase
+ + "]. Most probably, you have the wrong project name in the build.xml file." );
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org