You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2003/04/15 15:31:49 UTC
cvs commit: maven-core/src/java/org/apache/maven/verifier DefaultDependencyVerifier.java DependencyVerifier.java
jvanzyl 2003/04/15 06:31:49
Modified: src/java/org/apache/maven/verifier
DefaultDependencyVerifier.java
DependencyVerifier.java
Log:
o Pete noticed some yucky constructs in the contract for the verifier so
I added a configuration phase to the default verifier and allow one to
configure the set flags for the ignoring of errors and the verification
of artifacts using the currently disabled checksum stuff.
Revision Changes Path
1.2 +25 -20 maven-core/src/java/org/apache/maven/verifier/DefaultDependencyVerifier.java
Index: DefaultDependencyVerifier.java
===================================================================
RCS file: /home/cvs/maven-core/src/java/org/apache/maven/verifier/DefaultDependencyVerifier.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultDependencyVerifier.java 15 Apr 2003 01:16:45 -0000 1.1
+++ DefaultDependencyVerifier.java 15 Apr 2003 13:31:49 -0000 1.2
@@ -69,6 +69,10 @@
import java.util.Iterator;
import java.util.List;
+import org.apache.avalon.framework.configuration.Configurable;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+
/**
* Make sure that everything that is required for the project to build
* successfully is present. We will start by looking at the dependencies
@@ -90,13 +94,16 @@
*/
public class DefaultDependencyVerifier
extends AbstractLogEnabled
- implements DependencyVerifier
+ implements Configurable, DependencyVerifier
{
/** Control the use of timestamp comparison when downloading missing resources. */
private boolean useTimestamp = true;
/** Control continuation upon errors during the downloading of missing resources. */
- private boolean ignoreErrors = true;
+ private boolean ignoreErrors;;
+
+ /** Control verification of dependencies. */
+ private boolean verifyDependencies;
/** List of failed deps. */
private List failedDependencies;
@@ -107,6 +114,17 @@
failedDependencies = new ArrayList();
}
+ // ----------------------------------------------------------------------
+ // Lifecylce Management
+ // ----------------------------------------------------------------------
+
+ public void configure( Configuration configuration )
+ throws ConfigurationException
+ {
+ ignoreErrors = configuration.getChild( "ignoreErrors" ).getValueAsBoolean( true );
+ verifyDependencies = configuration.getChild( "verifyDependencies" ).getValueAsBoolean( false );
+ }
+
/**
* Execute the verification process.
*
@@ -120,7 +138,11 @@
{
satisfyDependencies( project );
- //verifyDependencies();
+
+ if ( verifyDependencies )
+ {
+ verifyDependencies( project );
+ }
}
/**
@@ -369,22 +391,5 @@
Artifact artifact = (Artifact) i.next();
artifact.verify();
}
- }
-
- /**
- * @return true if the ignore errors flag is set.
- */
- public boolean isIgnoreErrors()
- {
- return ignoreErrors;
- }
-
- /**
- * Sets the ignoreErrors flag.
- * @param ignoreErrors The ignoreErrors to set
- */
- public void setIgnoreErrors( boolean ignoreErrors )
- {
- this.ignoreErrors = ignoreErrors;
}
}
1.2 +0 -6 maven-core/src/java/org/apache/maven/verifier/DependencyVerifier.java
Index: DependencyVerifier.java
===================================================================
RCS file: /home/cvs/maven-core/src/java/org/apache/maven/verifier/DependencyVerifier.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DependencyVerifier.java 15 Apr 2003 01:16:44 -0000 1.1
+++ DependencyVerifier.java 15 Apr 2003 13:31:49 -0000 1.2
@@ -18,10 +18,4 @@
throws RepoConfigException,
UnsatisfiedDependencyException,
ChecksumVerificationException;
-
- /**
- *
- * @param ignoreErrors
- */
- void setIgnoreErrors( boolean ignoreErrors );
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org