You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Grégory Joseph (JIRA)" <ji...@codehaus.org> on 2011/01/07 15:04:57 UTC

[jira] Created: (ARCHETYPE-358) Following mirror configuration from settings.xml

Following mirror configuration from settings.xml
------------------------------------------------

                 Key: ARCHETYPE-358
                 URL: http://jira.codehaus.org/browse/ARCHETYPE-358
             Project: Maven Archetype
          Issue Type: Bug
          Components: Generator, Plugin
    Affects Versions: 2.1
            Reporter: Grégory Joseph


It looks like the current snapshot of the plugin does not follow the mirror configuration from my settings.xml when I do {{mvn archetype:generate}}. I would expect it to grab the catalog from {{http://nexus.magnolia-cms.com/content/groups/all/archetype-catalog.xml}} instead of the central one.

-- 
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] (ARCHETYPE-358) Following mirror configuration from settings.xml

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/ARCHETYPE-358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated ARCHETYPE-358:
-----------------------------------

    Fix Version/s: 2.3
    
> Following mirror configuration from settings.xml
> ------------------------------------------------
>
>                 Key: ARCHETYPE-358
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-358
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator, Plugin
>    Affects Versions: 2.1
>            Reporter: Grégory Joseph
>             Fix For: 2.3
>
>         Attachments: patch.txt
>
>
> It looks like the current snapshot of the plugin does not follow the mirror configuration from my settings.xml when I do {{mvn archetype:generate}}. I would expect it to grab the catalog from {{http://nexus.magnolia-cms.com/content/groups/all/archetype-catalog.xml}} instead of the central one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (ARCHETYPE-358) Following mirror configuration from settings.xml

Posted by "Anders Hammar (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/ARCHETYPE-358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=318159#comment-318159 ] 

Anders Hammar commented on ARCHETYPE-358:
-----------------------------------------

I agree. Trading the hardcoded url for the repo/server id is good. And then use the standard Maven logic for using the correct mirror.
                
> Following mirror configuration from settings.xml
> ------------------------------------------------
>
>                 Key: ARCHETYPE-358
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-358
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator, Plugin
>    Affects Versions: 2.1
>            Reporter: Grégory Joseph
>             Fix For: 2.3
>
>         Attachments: patch.txt
>
>
> It looks like the current snapshot of the plugin does not follow the mirror configuration from my settings.xml when I do {{mvn archetype:generate}}. I would expect it to grab the catalog from {{http://nexus.magnolia-cms.com/content/groups/all/archetype-catalog.xml}} instead of the central one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (ARCHETYPE-358) Following mirror configuration from settings.xml

Posted by "Anders Hammar (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/ARCHETYPE-358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=318490#comment-318490 ] 

Anders Hammar commented on ARCHETYPE-358:
-----------------------------------------

I've created ARCHETYPE-427 which is about changing the current behavior with one hard-coded repo url.
                
> Following mirror configuration from settings.xml
> ------------------------------------------------
>
>                 Key: ARCHETYPE-358
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-358
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator, Plugin
>    Affects Versions: 2.1
>            Reporter: Grégory Joseph
>            Assignee: Anders Hammar
>             Fix For: 2.3
>
>         Attachments: patch.txt
>
>
> It looks like the current snapshot of the plugin does not follow the mirror configuration from my settings.xml when I do {{mvn archetype:generate}}. I would expect it to grab the catalog from {{http://nexus.magnolia-cms.com/content/groups/all/archetype-catalog.xml}} instead of the central one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (ARCHETYPE-358) Following mirror configuration from settings.xml

Posted by "Chris Feldhacker (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/ARCHETYPE-358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Feldhacker updated ARCHETYPE-358:
---------------------------------------

    Attachment: patch.txt

Attached is a patch for the DefaultArchetypeSelector class.
A new dependency on "org.apache.maven:maven-compat:3.0.4" is needed in order to reuse existing Mirror processing logic.
The patch trades a hard-coded URL to central (which is bad) with a hard-coded server id of "central" (which is also bad).  Not an ideal solution, but certainly no worse off than today...

Unfortunately, the getMirrors() method of the existing ArchetypeGenerationRequest argument returns an empty list of Mirrors and I don't know why or what the proper way would be to resolve it.  Perhaps if somebody could jump in and solve the other half of this puzzle, we could get a workable solution...
                
> Following mirror configuration from settings.xml
> ------------------------------------------------
>
>                 Key: ARCHETYPE-358
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-358
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator, Plugin
>    Affects Versions: 2.1
>            Reporter: Grégory Joseph
>         Attachments: patch.txt
>
>
> It looks like the current snapshot of the plugin does not follow the mirror configuration from my settings.xml when I do {{mvn archetype:generate}}. I would expect it to grab the catalog from {{http://nexus.magnolia-cms.com/content/groups/all/archetype-catalog.xml}} instead of the central one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (ARCHETYPE-358) Following mirror configuration from settings.xml

Posted by "Chris Feldhacker (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/ARCHETYPE-358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315887#comment-315887 ] 

Chris Feldhacker edited comment on ARCHETYPE-358 at 12/18/12 2:16 PM:
----------------------------------------------------------------------

We're experiencing this problem, too.
We have our own Sonatype Nexus repository setup behind the firewall, which is defined in the mirrors section of the settings.xml.  Standard Maven operations work fine, no proxy settings needed in the settings.xml file.

When executing {{mvn archetype:generate}}, however, the error "Connection to http://repo1.maven.org refused" is given.  (Similar symptoms to ARCHETYPE-202, but different cause.) The archetype plugin should NOT be trying to connect to this URL directly -- instead, it should be using the mirror we have defined.
                
      was (Author: feldhacker):
    We're experiencing this problem, too.
We have our own Sonatype Nexus repository setup behind the firewall, which is defined in the mirrors section of the settings.xml.  Standard Maven operations work fine, no proxy settings needed in the settings.xml file.

When executing {{monospaced}}mvn archetype:generate{{monospaced}}, however, the error "Connection to http://repo1.maven.org refused" is given.  (Similar symptoms to ARCHETYPE-202, but different cause.) The archetype plugin should NOT be trying to connect to this URL directly -- instead, it should be using the mirror we have defined.
                  
> Following mirror configuration from settings.xml
> ------------------------------------------------
>
>                 Key: ARCHETYPE-358
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-358
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator, Plugin
>    Affects Versions: 2.1
>            Reporter: Grégory Joseph
>
> It looks like the current snapshot of the plugin does not follow the mirror configuration from my settings.xml when I do {{mvn archetype:generate}}. I would expect it to grab the catalog from {{http://nexus.magnolia-cms.com/content/groups/all/archetype-catalog.xml}} instead of the central one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (ARCHETYPE-358) Following mirror configuration from settings.xml

Posted by "Anders Hammar (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/ARCHETYPE-358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=318160#comment-318160 ] 

Anders Hammar commented on ARCHETYPE-358:
-----------------------------------------

As a note, there's A LOT of docs to update if we implement this change. It is stated in several pages that the central repo url is used by default, which should be changed to state that the url defined by the (magic) repo id 'central' is used.
                
> Following mirror configuration from settings.xml
> ------------------------------------------------
>
>                 Key: ARCHETYPE-358
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-358
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator, Plugin
>    Affects Versions: 2.1
>            Reporter: Grégory Joseph
>             Fix For: 2.3
>
>         Attachments: patch.txt
>
>
> It looks like the current snapshot of the plugin does not follow the mirror configuration from my settings.xml when I do {{mvn archetype:generate}}. I would expect it to grab the catalog from {{http://nexus.magnolia-cms.com/content/groups/all/archetype-catalog.xml}} instead of the central one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (ARCHETYPE-358) Following mirror configuration from settings.xml

Posted by "Chris Feldhacker (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/ARCHETYPE-358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=316032#comment-316032 ] 

Chris Feldhacker commented on ARCHETYPE-358:
--------------------------------------------

Based on my limited digging and Maven plugin knowledge:

I think fixing this is tough (well, it involves a difficult decision) because there appears to be a design mismatch in how the archetype plugin operates and how Maven itself operates.  Maven operates based on a LIST of remote repositories: the user may or may not use central, and all servers are filtered through the mirrors list to arrive at a final list of remote repositories.  However, in the final remote repository list, knowledge of which repository maps to central (if any) is lost.

The archetype plugin is hard-coded to look at exactly one remote repository, central.  There's no good way to resolve or map central to some other repository (not without some bad hacking) -- exactly which remote repository from the list should map to central is unknown.

So I think the ultimate question is:  Should the archetype plugin really be hard-coded to look directly at one repository, central?  Why not utilize the list of remote repositories that core Maven already provides (already filtered through the mirrors), searching each one by one?
                
> Following mirror configuration from settings.xml
> ------------------------------------------------
>
>                 Key: ARCHETYPE-358
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-358
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator, Plugin
>    Affects Versions: 2.1
>            Reporter: Grégory Joseph
>
> It looks like the current snapshot of the plugin does not follow the mirror configuration from my settings.xml when I do {{mvn archetype:generate}}. I would expect it to grab the catalog from {{http://nexus.magnolia-cms.com/content/groups/all/archetype-catalog.xml}} instead of the central one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (ARCHETYPE-358) Following mirror configuration from settings.xml

Posted by "Anders Hammar (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/ARCHETYPE-358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anders Hammar reassigned ARCHETYPE-358:
---------------------------------------

    Assignee: Anders Hammar
    
> Following mirror configuration from settings.xml
> ------------------------------------------------
>
>                 Key: ARCHETYPE-358
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-358
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator, Plugin
>    Affects Versions: 2.1
>            Reporter: Grégory Joseph
>            Assignee: Anders Hammar
>             Fix For: 2.3
>
>         Attachments: patch.txt
>
>
> It looks like the current snapshot of the plugin does not follow the mirror configuration from my settings.xml when I do {{mvn archetype:generate}}. I would expect it to grab the catalog from {{http://nexus.magnolia-cms.com/content/groups/all/archetype-catalog.xml}} instead of the central one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (ARCHETYPE-358) Following mirror configuration from settings.xml

Posted by "Chris Feldhacker (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/ARCHETYPE-358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315887#comment-315887 ] 

Chris Feldhacker commented on ARCHETYPE-358:
--------------------------------------------

We're experiencing this problem, too.
We have our own Sonatype Nexus repository setup behind the firewall, which is defined in the mirrors section of the settings.xml.  Standard Maven operations work fine, no proxy settings needed in the settings.xml file.

When executing {{monospaced}}mvn archetype:generate{{monospaced}}, however, the error "Connection to http://repo1.maven.org refused" is given.  (Similar symptoms to ARCHETYPE-202, but different cause.) The archetype plugin should NOT be trying to connect to this URL directly -- instead, it should be using the mirror we have defined.
                
> Following mirror configuration from settings.xml
> ------------------------------------------------
>
>                 Key: ARCHETYPE-358
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-358
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator, Plugin
>    Affects Versions: 2.1
>            Reporter: Grégory Joseph
>
> It looks like the current snapshot of the plugin does not follow the mirror configuration from my settings.xml when I do {{mvn archetype:generate}}. I would expect it to grab the catalog from {{http://nexus.magnolia-cms.com/content/groups/all/archetype-catalog.xml}} instead of the central one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira