Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-81

Archetype not downloaded until pom is placed in working dir

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.0-alpha-4
    • Fix Version/s: 2.0-alpha-5
    • Component/s: Plugin
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Our archetype is hosted internally in the company repository.
      Our settings.xml contains profiles with the internal repository locations.

      I mkdir C:\temp\archtest
      I execute mvn archetype:create -D.... etc
      I get "could not download archetype ... from central

      Next I put a valid pom.xml in the working dir
      I execute mvn archetype:create -D etc
      I get an expected error since the directory is not empty, but now if I check my local repository the archetype is downloaded from the company repository. !! Why wasn't it found until a pom.xml is in the directory?
      Now I delete the pom.xml
      Now I can build sucessfully.

      It would appear the profiles where we define our repositories are not being used until the pom.xml is available. But even mvn -P archetype:create doesn't resolve the issue.

        Activity

        Hide
        Tim Reilly added a comment -

        This is a known issue in maven not using profile repositories in settings as I've learned since opening this jira. A close duplicate: ARCHETYPE-89

        "A workaround is usable: the archetype:add-repositories goal
        that takes -DrepositoryId=central and -DrepositoryUrl=http://repo1.maven.org/maven2 properties
        or -Drepositories=central=http://repo1.maven.org/maven2,company1=http://repo1.company.com property"

        I am tempted to close this issue as a duplicate, but will leave it for now in case any comitters are tracking from it.

        Show
        Tim Reilly added a comment - This is a known issue in maven not using profile repositories in settings as I've learned since opening this jira. A close duplicate: ARCHETYPE-89 "A workaround is usable: the archetype:add-repositories goal that takes -DrepositoryId=central and -DrepositoryUrl= http://repo1.maven.org/maven2 properties or -Drepositories=central= http://repo1.maven.org/maven2,company1=http://repo1.company.com property" I am tempted to close this issue as a duplicate, but will leave it for now in case any comitters are tracking from it.
        Hide
        RaphaŽl Piťroni added a comment -

        Hi Tim,

        could you please try with the new archetype:generate goal using
        the 2.0-alpha-4 version of the plugin, to see if it is not to be closed
        by obsolescence.

        Show
        RaphaŽl Piťroni added a comment - Hi Tim, could you please try with the new archetype:generate goal using the 2.0-alpha-4 version of the plugin, to see if it is not to be closed by obsolescence.
        Hide
        Tim Reilly added a comment -

        Hi RaphaŽl,

        I didn't leave you with no reply. I was hoping to get to this this week. I may get to it this weekend, but next week is more likely. Will let you know. Thank you

        Show
        Tim Reilly added a comment - Hi RaphaŽl, I didn't leave you with no reply. I was hoping to get to this this week. I may get to it this weekend, but next week is more likely. Will let you know. Thank you
        Hide
        MickaŽl Leduque added a comment -

        I have this with maven 2.0.8 and archetype-plugin 2.0-alpha-4.

        Show
        MickaŽl Leduque added a comment - I have this with maven 2.0.8 and archetype-plugin 2.0-alpha-4.
        Hide
        RaphaŽl Piťroni added a comment -

        Hi MichaŽl,

        Can you please give the execution trace of what you have (including the command line you typed)

        Thanks,

        Show
        RaphaŽl Piťroni added a comment - Hi MichaŽl, Can you please give the execution trace of what you have (including the command line you typed) Thanks,
        Hide
        Tim Reilly added a comment -

        FYI - I tested with 2.0.9 and I no longer have the issue. MickaŽl can you try with a 2.0.9 installation and confirm?

        Show
        Tim Reilly added a comment - FYI - I tested with 2.0.9 and I no longer have the issue. MickaŽl can you try with a 2.0.9 installation and confirm?
        Hide
        RaphaŽl Piťroni added a comment -

        Thanks to Tim Reilly.
        This is issue is closed by obsolescence.

        Show
        RaphaŽl Piťroni added a comment - Thanks to Tim Reilly. This is issue is closed by obsolescence.

          People

          • Assignee:
            Unassigned
            Reporter:
            Tim Reilly
          • Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: