mirror of https://github.com/apache/maven.git
o Fixed missing propagation of authentication info to the wagon manager
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@750444 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4ccac06b7b
commit
8ea9a241b6
|
@ -26,19 +26,11 @@ import org.apache.maven.wagon.ResourceDoesNotExistException;
|
||||||
import org.apache.maven.wagon.TransferFailedException;
|
import org.apache.maven.wagon.TransferFailedException;
|
||||||
import org.apache.maven.wagon.UnsupportedProtocolException;
|
import org.apache.maven.wagon.UnsupportedProtocolException;
|
||||||
import org.apache.maven.wagon.Wagon;
|
import org.apache.maven.wagon.Wagon;
|
||||||
import org.apache.maven.wagon.authentication.AuthenticationInfo;
|
|
||||||
import org.apache.maven.wagon.events.TransferListener;
|
import org.apache.maven.wagon.events.TransferListener;
|
||||||
import org.apache.maven.wagon.proxy.ProxyInfo;
|
|
||||||
import org.apache.maven.wagon.repository.Repository;
|
import org.apache.maven.wagon.repository.Repository;
|
||||||
import org.apache.maven.wagon.repository.RepositoryPermissions;
|
|
||||||
import org.codehaus.plexus.PlexusContainer;
|
|
||||||
import org.codehaus.plexus.util.xml.Xpp3Dom;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages <a href="http://maven.apache.org/wagon">Wagon</a> related operations in Maven.
|
* Manages <a href="http://maven.apache.org/wagon">Wagon</a> related operations in Maven.
|
||||||
|
@ -114,4 +106,8 @@ public interface WagonManager
|
||||||
|
|
||||||
// All the tests fail that are specifically look for the contents of the listener fail without this.
|
// All the tests fail that are specifically look for the contents of the listener fail without this.
|
||||||
void setDownloadMonitor( TransferListener listener );
|
void setDownloadMonitor( TransferListener listener );
|
||||||
|
|
||||||
|
void addAuthenticationInfo( String repositoryId, String username, String password, String privateKey,
|
||||||
|
String passphrase );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ import org.apache.maven.artifact.Artifact;
|
||||||
import org.apache.maven.artifact.ArtifactUtils;
|
import org.apache.maven.artifact.ArtifactUtils;
|
||||||
import org.apache.maven.artifact.InvalidRepositoryException;
|
import org.apache.maven.artifact.InvalidRepositoryException;
|
||||||
import org.apache.maven.artifact.factory.ArtifactFactory;
|
import org.apache.maven.artifact.factory.ArtifactFactory;
|
||||||
|
import org.apache.maven.artifact.manager.WagonManager;
|
||||||
import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
|
import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
|
||||||
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
|
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
|
||||||
import org.apache.maven.artifact.metadata.ResolutionGroup;
|
import org.apache.maven.artifact.metadata.ResolutionGroup;
|
||||||
|
@ -68,6 +69,10 @@ import org.codehaus.plexus.util.StringUtils;
|
||||||
public class LegacyMavenRepositorySystem
|
public class LegacyMavenRepositorySystem
|
||||||
implements MavenRepositorySystem
|
implements MavenRepositorySystem
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@Requirement
|
||||||
|
private WagonManager wagonManager;
|
||||||
|
|
||||||
@Requirement
|
@Requirement
|
||||||
private ArtifactFactory artifactFactory;
|
private ArtifactFactory artifactFactory;
|
||||||
|
|
||||||
|
@ -573,7 +578,8 @@ public class LegacyMavenRepositorySystem
|
||||||
proxies.put( protocol, proxyInfo );
|
proxies.put( protocol, proxyInfo );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addAuthenticationInfo( String repositoryId, String username, String password, String privateKey, String passphrase )
|
public void addAuthenticationInfo( String repositoryId, String username, String password, String privateKey,
|
||||||
|
String passphrase )
|
||||||
{
|
{
|
||||||
AuthenticationInfo authInfo = new AuthenticationInfo();
|
AuthenticationInfo authInfo = new AuthenticationInfo();
|
||||||
authInfo.setUserName( username );
|
authInfo.setUserName( username );
|
||||||
|
@ -582,6 +588,8 @@ public class LegacyMavenRepositorySystem
|
||||||
authInfo.setPassphrase( passphrase );
|
authInfo.setPassphrase( passphrase );
|
||||||
|
|
||||||
authenticationInfoMap.put( repositoryId, authInfo );
|
authenticationInfoMap.put( repositoryId, authInfo );
|
||||||
|
|
||||||
|
wagonManager.addAuthenticationInfo( repositoryId, username, password, privateKey, passphrase );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addPermissionInfo( String repositoryId, String filePermissions, String directoryPermissions )
|
public void addPermissionInfo( String repositoryId, String filePermissions, String directoryPermissions )
|
||||||
|
|
Loading…
Reference in New Issue