Uploaded image for project: 'Maven Deploy Plugin'
  1. Maven Deploy Plugin
  2. MDEPLOY-223

maven deploy-file do not evaluate ci friendly variables from pom.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.8.2
    • None
    • deploy:deploy-file
    • None
    • Maven 3.5.0, Java 1.8, Linux

    Description

      Sample command:

      ./mvnw deploy:deploy-file -Drevision=100 -Durl=file:///tmp/maven/ -DrepositoryId=foo-nexus -DpomFile=pom.xml -Dfile=target/foo-stubs.jar   -Dclassifier=stubs
      

      Version and other meta information should be read from pom.xml:

          <groupId>foo</groupId>
          <artifactId>foo</artifactId>
          <version>${revision}-SNAPSHOT</version>
          <packaging>jar</packaging>
      

      And partially they are, but uploaded version is not:

      [INFO] Building foo 100
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- maven-deploy-plugin:2.8.2:deploy-file (default-cli) @ git ---
      [INFO] Uploading: http://foo.com//nexus/repository/maven-snapshot/foo/$%7Brevision%7D/foo-$%7Brevision%7D-stubs.jar
      [INFO] Uploading: http://foo/nexus/repository/maven-snapshot/foo/$%7Brevision%7D/foo-$%7Brevision%7D.pom
      

      Additionally, when -Dversion is provided from command line, then uploaded pom.xml is still invalid:

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>foo</groupId>
      <artifactId>foo</artifactId>
      <version>${revision}-SNAPSHOT</version>
      

      What is expected?

      Ci friendly variables like revision should be evaluated and used in upload url and pom.xml.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mariuszs Mariusz Smykuła
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: