o adding in some changes before moving to the trunk

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@779655 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2009-05-28 16:43:20 +00:00
parent 6bbe3780d4
commit 101dd8530e
6 changed files with 300 additions and 8 deletions

View File

@ -21,15 +21,14 @@ public class ArtifactResolutionRequest
private Artifact artifact;
// Needs to go away
// These are really overrides now, projects defining dependencies for a plugin that override what is
// specified in the plugin itself.
private Set<Artifact> artifactDependencies;
private ArtifactRepository localRepository;
private List<ArtifactRepository> remoteRepositories;
// Not sure what to do with this?
// Scope
// Lock down lists
private ArtifactFilter filter;
// Needs to go away

View File

@ -1,8 +1,8 @@
package org.apache.maven.project;
import org.apache.maven.artifact.resolver.ArtifactResolver;
import org.apache.maven.repository.LegacyRepositorySystem;
import org.apache.maven.repository.RepositorySystem;
import org.apache.maven.repository.legacy.LegacyRepositorySystem;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;

View File

@ -0,0 +1,106 @@
package org.apache.maven.repository;
public class Authentication
{
/**
* Username used to login to the host
*/
private String userName;
/**
* Password associated with the login
*/
private String password;
/**
* Passphrase of the user's private key file
*/
private String passphrase;
/**
* The absolute path to private key file
*/
private String privateKey;
/**
* Get the passphrase of the private key file. The passphrase is used only when host/protocol
* supports authentication via exchange of private/public keys and private key was used for
* authentication.
*
* @return passphrase of the private key file
*/
public String getPassphrase()
{
return passphrase;
}
/**
* Set the passphrase of the private key file.
*
* @param passphrase passphrase of the private key file
*/
public void setPassphrase( String passphrase )
{
this.passphrase = passphrase;
}
/**
* Get the absolute path to the private key file.
*
* @return absolute path to private key
*/
public String getPrivateKey()
{
return privateKey;
}
/**
* Set the absolute path to private key file.
*
* @param privateKey path to private key in local file system
*/
public void setPrivateKey( String privateKey )
{
this.privateKey = privateKey;
}
/**
* Get the user's password which is used when connecting to the repository.
*
* @return password of user
*/
public String getPassword()
{
return password;
}
/**
* Set the user's password which is used when connecting to the repository.
*
* @param password password of the user
*/
public void setPassword( String password )
{
this.password = password;
}
/**
* Get the username used to access the repository.
*
* @return username at repository
*/
public String getUserName()
{
return userName;
}
/**
* Set username used to access the repository.
*
* @param userName the username used to access repository
*/
public void setUserName( final String userName )
{
this.userName = userName;
}
}

View File

@ -35,7 +35,7 @@ public class MetadataGraph
Collection<MetadataGraphNode> nodes;
/** entry point for tree-like structures */
MetadataGraphNode entry;
MetadataGraphNode entry;
public MetadataGraph( MetadataGraphNode entry )
{
@ -63,12 +63,15 @@ public class MetadataGraph
public MetadataGraphNode findNode( MavenArtifactMetadata md )
{
for( MetadataGraphNode mgn : nodes )
{
if( mgn.metadata.equals( md ) )
{
return mgn;
}
}
MetadataGraphNode node = new MetadataGraphNode( md );
addNode( node );
addNode( node );
return node;
}

View File

@ -0,0 +1,178 @@
package org.apache.maven.repository;
public class Proxy
{
public final static String PROXY_SOCKS5 = "SOCKS_5";
public final static String PROXY_SOCKS4 = "SOCKS4";
public final static String PROXY_HTTP = "HTTP";
/**
* Proxy server host
*/
private String host;
/**
* Username used to access the proxy server
*/
private String userName;
/**
* Password associated with the proxy server
*/
private String password;
/**
* Proxy server port
*/
private int port;
/**
* Type of the proxy
*/
private String type;
/**
* The non-proxy hosts. Follows Java system property format: <code>*.foo.com|localhost</code>.
*/
private String nonProxyHosts;
/**
* For NTLM proxies, specifies the NTLM host.
*/
private String ntlmHost;
/**
* For NTLM proxies, specifies the NTLM domain.
*/
private String ntlmDomain;
/**
* Return proxy server host name.
*
* @return proxy server host name
*/
public String getHost()
{
return host;
}
/**
* Set proxy host name.
*
* @param host proxy server host name
*/
public void setHost( String host )
{
this.host = host;
}
/**
* Get user's password used to login to proxy server.
*
* @return user's password at proxy host
*/
public String getPassword()
{
return password;
}
/**
* Set the user's password for the proxy server.
*
* @param password password to use to login to a proxy server
*/
public void setPassword( String password )
{
this.password = password;
}
/**
* Get the proxy port.
*
* @return proxy server port
*/
public int getPort()
{
return port;
}
/**
* Set the proxy port.
*
* @param port proxy server port
*/
public void setPort( int port )
{
this.port = port;
}
/**
* Get the proxy username.
*
* @return username for the proxy server
*/
public String getUserName()
{
return userName;
}
/**
* Set the proxy username.
*
* @param userName username for the proxy server
*/
public void setUserName( String userName )
{
this.userName = userName;
}
/**
* Get the type of the proxy server.
*
* @return the type of the proxy server
*/
public String getType()
{
return type;
}
/**
* @param type the type of the proxy server like <i>SOCKSv4</i>
*/
public void setType( String type )
{
this.type = type;
}
public String getNonProxyHosts()
{
return nonProxyHosts;
}
public void setNonProxyHosts( String nonProxyHosts )
{
this.nonProxyHosts = nonProxyHosts;
}
public String getNtlmHost()
{
return ntlmHost;
}
public void setNtlmHost( String ntlmHost )
{
this.ntlmHost = ntlmHost;
}
public void setNtlmDomain( String ntlmDomain )
{
this.ntlmDomain = ntlmDomain;
}
public String getNtlmDomain()
{
return ntlmDomain;
}
}

View File

@ -1,4 +1,4 @@
package org.apache.maven.repository;
package org.apache.maven.repository.legacy;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
@ -36,6 +36,12 @@ import org.apache.maven.model.Dependency;
import org.apache.maven.model.Plugin;
import org.apache.maven.model.Repository;
import org.apache.maven.model.RepositoryPolicy;
import org.apache.maven.repository.DelegatingLocalArtifactRepository;
import org.apache.maven.repository.LocalArtifactRepository;
import org.apache.maven.repository.MetadataResolutionRequest;
import org.apache.maven.repository.MetadataResolutionResult;
import org.apache.maven.repository.MirrorBuilder;
import org.apache.maven.repository.RepositorySystem;
import org.apache.maven.wagon.ResourceDoesNotExistException;
import org.apache.maven.wagon.TransferFailedException;
import org.apache.maven.wagon.events.TransferListener;