Only in maven/bin: CVS Only in maven/bin: org Only in maven: project.properties diff -r -d --normal --exclude='*.xml' --exclude='*.class' --exclude='*.txt' maven/src/conf/log4j.properties maven-orig-src/src/conf/log4j.properties 29c29 < log4j.rootCategory = DEBUG, console --- > log4j.rootCategory = ERROR, console diff -r -d --normal --exclude='*.xml' --exclude='*.class' --exclude='*.txt' maven/src/java/org/apache/maven/ArtifactListBuilder.java maven-orig-src/src/java/org/apache/maven/ArtifactListBuilder.java 24,25c24 < import org.apache.maven.repository.ArtifactTypeHandlerFactory; < import org.apache.maven.repository.ArtifactTypeHandler; --- > import org.apache.maven.repository.DefaultArtifactFactory; 59d57 < ArtifactTypeHandler handler = ArtifactTypeHandlerFactory.getHandler(d,project.getContext()); 61c59 < Artifact artifact = handler.createArtifact( d ); --- > Artifact artifact = DefaultArtifactFactory.createArtifact( d ); diff -r -d --normal --exclude='*.xml' --exclude='*.class' --exclude='*.txt' maven/src/java/org/apache/maven/DependencyClasspathBuilder.java maven-orig-src/src/java/org/apache/maven/DependencyClasspathBuilder.java 20d19 < import org.apache.maven.jelly.MavenJellyContext; 24,25d22 < import org.apache.maven.repository.ArtifactTypeHandler; < import org.apache.maven.repository.ArtifactTypeHandlerFactory; 28d24 < import java.util.List; 58,72c54,55 < build(project.getArtifacts(),project,classpath); < return classpath.toString(); < } < < < /** < * appends the dependency classpath for the given project. < * @param list to create the classpath for. < * @param project the project to create the classpath for. < */ < public static void build(List artifacts, Project project, StringBuffer classpath ) < { < if(artifacts == null) return; < < for ( Iterator i = artifacts.iterator(); i.hasNext();) --- > > for ( Iterator i = project.getArtifacts().iterator(); i.hasNext();) 77,86d59 < < // parse and loop through dependencies. < MavenJellyContext context = project.getContext(); < ArtifactTypeHandler handler = ArtifactTypeHandlerFactory.getHandler(d,context); < List list = handler.getDependentArtifacts(artifact,context); < < // add component dependencies to classpath < if(list!=null) build(list,project,classpath); < < 93a67,68 > > return classpath.toString(); 95,97d69 < < < diff -r -d --normal --exclude='*.xml' --exclude='*.class' --exclude='*.txt' maven/src/java/org/apache/maven/jelly/MavenJellyContext.java maven-orig-src/src/java/org/apache/maven/jelly/MavenJellyContext.java 708d707 < Only in maven/src/java/org/apache/maven/project: DependencyWrapper.java diff -r -d --normal --exclude='*.xml' --exclude='*.class' --exclude='*.txt' maven/src/java/org/apache/maven/repository/ArtifactTypeHandler.java maven-orig-src/src/java/org/apache/maven/repository/ArtifactTypeHandler.java 21,22d20 < import org.apache.maven.jelly.MavenJellyContext; < import org.apache.maven.project.Dependency; 24d21 < import java.util.List; 34,52d30 < < /** < * Creates the artifact for the given dependency. < * < * @param dependency < * @return < */ < public Artifact createArtifact(Dependency dependency); < < /** < * List more dependencies if needed. < * < * @param artifact < * @param context < * @return < */ < public List getDependentArtifacts(Artifact artifact, MavenJellyContext context); < < Only in maven/src/java/org/apache/maven/repository: ArtifactTypeHandlerFactory.java Only in maven/src/java/org/apache/maven/repository: ComponentArtifactTypeHandler.java diff -r -d --normal --exclude='*.xml' --exclude='*.class' --exclude='*.txt' maven/src/java/org/apache/maven/repository/DefaultArtifactTypeHandler.java maven-orig-src/src/java/org/apache/maven/repository/DefaultArtifactTypeHandler.java 20,23d19 < import java.util.List; < < import org.apache.maven.jelly.MavenJellyContext; < import org.apache.maven.project.Dependency; 34,58c30 < < public DefaultArtifactTypeHandler() { < } < < public List getDependentArtifacts(Artifact artifact, MavenJellyContext context) { < < return null; < } < < < /** < * Return an appropriate Artifact implementation based on the dependency < * type. < * < * @param dependency The base dependency. < * @todo not the intended usage of test type < * @return The appropriate artifact based on the dependency type. < */ < public Artifact createArtifact( Dependency dependency ) < { < return DefaultArtifactFactory.createArtifact(dependency); < } < < < /** --- > /** Only in maven/src/java/org/apache/maven/repository: NativeArtifact.java Only in maven/src/java/org/apache/maven/repository: NativeArtifactTypeHandler.java diff -r -d --normal --exclude='*.xml' --exclude='*.class' --exclude='*.txt' maven/src/java/org/apache/maven/util/HttpUtils.java maven-orig-src/src/java/org/apache/maven/util/HttpUtils.java 34d33 < import java.util.Iterator; 49,51d47 < import org.apache.commons.lang.StringUtils; < import org.apache.maven.MavenConstants; < import org.apache.maven.jelly.MavenJellyContext; 337c333 < if (!StringUtils.isEmpty(loginHost) || !StringUtils.isEmpty(loginDomain)) { --- > if (!empty(loginHost) || !empty(loginDomain)) { 340c336 < else if (!StringUtils.isEmpty(proxyUserName) || !StringUtils.isEmpty(proxyPassword)) { --- > else if (!empty(proxyUserName) || !empty(proxyPassword)) { 348c344 < if (!StringUtils.isEmpty(proxyHost) || !StringUtils.isEmpty(proxyPort)) { --- > if (!empty(proxyHost) || !empty(proxyPort)) { 601,724c597 < < < /** < * Added for convience, since I needed it in the Type Handlers. < * < * @param context < * @throws IOException < */ < public static void getFile(String urlPath, < File destinationFile, < boolean ignoreErrors, < boolean useTimestamp, < boolean checksum, < MavenJellyContext context) throws IOException { < < IOException exception = null; < < for ( Iterator i = context.getMavenRepoRemote().iterator(); i.hasNext();) < { < String remoteRepo = (String) i.next(); < < // The username and password parameters are not being < // used here. Those are the "" parameters you see below. < String url = remoteRepo + "/" + urlPath; < url = StringUtils.replace( url, "//", "/" ); < < if ( !url.startsWith( "file" ) ) < { < if ( url.startsWith( "https" ) ) < { < url = StringUtils.replace( url, "https:/", "https://" ); < } < else < { < url = StringUtils.replace( url, "http:/", "http://" ); < } < } < < // Attempt to retrieve the artifact and set the checksum if retrieval < // of the checksum file was successful. < try < { < exception = null; < LOG.debug( "Getting URL: " + url ); < String loginHost = (String) context.getVariable( MavenConstants.PROXY_LOGINHOST ); < String loginDomain = (String) context.getVariable( MavenConstants.PROXY_LOGINDOMAIN ); < < HttpUtils.getFile( url, < destinationFile, < ignoreErrors, < useTimestamp, < context.getProxyHost(), < context.getProxyPort(), < context.getProxyUserName(), < context.getProxyPassword(), < loginHost, < loginDomain, < checksum ); < < // Artifact was found, continue checking additional remote repos (if any) < // in case there is a newer version (i.e. snapshots) in another repo < } < catch (FileNotFoundException e) < { < // Multiple repositories may exist, and if the file is not found < // in just one of them, it's no problem, and we don't want to < // even print out an error. < // if it's not found at all, artifactFound will be false, and the < // build _will_ break, and the user will get an error message < LOG.debug("File not found on one of the repos", e); < exception = e; < } < catch ( IOException e ) < { < // If there are additional remote repos, then ignore exception < // as artifact may be found in another remote repo. If there < // are no more remote repos to check and the artifact wasn't found in < // a previous remote repo, then artifactFound is false indicating < // that the artifact could not be found in any of the remote repos < // < // arguably, we need to give the user better control (another command- < // line switch perhaps) of what to do in this case? Maven already has < // a command-line switch to work in offline mode, but what about when < // one of two or more remote repos is unavailable? There may be multiple < // remote repos for redundancy, in which case you probably want the build < // to continue. There may however be multiple remote repos because some < // artifacts are on one, and some are on another. In this case, you may < // want the build to break. < // < // print a warning, in any case, so user catches on to mistyped < // hostnames, or other snafus < // FIXME: localize this message < LOG.warn("Error retrieving content from [" + url + "]: " + e); < LOG.debug("Error details", e); < exception = e; < } < } < < if(ignoreErrors) < return; < < if(exception == null) < return; < < throw exception; < } < < < < < < < < < < < < < < < < < < --- > private static boolean empty(String s) { return s == null || s.length() == 0; } diff -r -d --normal --exclude='*.xml' --exclude='*.class' --exclude='*.txt' maven/src/java/org/apache/maven/verifier/DependencyVerifier.java maven-orig-src/src/java/org/apache/maven/verifier/DependencyVerifier.java 31d30 < import java.io.IOException; 289,299c288,364 < try { < HttpUtils.getFile( artifact.getUrlPath(), < artifact.getFile(), < ignoreErrors, < useTimestamp, < true , < getProject().getContext() ); < artifactFound = true; < } catch ( IOException e ) { < log.warn("Error retrieving artifact from [" + artifact.getUrlPath() + "]: " + e); < log.debug("Error details", e); --- > > for ( Iterator i = getProject().getContext().getMavenRepoRemote().iterator(); i.hasNext();) > { > String remoteRepo = (String) i.next(); > > // The username and password parameters are not being > // used here. Those are the "" parameters you see below. > String url = remoteRepo + "/" + artifact.getUrlPath(); > url = StringUtils.replace( url, "//", "/" ); > > if ( !url.startsWith( "file" ) ) > { > if ( url.startsWith( "https" ) ) > { > url = StringUtils.replace( url, "https:/", "https://" ); > } > else > { > url = StringUtils.replace( url, "http:/", "http://" ); > } > } > > // Attempt to retrieve the artifact and set the checksum if retrieval > // of the checksum file was successful. > try > { > log.debug( "Getting URL: " + url ); > String loginHost = (String) getProject().getContext().getVariable( MavenConstants.PROXY_LOGINHOST ); > String loginDomain = (String) getProject().getContext().getVariable( MavenConstants.PROXY_LOGINDOMAIN ); > HttpUtils.getFile( url, > artifact.getFile(), > ignoreErrors, > useTimestamp, > getProject().getContext().getProxyHost(), > getProject().getContext().getProxyPort(), > getProject().getContext().getProxyUserName(), > getProject().getContext().getProxyPassword(), > loginHost, > loginDomain, > true ); > > // Artifact was found, continue checking additional remote repos (if any) > // in case there is a newer version (i.e. snapshots) in another repo > artifactFound = true; > } > catch (FileNotFoundException e) > { > // Multiple repositories may exist, and if the file is not found > // in just one of them, it's no problem, and we don't want to > // even print out an error. > // if it's not found at all, artifactFound will be false, and the > // build _will_ break, and the user will get an error message > log.debug("File not found on one of the repos", e); > } > catch ( Exception e ) > { > // If there are additional remote repos, then ignore exception > // as artifact may be found in another remote repo. If there > // are no more remote repos to check and the artifact wasn't found in > // a previous remote repo, then artifactFound is false indicating > // that the artifact could not be found in any of the remote repos > // > // arguably, we need to give the user better control (another command- > // line switch perhaps) of what to do in this case? Maven already has > // a command-line switch to work in offline mode, but what about when > // one of two or more remote repos is unavailable? There may be multiple > // remote repos for redundancy, in which case you probably want the build > // to continue. There may however be multiple remote repos because some > // artifacts are on one, and some are on another. In this case, you may > // want the build to break. > // > // print a warning, in any case, so user catches on to mistyped > // hostnames, or other snafus > // FIXME: localize this message > log.warn("Error retrieving artifact from [" + url + "]: " + e); > log.debug("Error details", e); > } Only in maven/src/test/basedir: project.properties Only in maven/src/test/touchstone-build: Copy of project.properties diff -r -d --normal --exclude='*.xml' --exclude='*.class' --exclude='*.txt' maven/src/test/touchstone-build/project.properties maven-orig-src/src/test/touchstone-build/project.properties 9c9 < # --- > # 40c40 < # --- > # 49,51d48 < < maven.type.handler.package=org.apache.maven.repository.ComponentArtifactTypeHandler < Only in maven/src/test/touchstone-build/src/reactor-build/resources/subproject: target Only in maven/src/test/touchstone-build: target diff -r -d --normal --exclude='*.xml' --exclude='*.class' --exclude='*.txt' maven/target/classes/log4j.properties maven-orig-src/target/classes/log4j.properties 29c29 < log4j.rootCategory = DEBUG, console --- > log4j.rootCategory = ERROR, console Only in maven/target: maven-1.0-rc4.jar