Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-306

archetypes downloaded are not downloaded with their poms

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      1

      Description

      the archetype artifacts in local repository that are downloaded by the plugin don't contain the archetype's pom file.
      that becomes a problem when one attempts to index the local repository (using maven-repository-indexer). For teh archetypes one doesn't get the name and description indexed (as these are taken from the pom).

        Issue Links

          Activity

          Hide
          Lóránt Pintér added a comment -

          Allows the DefaultDownloader to also download the POM file whenever an archetype is requested. Modified test cases to include basic POM files for everything.

          One curious thing I could not solve is this assertion in DefaultRepositoryCrawlerTest:

                  assertTrue (
                      ( 5 <= result.getArchetypes ().size () )
                      && ( result.getArchetypes ().size () >= 7 )
                  );
          

          This checks the size of the result twice, first to see if it is larger than or equal to 5, then if it is larger than or equal to 7. This failed for me all the time, so I changed it to the more logical:

                  assertTrue (
                      ( 5 <= result.getArchetypes ().size () )
                      && ( result.getArchetypes ().size () <= 7 )
                  );
          

          ...where the number of archetypes should be between 5..7. Was this a typo previously maybe?

          Show
          Lóránt Pintér added a comment - Allows the DefaultDownloader to also download the POM file whenever an archetype is requested. Modified test cases to include basic POM files for everything. One curious thing I could not solve is this assertion in DefaultRepositoryCrawlerTest: assertTrue ( ( 5 <= result.getArchetypes ().size () ) && ( result.getArchetypes ().size () >= 7 ) ); This checks the size of the result twice, first to see if it is larger than or equal to 5, then if it is larger than or equal to 7. This failed for me all the time, so I changed it to the more logical: assertTrue ( ( 5 <= result.getArchetypes ().size () ) && ( result.getArchetypes ().size () <= 7 ) ); ...where the number of archetypes should be between 5..7. Was this a typo previously maybe?
          Hide
          Herve Boutemy added a comment -

          patch applied in r1001441
          yes, you found a typo in a unit test that is now fixed (on my computer, the test was not failing)

          thank you

          Show
          Herve Boutemy added a comment - patch applied in r1001441 yes, you found a typo in a unit test that is now fixed (on my computer, the test was not failing) thank you

            People

            • Assignee:
              Herve Boutemy
              Reporter:
              Milos Kleint
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: