jvanzyl 2002/11/24 15:58:44
Modified: src/java/org/apache/maven/jelly/tags/project
DependencyResolver.java MavenTag.java
Log:
o fixing checkstyle violations.
Revision Changes Path
1.4 +59 -4
jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/DependencyResolver.java
Index: DependencyResolver.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/DependencyResolver.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DependencyResolver.java 24 Nov 2002 19:00:38 -0000 1.3
+++ DependencyResolver.java 24 Nov 2002 23:58:44 -0000 1.4
@@ -65,17 +65,31 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-
+/**
+ * Takes a list of maven projects and determines the overall
+ * dependency ordering among the project.
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
+ *
+ * @version $Id$
+ */
public class DependencyResolver
{
- /**
- * Dependency graph
- */
+ /** The dependency graph. */
private DependencyGraph dependencyGraph;
+
+ /** List of maven projects to analyse. */
private List projects;
+
+ /** Project dependencies. */
private HashMap projectDeps;
+
+ /** Flag to indicate whether the graph has been built. */
private boolean graphBuilt;
+ /**
+ * Default constructor.
+ */
public DependencyResolver()
{
dependencyGraph = new DependencyGraph();
@@ -84,6 +98,9 @@
graphBuilt = false;
}
+ /**
+ * Clear the project list and set the graph built flag to false.
+ */
public void clear()
{
graphBuilt = false;
@@ -93,23 +110,45 @@
/**
* These are the fully populated projects that
* are being fed into the reactor.
+ *
+ * @param project Project to add to the list.
*/
public void addProject( Project project )
{
projects.add( project );
}
+ /**
+ * Set a list of projects to process.
+ *
+ * @param projects List of projects.
+ */
public void setProjects( List projects )
{
this.projects = projects;
}
+ /**
+ * Get the list of projects in dependency sorted order.
+ *
+ * @param project The project to use as the head of the graph.
+ * @return The list of projects.
+ * @throws Exception If an error occurs while processing the graph.
+ */
public List getSortedDependencies( Project project )
throws Exception
{
return getSortedDependencies( project, false );
}
+ /**
+ * Get the list of projects in dependency sorted order.
+ *
+ * @param project The project to use as the head of the graph.
+ * @param sourceBuild Indicate we are performing a source build.
+ * @return The list of projects.
+ * @throws Exception If an error occurs while processing the graph.
+ */
public List getSortedDependencies( Project project, boolean sourceBuild )
throws Exception
{
@@ -124,6 +163,13 @@
return getBinaryDependencies( sortedDependencies );
}
+ /**
+ * Get the list of projects in dependency sorted order.
+ *
+ * @param sourceBuild Flag to indicate we are performing a source build.
+ * @return The list of projects.
+ * @throws Exception If an error occurs while processing the graph.
+ */
public List getSortedDependencies( boolean sourceBuild )
throws Exception
{
@@ -139,6 +185,12 @@
return getBinaryDependencies( sortedDependencies );
}
+ /**
+ * Get dependency graph for a build based on binary inputs.
+ *
+ * @param sortedDependencies List of projects that have been dependency sorted.
+ * @return The list of projects.
+ */
private List getBinaryDependencies( List sortedDependencies )
{
HashMap idMap = new HashMap();
@@ -163,6 +215,9 @@
return binaryDeps;
}
+ /**
+ * Build the dependency graph.
+ */
private void buildGraph()
{
if ( graphBuilt )
1.16 +14 -4
jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/MavenTag.java
Index: MavenTag.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/project/MavenTag.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- MavenTag.java 24 Nov 2002 19:00:38 -0000 1.15
+++ MavenTag.java 24 Nov 2002 23:58:44 -0000 1.16
@@ -141,7 +141,7 @@
* the 'parent' maven
*
* @param output used to output XML to Jelly
- * @param parent the maven project that is currently executing
+ * @param project Maven project.
* @throws Exception when any error occurs
*/
protected Maven getMaven( XMLOutput output, Project project )
@@ -235,15 +235,20 @@
}
/**
- * Setter for the ignoreFailures property
+ * Set the ignore failures flag.
*
- * @param ignore whether exceptions should be silently ignored
+ * @param ignoreFailures The ignore failures flag.
*/
public void setIgnoreFailures( boolean ignoreFailures )
{
this.ignoreFailures = ignoreFailures;
}
+ /**
+ * Get the ignore failures flag.
+ *
+ * @return boolean The ignores failure flag.
+ */
public boolean getIgnoreFailures()
{
return ignoreFailures;
@@ -253,6 +258,11 @@
// I N S T A N C E M E T H O D S
// ------------------------------------------------------------
+ /**
+ * Add goals to the maven project.
+ *
+ * @param maven The maven project to add the goals to.
+ */
protected void addGoals( Maven maven )
{
if ( goals != null )
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>