Uploaded image for project: 'Maven Ant Plugin (RETIRED)'
  1. Maven Ant Plugin (RETIRED)
  2. MANT-63

get phase uses snapshot repo for non-snapshot dependencies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • 2.3
    • None
    • None

    Description

      Create dummy Maven project using mvn archetype:generate

      mvn ant:ant

      Generated script contains the following, which is correct:

      <get src="http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar" 
           dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar" 
           usetimestamp="false" 
           ignoreerrors="true"/>
      

      Now add the following to the POM:

      <parent>
        <groupId>org.apache</groupId>
        <artifactId>apache</artifactId>
        <version>9</version>
      </parent>
      

      mvn ant:ant

      now generates:

          <get src="http://repository.apache.org/snapshots/junit/junit/3.8.1/junit-3.8.1.jar" 
               dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar" 
               usetimestamp="false" 
               ignoreerrors="true"/>
          <get src="http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar" 
               dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar" 
               usetimestamp="false" 
               ignoreerrors="true"/>
      

      which means that the script will generate an error for the download.

      The generated script should only generate one download, based on whether the version is a SNAPSHOT or not.

      Attachments

        Activity

          People

            rfscholte Robert Scholte
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: