Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-142

catalog default location problem in CrawlRepositoryMojo

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.0-alpha-2
    • Fix Version/s: 2.0-alpha-5
    • Component/s: Plugin
    • Labels:
      None
    • Number of attachments :
      0

      Description

      the default repository location is $HOME/.m2/repository but this is also used as the the default place to create the new archetype-catalog.xml file.
      The archetype-catalog.xml should be created in $HOME/.m2 instead.

        Activity

        Hide
        Raphaël Piéroni added a comment -

        The default location is not $HOME/.m2/repository, but it is in the same directory as the one crawled.

        The purpose for this default value is that the crawl mojo aims to be used to maintain repositories HTTP accessible.

        It is probably the default location for the local catalog that should be modified.

        Show
        Raphaël Piéroni added a comment - The default location is not $HOME/.m2/repository, but it is in the same directory as the one crawled. The purpose for this default value is that the crawl mojo aims to be used to maintain repositories HTTP accessible. It is probably the default location for the local catalog that should be modified.
        Hide
        Tim Reilly added a comment -

        > It is probably the default location for the local catalog that should be modified
        Is this a possibility to change the default location for the local catalog?

        My inclination is to run archetype:crawl and then archetype:generate and see the results of the crawl - but since crawl and generate are looking in different locations locally I'd assumed there was a bug.

        Show
        Tim Reilly added a comment - > It is probably the default location for the local catalog that should be modified Is this a possibility to change the default location for the local catalog? My inclination is to run archetype:crawl and then archetype:generate and see the results of the crawl - but since crawl and generate are looking in different locations locally I'd assumed there was a bug.
        Hide
        Raphaël Piéroni added a comment -

        > Is this a possibility to change the default location for the local catalog?
        Yes.

        There are two methods to do this:

        1. mvn archetype:crawl -Dcatalog=/home/username/.m2/archetype-catalog.xml ; mvn archetype:generate -DarchetypeCatalog=local

        or

        2. mvn archetype:crawl ; mvn arhetype:generate -DarchetypeCatalog=file:///home/username/.m2/repository/archetype-catalog.xml

        Show
        Raphaël Piéroni added a comment - > Is this a possibility to change the default location for the local catalog? Yes. There are two methods to do this: 1. mvn archetype:crawl -Dcatalog=/home/username/.m2/archetype-catalog.xml ; mvn archetype:generate -DarchetypeCatalog=local or 2. mvn archetype:crawl ; mvn arhetype:generate -DarchetypeCatalog= file:///home/username/.m2/repository/archetype-catalog.xml
        Hide
        Raphaël Piéroni added a comment -

        This is not a bug as the way to use it is explained in the last comment

        Show
        Raphaël Piéroni added a comment - This is not a bug as the way to use it is explained in the last comment

          People

          • Assignee:
            Unassigned
            Reporter:
            tom nelson
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: