jvanzyl 2002/10/06 20:10:50
Modified: src/java/org/apache/maven/app ProjectVerifier.java
Log:
o Chopping up the project verifier a bit, preparing for some refactoring.
You might see a little avalonese slipping in here and there :-)
Revision Changes Path
1.8 +28 -18
jakarta-turbine-maven/src/java/org/apache/maven/app/ProjectVerifier.java
Index: ProjectVerifier.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/ProjectVerifier.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ProjectVerifier.java 1 Oct 2002 21:28:25 -0000 1.7
+++ ProjectVerifier.java 7 Oct 2002 03:10:50 -0000 1.8
@@ -285,6 +285,17 @@
public void doExecute()
throws Exception
{
+ verifySettings();
+ contextualize(getContext());
+ verifyDependencies();
+ }
+
+ /**
+ * Verify user settings before attempting to verify the project.
+ */
+ private void verifySettings()
+ throws Exception
+ {
String localRepoProp = (String) getContext()
.getVariable("maven.repo.local");
@@ -331,36 +342,32 @@
setMavenRemoteRepo(remoteRepoProp);
setMavenLocalRepo(localRepoProp);
-
+ }
+
+ private void contextualize(MavenJellyContext context)
+ {
// The project may have already been set by the plugin manager.
if (getMavenProject() == null)
{
- setMavenProject((Project) getContext().getVariable("pom"));
+ setMavenProject((Project) context.getVariable("pom"));
}
- setProject((GrantProject) getContext()
- .getVariable("maven.ant.project"));
+ setProject((GrantProject) context.getVariable("maven.ant.project"));
- String proxyHost = (String) getContext()
- .getVariable("maven.proxy.host");
+ String proxyHost = (String) context.getVariable("maven.proxy.host");
if (proxyHost != null)
{
setProxyHost(proxyHost);
- setProxyPort((String) getContext().getVariable("maven.proxy.port"));
- setProxyUserName((String) getContext()
- .getVariable("maven.proxy.username"));
- setProxyPassword((String) getContext()
- .getVariable("maven.proxy.password"));
+ setProxyPort((String) context.getVariable("maven.proxy.port"));
+ setProxyUserName((String) context.getVariable("maven.proxy.username"));
+ setProxyPassword((String) context.getVariable("maven.proxy.password"));
}
- Boolean online = (Boolean) getContext()
- .getVariable("maven.mode.online");
+ Boolean online = (Boolean) context.getVariable("maven.mode.online");
if (online != null && !online.booleanValue())
{
setOnline(false);
}
-
- verifyDependencies();
}
/**
@@ -390,8 +397,7 @@
clearFailedDependencies();
- for (Iterator i = getMavenProject().getDependencies().iterator();
- i.hasNext();)
+ for (Iterator i = getMavenProject().getDependencies().iterator();
i.hasNext();)
{
Dependency dependency = (Dependency) i.next();
String jar = dependency.getJar();
@@ -406,6 +412,10 @@
File jarFile = new File(getMavenLocalRepo(), path);
log.debug("Looking for " + jarFile.getCanonicalPath() + "\n\n");
+
+ // So we want to pull down the checksum as well the first time
+ // the resource is pulled down to make sure that everything is
+ // cool.
if (jarFile.exists() == false || jar.endsWith("SNAPSHOT.jar"))
{
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>