You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "SebbASF (JIRA)" <ji...@codehaus.org> on 2010/07/09 17:32:33 UTC

[jira] Created: (MANTTASKS-191) No explanation of how to use multiple Maven repositories to resolve dependencies

No explanation of how to use multiple Maven repositories to resolve dependencies
--------------------------------------------------------------------------------

                 Key: MANTTASKS-191
                 URL: http://jira.codehaus.org/browse/MANTTASKS-191
             Project: Maven 2.x Ant Tasks
          Issue Type: Bug
          Components: documentation
    Affects Versions: 2.1.0
            Reporter: SebbASF


There does not seem to be any documentation on how to use multiple repositories when resolving dependencies.

-- 
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

        

[jira] Commented: (MANTTASKS-191) No explanation of how to use multiple Maven repositories to resolve dependencies

Posted by "Knut Forkalsrud (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTTASKS-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227866#action_227866 ] 

Knut Forkalsrud commented on MANTTASKS-191:
-------------------------------------------

I have the same experience.  Even if I name my repository "central" it will not override the builtin "central", but instead append to it.

Here's my sample ant task (using maven-ant-tasks 2.1.0)

    <target name="init">

        <artifact:dependencies pathId="dependency.classpath" filesetId="dependency.fileset">
            <remoteRepository id="central" url="http://mycompany.net/nexus/content/repo"/>
            <dependency groupId="foo" artifactId="bar" version="3.8.2"/>
        </artifact:dependencies>

    </target>


A few lines of output from "ant -v compile":

[artifact:dependencies] Using remote repositories:
  - id=central, url=http://mycompany.net/nexus/content/repo, releases=enabled, snapshots=enabled
  - id=central, url=http://repo1.maven.org/maven2, releases=enabled, snapshots=disabled
  org.apache.maven:super-pom:jar:2.0 (selected)




> No explanation of how to use multiple Maven repositories to resolve dependencies
> --------------------------------------------------------------------------------
>
>                 Key: MANTTASKS-191
>                 URL: http://jira.codehaus.org/browse/MANTTASKS-191
>             Project: Maven 2.x Ant Tasks
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 2.1.0
>            Reporter: SebbASF
>
> There does not seem to be any documentation on how to use multiple repositories when resolving dependencies.

-- 
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

        

[jira] Commented: (MANTTASKS-191) No explanation of how to use multiple Maven repositories to resolve dependencies

Posted by "Knut Forkalsrud (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTTASKS-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=228247#action_228247 ] 

Knut Forkalsrud commented on MANTTASKS-191:
-------------------------------------------

I did some debugging here, and it turns out the "central" repository comes from the pom,
or more specifically pom.getRepositories() near line 187 of DependenciesTask.java.
There is no <repository> element declared in pom.xml, so it must come from some implicit
parent pom.

> No explanation of how to use multiple Maven repositories to resolve dependencies
> --------------------------------------------------------------------------------
>
>                 Key: MANTTASKS-191
>                 URL: http://jira.codehaus.org/browse/MANTTASKS-191
>             Project: Maven 2.x Ant Tasks
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 2.1.0
>            Reporter: SebbASF
>
> There does not seem to be any documentation on how to use multiple repositories when resolving dependencies.

-- 
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

        

[jira] Reopened: (MANTTASKS-191) No explanation of how to use multiple Maven repositories to resolve dependencies

Posted by "SebbASF (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MANTTASKS-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

SebbASF reopened MANTTASKS-191:
-------------------------------


The page

http://maven.apache.org/ant-tasks/reference.html#remoteRepository

says:

"Specifies the location of the remote repository."

This could be taken to mean that there is only one remote repo. Would be better as:

"Specifies the location of a remote repository."

> No explanation of how to use multiple Maven repositories to resolve dependencies
> --------------------------------------------------------------------------------
>
>                 Key: MANTTASKS-191
>                 URL: http://jira.codehaus.org/browse/MANTTASKS-191
>             Project: Maven 2.x Ant Tasks
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 2.1.0
>            Reporter: SebbASF
>            Assignee: Herve Boutemy
>             Fix For: 2.1.1
>
>
> There does not seem to be any documentation on how to use multiple repositories when resolving dependencies.

-- 
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

        

[jira] Closed: (MANTTASKS-191) No explanation of how to use multiple Maven repositories to resolve dependencies

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MANTTASKS-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy closed MANTTASKS-191.
-----------------------------------

    Resolution: Fixed

nice catch: done in r966786

> No explanation of how to use multiple Maven repositories to resolve dependencies
> --------------------------------------------------------------------------------
>
>                 Key: MANTTASKS-191
>                 URL: http://jira.codehaus.org/browse/MANTTASKS-191
>             Project: Maven 2.x Ant Tasks
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 2.1.0
>            Reporter: SebbASF
>            Assignee: Herve Boutemy
>             Fix For: 2.1.1
>
>
> There does not seem to be any documentation on how to use multiple repositories when resolving dependencies.

-- 
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

        

[jira] Commented: (MANTTASKS-191) No explanation of how to use multiple Maven repositories to resolve dependencies

Posted by "SebbASF (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTTASKS-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227855#action_227855 ] 

SebbASF commented on MANTTASKS-191:
-----------------------------------

Also, the existing documentation appears to be misleading when it says:

{quote}
If no remote repositories are specified, the default  http://repo1.maven.org/maven2/ is used. But if at least one remote repository is specified, repo1 is not automatically added: you have to declare it if you need it.
{quote}

As far as I can tell, central is always searched.

> No explanation of how to use multiple Maven repositories to resolve dependencies
> --------------------------------------------------------------------------------
>
>                 Key: MANTTASKS-191
>                 URL: http://jira.codehaus.org/browse/MANTTASKS-191
>             Project: Maven 2.x Ant Tasks
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 2.1.0
>            Reporter: SebbASF
>
> There does not seem to be any documentation on how to use multiple repositories when resolving dependencies.

-- 
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

        

[jira] Commented: (MANTTASKS-191) No explanation of how to use multiple Maven repositories to resolve dependencies

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTTASKS-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=229084#action_229084 ] 

Herve Boutemy commented on MANTTASKS-191:
-----------------------------------------

bq. There does not seem to be any documentation on how to use multiple repositories when resolving dependencies.
[reference documentation|http://maven.apache.org/ant-tasks/reference.html#dependencies] tells "The task can include the dependency nested type, in addition to the other shared types localRepository, pom and remoteRepository": how can I make it more explicit?

bq. As far as I can tell, central is always searched.
True with Maven Ant Tasks 2.1.0: previous versions had a bug in parent pom handling which dropped repository definition. But now that it is fixed, central is always searched as it is defined in [super-pom|http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Super_POM].
I'll fix the documentation

bq. Even if I name my repository "central" it will not override the builtin "central", but instead append to it.
nice catch.
Please create another jira issue, since this is a bug

> No explanation of how to use multiple Maven repositories to resolve dependencies
> --------------------------------------------------------------------------------
>
>                 Key: MANTTASKS-191
>                 URL: http://jira.codehaus.org/browse/MANTTASKS-191
>             Project: Maven 2.x Ant Tasks
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 2.1.0
>            Reporter: SebbASF
>
> There does not seem to be any documentation on how to use multiple repositories when resolving dependencies.

-- 
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

        

[jira] Closed: (MANTTASKS-191) No explanation of how to use multiple Maven repositories to resolve dependencies

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MANTTASKS-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy closed MANTTASKS-191.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.1
         Assignee: Herve Boutemy

documentation about central repository fixed in [r965247|http://svn.apache.org/viewvc?view=revision&revision=965247]

for multiple remote repositories usage, it's already written just a few lines before:

bq. All of the tasks can optionally take *one or more* remote repositories to download from and upload to, and a local repository to store downloaded and installed archives to.

> No explanation of how to use multiple Maven repositories to resolve dependencies
> --------------------------------------------------------------------------------
>
>                 Key: MANTTASKS-191
>                 URL: http://jira.codehaus.org/browse/MANTTASKS-191
>             Project: Maven 2.x Ant Tasks
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 2.1.0
>            Reporter: SebbASF
>            Assignee: Herve Boutemy
>             Fix For: 2.1.1
>
>
> There does not seem to be any documentation on how to use multiple repositories when resolving dependencies.

-- 
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

        

[jira] Commented: (MANTTASKS-191) No explanation of how to use multiple Maven repositories to resolve dependencies

Posted by "Knut Forkalsrud (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MANTTASKS-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=229094#action_229094 ] 

Knut Forkalsrud commented on MANTTASKS-191:
-------------------------------------------

I filed MANTTASKS-195 for the override problem.

> No explanation of how to use multiple Maven repositories to resolve dependencies
> --------------------------------------------------------------------------------
>
>                 Key: MANTTASKS-191
>                 URL: http://jira.codehaus.org/browse/MANTTASKS-191
>             Project: Maven 2.x Ant Tasks
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 2.1.0
>            Reporter: SebbASF
>            Assignee: Herve Boutemy
>             Fix For: 2.1.1
>
>
> There does not seem to be any documentation on how to use multiple repositories when resolving dependencies.

-- 
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