You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/04/23 17:20:33 UTC
svn commit: r164392 -
/maven/components/trunk/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java
Author: brett
Date: Sat Apr 23 08:20:32 2005
New Revision: 164392
URL: http://svn.apache.org/viewcvs?rev=164392&view=rev
Log:
updated API
Modified:
maven/components/trunk/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java
Modified: maven/components/trunk/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java?rev=164392&r1=164391&r2=164392&view=diff
==============================================================================
--- maven/components/trunk/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java (original)
+++ maven/components/trunk/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactTask.java Sat Apr 23 08:20:32 2005
@@ -16,6 +16,7 @@
* limitations under the License.
*/
+import org.apache.maven.artifact.manager.WagonManager;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.tools.ant.BuildException;
@@ -46,6 +47,15 @@
{
ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) lookup( ArtifactRepositoryLayout.ROLE,
repository.getLayout() );
+
+ Authentication authentication = repository.getAuthentication();
+ if ( authentication != null )
+ {
+ WagonManager manager = (WagonManager) lookup( WagonManager.ROLE );
+ manager.addAuthenticationInfo( "remote", authentication.getUserName(), authentication.getPassword(),
+ authentication.getPrivateKey(), authentication.getPassphrase() );
+ }
+
return new ArtifactRepository( "remote", repository.getUrl(), repositoryLayout );
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org