Uploaded image for project: 'Maven Archetype'
  1. Maven Archetype
  2. ARCHETYPE-438

Remove support for specifying catalogs through direct URLs

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: Generator
    • Labels:
      None
    • Environment:
      n/a

      Description

      It is currently possible to specify a archetype catalog through a file: or http: URL (via the archetypeCatalog param). This adds the possibility to go outside of the configured Maven infrastructure which causes problems and unpredicted side-effects.
      I strongly argue that the plugin should work with the Maven settings and infrastructure in place and not allow for going outside of this. For example, in a setup where there is a Maven repo manager in place, it should always be used and the user should not be allowed to side-step it through the support of the plugin. If an additional source should be used, it should be setup properly in the Maven configuration/infrastructure.
      I also believe the current support is a legacy from the old days when the catalog at central was not complete, but one had to used additional catalogs in the Internet.

        Issue Links

          Activity

          Hide
          rfscholte Robert Scholte added a comment -
          Show
          rfscholte Robert Scholte added a comment - Fixed in 93318023353fd1a90f9a0b554dffd90f6de0cb56
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-archetype-m3 #251 (See https://builds.apache.org/job/maven-archetype-m3/251/)
          ARCHETYPE-438 Remove support for specifying catalogs through direct (rfscholte: rev 93318023353fd1a90f9a0b554dffd90f6de0cb56)

          • (edit) archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetypeManager.java
          • (edit) maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/generation/DefaultArchetypeSelector.java
          • (edit) maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java
          • (edit) archetype-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java
          • (edit) archetype-common/src/main/java/org/apache/maven/archetype/source/LocalCatalogArchetypeDataSource.java
          • (edit) archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeManager.java
          • (edit) archetype-common/src/main/java/org/apache/maven/archetype/source/InternalCatalogArchetypeDataSource.java
          • (edit) archetype-common/src/test/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSourceTest.java
          • (edit) archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSource.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-archetype-m3 #251 (See https://builds.apache.org/job/maven-archetype-m3/251/ ) ARCHETYPE-438 Remove support for specifying catalogs through direct (rfscholte: rev 93318023353fd1a90f9a0b554dffd90f6de0cb56) (edit) archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetypeManager.java (edit) maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/generation/DefaultArchetypeSelector.java (edit) maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateProjectFromArchetypeMojo.java (edit) archetype-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java (edit) archetype-common/src/main/java/org/apache/maven/archetype/source/LocalCatalogArchetypeDataSource.java (edit) archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeManager.java (edit) archetype-common/src/main/java/org/apache/maven/archetype/source/InternalCatalogArchetypeDataSource.java (edit) archetype-common/src/test/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSourceTest.java (edit) archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSource.java
          Hide
          shyrkov Sergiy Shyrkov added a comment -

          Hello,

          isn't this change considered as a regression in functionality in version 3.0.0 (see ARCHETYPE-519)?
          Basically, the "Generate project using an alternative catalog" example (http://maven.apache.org/archetype/maven-archetype-plugin/examples/generate-alternative-catalog.html) is no longer working with version 3.0.0.

          Thank you in advance!

          Kind regards
          Sergiy

          Show
          shyrkov Sergiy Shyrkov added a comment - Hello, isn't this change considered as a regression in functionality in version 3.0.0 (see ARCHETYPE-519 )? Basically, the "Generate project using an alternative catalog" example ( http://maven.apache.org/archetype/maven-archetype-plugin/examples/generate-alternative-catalog.html ) is no longer working with version 3.0.0. Thank you in advance! Kind regards Sergiy
          Hide
          rfscholte Robert Scholte added a comment -

          It is an intended change, so I wouldn't call it regression. I missed this page, so it needs to be updated.
          You can no longer refer to http: or file:, only local, remote and interna are valid.
          I hope that removing is good enough to make it work, otherwise try adding a repository with id archetype. There you specify the URL and you can also start using credentials if you want.

          Show
          rfscholte Robert Scholte added a comment - It is an intended change, so I wouldn't call it regression. I missed this page, so it needs to be updated. You can no longer refer to http: or file: , only local , remote and interna are valid. I hope that removing is good enough to make it work, otherwise try adding a repository with id archetype . There you specify the URL and you can also start using credentials if you want.
          Hide
          fbricon Fred Bricon added a comment -

          I wish I had seen that change way earlier so that I could express my concerns about it :

          • m2e depends on this to allow users to create projects from arbitrary repos (I personally use that heavily)
          • this represents a regression in a major version without prior warning (there was no deprecation phase AFAICT)
          Show
          fbricon Fred Bricon added a comment - I wish I had seen that change way earlier so that I could express my concerns about it : m2e depends on this to allow users to create projects from arbitrary repos (I personally use that heavily) this represents a regression in a major version without prior warning (there was no deprecation phase AFAICT)
          Hide
          hboutemy Hervé Boutemy added a comment - - edited

          Fred Bricon if you have serious concerns, don't hesitate to create a Jira issue and argue
          or better: join the discussion on maven-dev https://lists.apache.org/thread.html/7f4d65fe71b412afd07eb82dc44aa5b65ba0125ddbc28ad279cd110b@%3Cdev.maven.apache.org%3E

          Show
          hboutemy Hervé Boutemy added a comment - - edited Fred Bricon if you have serious concerns, don't hesitate to create a Jira issue and argue or better: join the discussion on maven-dev https://lists.apache.org/thread.html/7f4d65fe71b412afd07eb82dc44aa5b65ba0125ddbc28ad279cd110b@%3Cdev.maven.apache.org%3E

            People

            • Assignee:
              rfscholte Robert Scholte
              Reporter:
              afloom Anders Hammar
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development