You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Josep F. Barranco (JIRA)" <ji...@codehaus.org> on 2008/11/04 17:50:51 UTC

[jira] Created: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

Unable to access remote catalogs on HTTPS protocol, even with redirection
-------------------------------------------------------------------------

                 Key: ARCHETYPE-220
                 URL: http://jira.codehaus.org/browse/ARCHETYPE-220
             Project: Maven Archetype
          Issue Type: Bug
          Components: Archetypes
    Affects Versions: 2.0-alpha-4
         Environment: Any (Windows, Linux)
            Reporter: Josep F. Barranco
            Priority: Minor


I use that test:

1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
   Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.

2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
   Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
   It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)

3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
   Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)

There's no way to access an archetype-catalog.xml located on a SSL url ?


-- 
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] Updated: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

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

Christian Rigdon updated ARCHETYPE-220:
---------------------------------------

    Attachment: https.patch

Why not just allow https as an acceptable url for archetypeCatalog?

> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Archetypes
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Priority: Minor
>         Attachments: https.patch, org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

-- 
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: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

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

Stevo Slavic commented on ARCHETYPE-220:
----------------------------------------

Oh, there is one already, ARCHETYPE-204

> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Assignee: Olivier Lamy
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: https.patch, org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

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

Brett Porter updated ARCHETYPE-220:
-----------------------------------

    Patch Submitted: [Yes]

> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Archetypes
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Priority: Minor
>         Attachments: org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

-- 
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: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

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

Olivier Lamy closed ARCHETYPE-220.
----------------------------------

    Resolution: Fixed

fixed rev 1160999.
Thanks !

> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Assignee: Olivier Lamy
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: https.patch, org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

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

Stevo Slavic commented on ARCHETYPE-220:
----------------------------------------

I don't see in changes that specifying repositoryId is supported. Should separate ticket be created for support for providing credentials and/or repositoryId?

> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Assignee: Olivier Lamy
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: https.patch, org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

Posted by "Stevo Slavic (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/ARCHETYPE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=198083#action_198083 ] 

Stevo Slavic edited comment on ARCHETYPE-220 at 11/15/09 8:03 AM:
------------------------------------------------------------------

One can already with 2.0-alpha-4 use archetypes from secured (https) repositories, not by specifying archetypeCatalog URL parameter, but by specifying archetypeRepository URL parameter. It is undocumented at the moment, but after 2.0-alpha-4 code analysis, I found that archetype plugin, if archetypeRepository parameter is provided, internally creates ArchetypeRepository instance with URL equal to archetypeRepository parameter value, and with id equal to "%artifactId%-repo" where %artifactId% is the value of archetypeArtifactId parameter. To provide credentials one has to adjust either global or user settings.xml file, by adding server definition with id equal to this calculated artifact repository id, and with appropriate credentials.

Problem is that if one was to use N different artifacts (with different artifactId) from same repository, one would have to define N server definitions in settings.xml which is not nice at all.

To fix this problem, I've extended archetype plugin with additional archetypeRepositoryId parameter which can be passed together with archetypeRepository (URL) parameter. If archetypeRepositoryId is configured together with archetypeRepository then plugin will construct and use ArchetypeRepository with id equal to archetypeRepositoryId parameter value. If only archetypeRepository is configured, plugin will work as before (so change is backwards compatible), setting ArchetypeRepository id to "%artifactId%-repo".

Attached is proposed patch ( org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch ) with fix described above. No new unit nor integration tests are included - existing ones all pass.

Documentation should be updated too with appropriate example.

      was (Author: sslavic):
    One can already with 2.0-alpha-4 use archetypes from secured (https) repositories, not by specifying archetypeCatalog URL parameter, but by specifying archetypeRepository URL parameter. It is undocumented at the moment, but after 2.0-alpha-4 code analysis, I found that archetype plugin, if archetypeRepository parameter is provided, internally creates ArchetypeRepository instance with URL equal to archetypeRepository parameter value, and with id equal to "%artifactId%-repo" where %artifactId% is the value of archetypeArtifactId parameter. To provide credentials one has to adjust either global or user settings.xml file, by adding server definition with id equal to this calculated artifact repository id, and with appropriate credentials.

Problem is that if one was to use N different artifacts (with different artifactId) from same repository, one would have to define N server definitions in settings.xml which is not nice at all.

To fix this problem, I've extended archetype plugin with additional archetypeRepositoryId parameter which can be passed together with archetypeRepository (URL) parameter. If archetypeRepositoryId is configured together with archetypeRepository then plugin will construct and use ArchetypeRepository with id equal to archetypeRepositoryId parameter value. If only archetypeRepository is configured, plugin will work as before (so change is backwards compatible), setting ArchetypeRepository id to "%artifactId%-repo".

Attached is proposed patch with fix described above. No new unit nor integration tests are included - existing ones all pass.

Documentation should be updated too with appropriate example.
  
> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Archetypes
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Priority: Minor
>         Attachments: https.patch, org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

-- 
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: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

Posted by "Torben Knerr (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/ARCHETYPE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=213197#action_213197 ] 

Torben Knerr commented on ARCHETYPE-220:
----------------------------------------

with the https.patch applied you can use the following workaround:

{{... -DarchetypeCatalog=https://user:pass@acme.com/repo/archetype-catalog.xml ...}}

> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Archetypes
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Priority: Minor
>         Attachments: https.patch, org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

-- 
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: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

Posted by "Stevo Slavic (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/ARCHETYPE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=198361#action_198361 ] 

Stevo Slavic commented on ARCHETYPE-220:
----------------------------------------

Because one needs to provide credentials for such URL, and AFAIK standard way in Maven2 for providing (plugin) repository credentials is via server definition in settings.xml which would have id matching to (plugin) repository id.

> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Archetypes
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Priority: Minor
>         Attachments: https.patch, org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

-- 
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] Updated: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

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

Olivier Lamy updated ARCHETYPE-220:
-----------------------------------

    Fix Version/s: 2.1
         Assignee: Olivier Lamy

> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Assignee: Olivier Lamy
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: https.patch, org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

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

Rich Seddon commented on ARCHETYPE-220:
---------------------------------------


Agreed that the need to properly handle authentication is necessary for https sometimes, but there are a lot of times when it isn't needed.

Many public repositories nowadays which serve unauthenticated content over https, some examples:

https://repository.jboss.org/nexus/content/groups/developer/archetype-catalog.xml
https://maven.atlassian.com/content/groups/public/archetype-catalog.xml
https://repository.sonatype.org/content/groups/forge/archetype-catalog.xml

This is also an extremely common setup for repository managers in corporate environments. 



> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Priority: Minor
>         Attachments: https.patch, org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

Posted by "Stevo Slavic (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/ARCHETYPE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=198361#action_198361 ] 

Stevo Slavic edited comment on ARCHETYPE-220 at 12/20/09 6:57 PM:
------------------------------------------------------------------

Because one typically needs to provide credentials for such URL, and AFAIK standard way in Maven2 for providing (plugin) repository credentials is via server definition in settings.xml which would have id matching to (plugin) repository id.

      was (Author: sslavic):
    Because one needs to provide credentials for such URL, and AFAIK standard way in Maven2 for providing (plugin) repository credentials is via server definition in settings.xml which would have id matching to (plugin) repository id.
  
> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Archetypes
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Priority: Minor
>         Attachments: https.patch, org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

-- 
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] Updated: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

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

Stevo Slavic updated ARCHETYPE-220:
-----------------------------------

    Attachment: org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch

One can already with 2.0-alpha-4 use archetypes from secured (https) repositories, not by specifying archetypeCatalog URL parameter, but by specifying archetypeRepository URL parameter. It is undocumented at the moment, but after 2.0-alpha-4 code analysis, I found that archetype plugin, if archetypeRepository parameter is provided, internally creates ArchetypeRepository instance with URL equal to archetypeRepository parameter value, and with id equal to "%artifactId%-repo" where %artifactId% is the value of archetypeArtifactId parameter. To provide credentials one has to adjust either global or user settings.xml file, by adding server definition with id equal to this calculated artifact repository id, and with appropriate credentials.

Problem is that if one was to use N different artifacts (with different artifactId) from same repository, one would have to define N server definitions in settings.xml which is not nice at all.

To fix this problem, I've extended archetype plugin with additional archetypeRepositoryId parameter which can be passed together with archetypeRepository (URL) parameter. If archetypeRepositoryId is configured together with archetypeRepository then plugin will construct and use ArchetypeRepository with id equal to archetypeRepositoryId parameter value. If only archetypeRepository is configured, plugin will work as before (so change is backwards compatible), setting ArchetypeRepository id to "%artifactId%-repo".

Attached is proposed patch with fix described above. No new unit nor integration tests are included - existing ones all pass.

Documentation should be updated too with appropriate example.

> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Archetypes
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Priority: Minor
>         Attachments: org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

-- 
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] Updated: (ARCHETYPE-220) Unable to access remote catalogs on HTTPS protocol, even with redirection

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

Herve Boutemy updated ARCHETYPE-220:
------------------------------------

    Component/s:     (was: Archetypes)
                 Generator

> Unable to access remote catalogs on HTTPS protocol, even with redirection
> -------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-220
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-220
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 2.0-alpha-4
>         Environment: Any (Windows, Linux)
>            Reporter: Josep F. Barranco
>            Priority: Minor
>         Attachments: https.patch, org.apache.maven.archetype.maven-archetype-ARCHETYPE-220.patch
>
>
> I use that test:
> 1 - Create an "archetype-catalog.xml" and set it on your apache "htdocs" directory
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" works fine.
> 2 - Configure your apache to use certificates and allow SSL (port 443) to access to same archetype catalog file
>    Executing "mvn archetype:generate -DarchetypeCatalog=https://localhost" does not work. (it shows default catalog)
>    It seems that stating with "https://" does not match with allowed parameter values (local, internal, file:, http:)
> 3 - Anyway, try to redirect your working HTTP access to HTTPS (configure rewrite engine on Apache) as workaround to access you SSL catalog.
>    Executing "mvn archetype:generate -DarchetypeCatalog=http://localhost" (same as step 1) IS NOT WORKING!!!  (it shows empty catalog)
> There's no way to access an archetype-catalog.xml located on a SSL url ?

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