You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2004/05/23 19:52:58 UTC
svn commit: rev 20267 - avalon/trunk/tools/project/src/main/org/apache/avalon/tools/home
Author: mcconnell
Date: Sun May 23 10:52:58 2004
New Revision: 20267
Modified:
avalon/trunk/tools/project/src/main/org/apache/avalon/tools/home/Repository.java
Log:
Modified: avalon/trunk/tools/project/src/main/org/apache/avalon/tools/home/Repository.java
==============================================================================
--- avalon/trunk/tools/project/src/main/org/apache/avalon/tools/home/Repository.java (original)
+++ avalon/trunk/tools/project/src/main/org/apache/avalon/tools/home/Repository.java Sun May 23 10:52:58 2004
@@ -94,6 +94,12 @@
public Path createPath( Project project, Definition def )
throws BuildException
{
+ return createPath( project, def, false );
+ }
+
+ public Path createPath( Project project, Definition def, boolean flag )
+ throws BuildException
+ {
Path path = new Path( project );
//
@@ -145,7 +151,7 @@
{
ProjectRef ref = projects[i];
Definition defintion = m_home.getDefinition( ref );
- Path projectPath = createPath( project, defintion );
+ Path projectPath = createPath( project, defintion, true );
File file = new File( getCacheDirectory(), defintion.getInfo().getPath() );
if( file.exists() )
{
@@ -162,6 +168,22 @@
"Cannot construct a valid path for the project "
+ def + " because the dependent project "
+ defintion + " has not installed an artifact.";
+ throw new BuildException( error );
+ }
+ }
+
+ if( flag )
+ {
+ File file = new File( getCacheDirectory(), def.getInfo().getPath() );
+ if( file.exists() )
+ {
+ path.createPathElement().setLocation( file );
+ }
+ else
+ {
+ final String error =
+ "Cannot construct a valid path for the project "
+ + def + " because the project has not installed an artifact.";
throw new BuildException( error );
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org