You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Konstantin Ignatyev (JIRA)" <ji...@codehaus.org> on 2005/11/09 00:56:06 UTC
[jira] Updated: (MNG-1466) Ant dependencies task does not work with multiple repositories
[ http://jira.codehaus.org/browse/MNG-1466?page=all ]
Konstantin Ignatyev updated MNG-1466:
-------------------------------------
Attachment: id.diff
This is a dirty fix for the problem that introduces ID property on Repository and tries to play nicely with Ant, which does not work quite right.
This works just fine:
<dependencies pathId="provided.classpath" filesetId="provided.fileset">
<remoteRepository id="slabs" url="http://xxxxxxx/testrepo/" />
<remoteRepository id="ibiblio" url="http://www.ibiblio.com/maven2/" />
<remoteRepository id="internal" url="http://yyyyyyyy/localrepo/" />
<dependency groupId="j2ee" artifactId="j2ee" version="1.3.1" />
</dependencies>
==============================
This does not work:
<remoteRepository id="slabs" url="http://xxxxxxx/testrepo/" />
<remoteRepository id="ibiblio" url="http://www.ibiblio.com/maven2/" />
<remoteRepository id="internal" url="http://yyyyyyyy/localrepo/" />
<dependencies pathId="provided.classpath" filesetId="provided.fileset">
<remoteRepository refid="internal" />
<remoteRepository refid="slabs" />
<remoteRepository refid="ibiblio" />
<dependency groupId="j2ee" artifactId="j2ee" version="1.3.1" />
</dependencies>
==============================
This does work, not the artificial a,b,c identities on references, by some reasons reference get Null id:
<remoteRepository id="slabs" url="http://xxxxxxx/testrepo/" />
<remoteRepository id="ibiblio" url="http://www.ibiblio.com/maven2/" />
<remoteRepository id="internal" url="http://yyyyyyyy/localrepo/" />
<dependencies pathId="provided.classpath" filesetId="provided.fileset">
<remoteRepository id="a" refid="internal" />
<remoteRepository id="b" refid="slabs" />
<remoteRepository id="c" refid="ibiblio" />
<dependency groupId="j2ee" artifactId="j2ee" version="1.3.1" />
</dependencies>
============================
Hope that helps
> Ant dependencies task does not work with multiple repositories
> --------------------------------------------------------------
>
> Key: MNG-1466
> URL: http://jira.codehaus.org/browse/MNG-1466
> Project: Maven 2
> Type: Bug
> Components: maven-artifact-ant
> Versions: 2.0.1, 2.0
> Environment: Maven 2.0, Maven 2.0 CVS
> Reporter: Konstantin Ignatyev
> Attachments: id.diff
>
>
> The maven-dependencies task for Ant cannot work properly with multiple repositories because it incorrectly hardcode artifact repository ID that causes all the repositories cache informatioon in the same file
> AbstractArtifactTask#
> ....
> artifactRepository = repositoryFactory.createArtifactRepository( "remote", repository.getUrl(),
> repositoryLayout, snapshots, releases );
> creates all the repositories with the same ID="remote" and that causes all the meta-information for all the repositories collide in one file because the file name pattern is:${gtoupId}/${artifactId}/maven-metadata-${repositoryId}.xml
> This causes whole thing work incorrectly.
> When Maven itself constructs ArtifactRepository, it properly assigns ID to the repository and the schema works.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org