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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]