Maven 2.x Ant Tasks

Ant Tasks use of <authentication> is inconsistent

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0.4, 2.0.6, 2.0.7
  • Fix Version/s: 2.0.9
  • Component/s: None
  • Labels:
    None
  • Environment:
    cygwin/win32
  • Number of attachments :
    0

Description

In the ant build file, authentication works fine if you do:

<artifact:dependencies pathId="dependency.classpath">
<dependency groupId="edu.blah" artifactId="blah"
version="1.0-SNAPSHOT"/>
<remoteRepository id="abcde.repository" url="https://blah.blah.edu:8081/maven2">
<authentication username="username" password="password"/>
<remoteRepository>
</artifact:dependencies>

But, if you do

<artifact:remoteRepository id="abcde.repository" url="https://blah.blah.edu:8081/maven2">
<authentication username="username" password="password"/>
</artifact:remoteRepository>

<artifact:dependencies pathId="dependency.classpath">
<dependency groupId="edu.blah" artifactId="blah"
version="1.0-SNAPSHOT"/>
<artifact:remoteRepository refid="abcde.repository"/>
</artifact:dependencies>

It fails mysteriously. The remoteRepository is found, but the http client does not respond to the authentication challenge. The only error which presents is a vague "Error transferring file" message

Activity

Hide
Kalle Korhonen added a comment -

Yes, I can confirm the same on Linux platform. In the latter example, you can of course add <authentication> as nested in <artifact:remoteRepository> but then referencing to a repository definition is kind of pointless. A referenced nested authentication tag is always ignored.

Show
Kalle Korhonen added a comment - Yes, I can confirm the same on Linux platform. In the latter example, you can of course add <authentication> as nested in <artifact:remoteRepository> but then referencing to a repository definition is kind of pointless. A referenced nested authentication tag is always ignored.
Hide
Kalle Korhonen added a comment -

... and using Maven Tasks for Ant 2.0.7

Show
Kalle Korhonen added a comment - ... and using Maven Tasks for Ant 2.0.7
Hide
Herve Boutemy added a comment -

fixed in trunk r615613, 2.0.x branch r615614

Show
Herve Boutemy added a comment - fixed in trunk r615613, 2.0.x branch r615614

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: