Maven Ant Tasks
  1. Maven Ant Tasks
  2. MANTTASKS-67

artifact:deploy - The name of deploying element in snapshot repository is wrong

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.6, 2.0.7
    • Fix Version/s: 2.0.8
    • Component/s: deploy task
    • Labels:
      None
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      The zip file contains test with Ant.
      To launch it : ant test.
      I try to deploy a snapshot artifact in repository
      So, my pom.xml contains a version with the extension '-SNAPSHOT'
      And in my build file Ant i do this :
      <artifact:deploy file="lib/$

      {pom.artifactId}.jar">
      <remoteRepository url="file:./repository" />
      <pom refid="pom" />
      </artifact:deploy>

      In the repository the name of the artifact is <artifactId><version>SNAPSHOT.<packaging> instead of <artifactId><version><date>.<time><buildNumber><packaging>


      Another problem, i try to upload 2 attachments with my artifact (javadoc and java-source), and the buildNumber in the meta-data.xml increment by 3 instead of 1
      <artifact:deploy file="lib/${pom.artifactId}

      .jar">
      <remoteRepository url="file:./repository" />
      <pom refid="pom" />
      <attach file="./lib/$

      {pom.artifactId}-src.jar" type="java-source"/>
      <attach file="./lib/${pom.artifactId}

      -api.zip" type="javadoc"/>
      </artifact:deploy>
      You can test it with : ant testWithAttach

        Issue Links

          Activity

          Hide
          Herve Boutemy added a comment -

          this seem to be a duplicate from MANTTASKS-23

          Show
          Herve Boutemy added a comment - this seem to be a duplicate from MANTTASKS-23
          Herve Boutemy made changes -
          Field Original Value New Value
          Link This issue duplicates MANTTASKS-23 [ MANTTASKS-23 ]
          Hide
          David N'DIAYE added a comment -

          I'm sorry, it is my first jira, and i'm newby with your formatting notation.
          I can't modify my description, so i copy it in this comment with a good format :


          – The zip file contains test with Ant. To launch it : ant test.


          I try to deploy a snapshot artifact in repository
          – my pom.xml contains a version with the extension '-SNAPSHOT'
          – in my build file Ant i do this :

          <artifact:deploy file="lib/${pom.artifactId}.jar">
             <remoteRepository url="file:./repository" />
             <pom refid="pom" />
          </artifact:deploy>
          

          In the repository the name of the artifact is

          <artifactId>-<version>-SNAPSHOT.<packaging>  <!-- Wrong Format --> 

          instead of

          <artifactId>-<version>-<date>.<time>-<buildNumber>-<packaging>

          Another problem, i try to upload 2 attachments with my artifact (javadoc and java-source), and the buildNumber in the maven-metadata.xml increment by 3 instead of 1

          <artifact:deploy file="lib/${pom.artifactId}.jar">
             <remoteRepository url="file:./repository" />
             <pom refid="pom" />
             <attach file="./lib/${pom.artifactId}-src.jar" type="java-source"/>
             <attach file="./lib/${pom.artifactId}-api.zip" type="javadoc"/>
          </artifact:deploy>

          You can test it with : ant testWithAttach.

          Show
          David N'DIAYE added a comment - I'm sorry, it is my first jira, and i'm newby with your formatting notation. I can't modify my description, so i copy it in this comment with a good format : – The zip file contains test with Ant. To launch it : ant test. I try to deploy a snapshot artifact in repository – my pom.xml contains a version with the extension '-SNAPSHOT' – in my build file Ant i do this : <artifact:deploy file= "lib/${pom.artifactId}.jar" > <remoteRepository url= "file:./repository" /> <pom refid= "pom" /> </artifact:deploy> In the repository the name of the artifact is <artifactId> - <version> -SNAPSHOT. <packaging> <!-- Wrong Format --> instead of <artifactId> - <version> - <date> . <time> - <buildNumber> - <packaging> Another problem, i try to upload 2 attachments with my artifact ( javadoc and java-source ), and the buildNumber in the maven-metadata.xml increment by 3 instead of 1 <artifact:deploy file= "lib/${pom.artifactId}.jar" > <remoteRepository url= "file:./repository" /> <pom refid= "pom" /> <attach file= "./lib/${pom.artifactId}-src.jar" type= "java-source" /> <attach file= "./lib/${pom.artifactId}-api.zip" type= "javadoc" /> </artifact:deploy> You can test it with : ant testWithAttach.
          Hide
          David N'DIAYE added a comment -

          I haven't see the MANTTASKS-23, and i create a copy of it.

          But my case contains an Ant testCase, and i find another problem with attachment.

          Show
          David N'DIAYE added a comment - I haven't see the MANTTASKS-23 , and i create a copy of it. But my case contains an Ant testCase, and i find another problem with attachment.
          Herve Boutemy made changes -
          Component/s deploy task [ 12845 ]
          Hide
          Herve Boutemy added a comment - - edited

          Here is a fix for the attachment numbering problem.

          For x-SNAPSHOT vs x-<date>.<time>-<buildNumber>, it's a question of supporting whether uniqueVersion="false" or uniqueVersion="true": such configuration support is a feature added in MANTTASKS-23

          Show
          Herve Boutemy added a comment - - edited Here is a fix for the attachment numbering problem. For x-SNAPSHOT vs x-<date>.<time>-<buildNumber>, it's a question of supporting whether uniqueVersion="false" or uniqueVersion="true": such configuration support is a feature added in MANTTASKS-23
          Herve Boutemy made changes -
          Attachment MANTTASKS-67.diff [ 28616 ]
          Herve Boutemy made changes -
          Patch Submitted [Yes]
          Fix Version/s 2.0.8 [ 13618 ]
          Affects Version/s 2.0.7 [ 13521 ]
          Herve Boutemy made changes -
          Attachment MANTTASKS-67.diff [ 28616 ]
          Herve Boutemy made changes -
          Attachment MANTTASKS-67.diff [ 28624 ]
          Herve Boutemy made changes -
          Assignee Herve Boutemy [ hboutemy ]
          Original Estimate 0 minutes [ 0 ]
          Description The zip file contains test with Ant.
          To launch it : ant test.

          I try to deploy a snapshot artifact in repository
          So, my pom.xml contains a version with the extension '-SNAPSHOT'
          And in my build file Ant i do this :
              <artifact:deploy file="lib/${pom.artifactId}.jar">
                 <remoteRepository url="file:./repository" />
                 <pom refid="pom" />
             </artifact:deploy>

          In the repository the name of the artifact is <artifactId>-<version>-SNAPSHOT.<packaging> instead of <artifactId>-<version>-<date>.<time>-<buildNumber>-<packaging>


          Another problem, i try to upload 2 attachments with my artifact (javadoc and java-source), and the buildNumber in the meta-data.xml increment by 3 instead of 1
              <artifact:deploy file="lib/${pom.artifactId}.jar">
                 <remoteRepository url="file:./repository" />
                 <pom refid="pom" />
                 <attach file="./lib/${pom.artifactId}-src.jar" type="java-source"/>
                 <attach file="./lib/${pom.artifactId}-api.zip" type="javadoc"/>
             </artifact:deploy>
          You can test it with : ant testWithAttach

          The zip file contains test with Ant.
          To launch it : ant test.
          I try to deploy a snapshot artifact in repository
          So, my pom.xml contains a version with the extension '-SNAPSHOT'
          And in my build file Ant i do this :
              <artifact:deploy file="lib/${pom.artifactId}.jar">
                 <remoteRepository url="file:./repository" />
                 <pom refid="pom" />
             </artifact:deploy>

          In the repository the name of the artifact is <artifactId><version>-SNAPSHOT.<packaging> instead of <artifactId><version><date>.<time><buildNumber>-<packaging>


          Another problem, i try to upload 2 attachments with my artifact (javadoc and java-source), and the buildNumber in the meta-data.xml increment by 3 instead of 1
              <artifact:deploy file="lib/${pom.artifactId}.jar">
                 <remoteRepository url="file:./repository" />
                 <pom refid="pom" />
                 <attach file="./lib/${pom.artifactId}-src.jar" type="java-source"/>
                 <attach file="./lib/${pom.artifactId}-api.zip" type="javadoc"/>
             </artifact:deploy>
          You can test it with : ant testWithAttach
          Remaining Estimate 0 minutes [ 0 ]
          Herve Boutemy made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]

            People

            • Assignee:
              Herve Boutemy
              Reporter:
              David N'DIAYE
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: