[jboss-cvs] jbossbuild/src/main/org/jboss/ant/tasks/build ...
Ruel Loehr
ruel.loehr at jboss.com
Tue Aug 1 12:57:40 EDT 2006
User: rloehr
Date: 06/08/01 12:57:40
Modified: src/main/org/jboss/ant/tasks/build Tag: BRANCH_JBBUILD_DEV
SynchronizeComponentsTask.java
Log:
add fix for case where compatibilities overwrite component-info.xml file of defined version
Revision Changes Path
No revision
No revision
1.9.2.2 +32 -5 jbossbuild/src/main/org/jboss/ant/tasks/build/SynchronizeComponentsTask.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SynchronizeComponentsTask.java
===================================================================
RCS file: /cvsroot/jboss/jbossbuild/src/main/org/jboss/ant/tasks/build/SynchronizeComponentsTask.java,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -u -b -r1.9.2.1 -r1.9.2.2
--- SynchronizeComponentsTask.java 25 Jul 2006 16:36:45 -0000 1.9.2.1
+++ SynchronizeComponentsTask.java 1 Aug 2006 16:57:40 -0000 1.9.2.2
@@ -34,7 +34,7 @@
* Task to synchronize third party dependencies.
*
* @author <a href="ruel.loehr at jboss.com">Ruel Loehr </a>
- * @version $Revision: 1.9.2.1 $
+ * @version $Revision: 1.9.2.2 $
*/
public class SynchronizeComponentsTask extends BuildTask
{
@@ -103,7 +103,7 @@
//clear the markings of the graph vertexes-must clear before new traversal
componentGraph.clearMark();
- //visit the tree and compile list of any unresolved nodes
+ //visit the tree and compile list of any nodes which have not yet had a component created for them
componentGraph.breadthFirstSearch(componentGraph.getVertex(0), childResolver);
//import any unresolved componenents
@@ -269,10 +269,37 @@
}
//download the file from the repository
+
+ //if the component ref is a compatibility
+ if (currentComponentRef.getCompatibleVersions() != null)
+ {
+ if (!currentComponentRef.getCompatibleVersions().isEmpty() && filename.exists())
+ {
+ super.log("We are attempting to download dependencies, for a compatible. A component-info.xml " +
+ "already exists for this item " +
+ "We will not download this file",
+ Project.MSG_DEBUG);
+ currentComponentRef.setFileResolved(true);
+ }
+ else
+ {
+ if (!currentComponentRef.getCompatibleVersions().isEmpty() && !filename.exists())
+ {
+ super.log("We are attempting to download dependencies, for a compatible. A component-info.xml " +
+ "does not yet exist for this item ",
+ Project.MSG_DEBUG);
File downloadedFile = DownloadUtil.getFile(filename, repositoryFile, this.getProject());
currentComponentRef.setFileResolved(true);
}
+ }
+ }
+ else
+ {
+ File downloadedFile = DownloadUtil.getFile(filename, repositoryFile, this.getProject());
+ currentComponentRef.setFileResolved(true);
+ }
+ }
}
More information about the jboss-cvs-commits
mailing list