Maven Install Plugin
  1. Maven Install Plugin
  2. MINSTALL-70

install-file should take the version from the parent if the version for the artifact is missing in the POM

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: install:install-file
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Spring Source seems to release POM which have no version. According to the Maven philosophy this means that they inherit their parent's version.

      However, if I try
      mvn install:install-file -Dfile=spring-ldap-core-1.3.0.RELEASE.jar -DpomFile=pom.xml

      I get

      [INFO] Scanning for projects...
      [INFO] Searching repository for plugin with prefix: 'install'.
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Spring LDAP Core
      [INFO] task-segment: [install:install-file] (aggregator-style)
      [INFO] ------------------------------------------------------------------------
      [INFO] [install:install-file

      Unknown macro: {execution}

      ]
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] An invalid artifact was detected.

      This artifact might be in your project's POM, or it might have been included transitively during the resolution process. Here is the information we do have for this artifact:

      o GroupID: org.springframework.ldap
      o ArtifactID: spring-ldap-core
      o Version: <<< MISSING >>>
      o Type: pom

      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.apache.maven.artifact.InvalidArtifactRTException: For artifact

      Unknown macro: {org.springframework.ldap}

      : The version cannot be empty.

      The POM looks like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <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/maven-v4_0_0.xsd">

      <parent>
      <groupId>org.springframework.ldap</groupId>
      <artifactId>spring-ldap-parent</artifactId>
      <version>1.3.0.RELEASE</version>
      </parent>
      <modelVersion>4.0.0</modelVersion>
      <artifactId>spring-ldap-core</artifactId>
      <packaging>jar</packaging>
      <name>Spring LDAP Core</name>

      <build>
      ...

        Issue Links

          Activity

          Hide
          Benjamin Bentmann added a comment -

          This looks like a duplicate of MINSTALL-55 so can you provide the debug logs of the above command to verify that you were actually using plugin version 2.3 and not something older?

          Show
          Benjamin Bentmann added a comment - This looks like a duplicate of MINSTALL-55 so can you provide the debug logs of the above command to verify that you were actually using plugin version 2.3 and not something older?
          Hide
          Eric Lewis added a comment -

          Here's the output from mvn:help effective-pom

          $ mvn help:effective-pom
          [INFO] Scanning for projects...
          [INFO] Searching repository for plugin with prefix: 'help'.
          [INFO] artifact org.apache.maven.plugins:maven-help-plugin: checking for updates from Codehaus
          [INFO] ------------------------------------------------------------------------
          [INFO] Building Spring LDAP Core
          [INFO] task-segment: [help:effective-pom] (aggregator-style)
          [INFO] ------------------------------------------------------------------------
          [INFO] [help:effective-pom

          {execution: default-cli}

          ]
          [INFO]
          Effective POMs, after inheritance, interpolation, and profiles are applied:

          <?xml version="1.0" encoding="UTF-8"?>
          <!-- ====================================================================== -->
          <!-- -->
          <!-- Generated by Maven Help Plugin on 9/16/09 5:04 PM -->
          <!-- See: http://maven.apache.org/plugins/maven-help-plugin/ -->
          <!-- -->
          <!-- ====================================================================== -->

          <!-- ====================================================================== -->
          <!-- -->
          <!-- Effective POM for project -->
          <!-- 'org.springframework.ldap:spring-ldap-core:jar:1.3.0.RELEASE' -->
          <!-- -->
          <!-- ====================================================================== -->

          <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>
          <parent>
          <artifactId>spring-ldap-parent</artifactId>
          <groupId>org.springframework.ldap</groupId>
          <version>1.3.0.RELEASE</version>
          </parent>
          <groupId>org.springframework.ldap</groupId>
          <artifactId>spring-ldap-core</artifactId>
          <version>1.3.0.RELEASE</version>
          <name>Spring LDAP Core</name>
          <scm>
          ...

          Show
          Eric Lewis added a comment - Here's the output from mvn:help effective-pom $ mvn help:effective-pom [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'help'. [INFO] artifact org.apache.maven.plugins:maven-help-plugin: checking for updates from Codehaus [INFO] ------------------------------------------------------------------------ [INFO] Building Spring LDAP Core [INFO] task-segment: [help:effective-pom] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] [help:effective-pom {execution: default-cli} ] [INFO] Effective POMs, after inheritance, interpolation, and profiles are applied: <?xml version="1.0" encoding="UTF-8"?> <!-- ====================================================================== --> <!-- --> <!-- Generated by Maven Help Plugin on 9/16/09 5:04 PM --> <!-- See: http://maven.apache.org/plugins/maven-help-plugin/ --> <!-- --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- --> <!-- Effective POM for project --> <!-- 'org.springframework.ldap:spring-ldap-core:jar:1.3.0.RELEASE' --> <!-- --> <!-- ====================================================================== --> <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> <parent> <artifactId>spring-ldap-parent</artifactId> <groupId>org.springframework.ldap</groupId> <version>1.3.0.RELEASE</version> </parent> <groupId>org.springframework.ldap</groupId> <artifactId>spring-ldap-core</artifactId> <version>1.3.0.RELEASE</version> <name>Spring LDAP Core</name> <scm> ...
          Hide
          Benjamin Bentmann added a comment - - edited

          That's not what I asked for. You either need to tell the Maven version being used or attach the output of "mvn install:install-file ... > debug.log".

          Or, just try mvn org.apache.maven.plugins:maven-install-plugin:2.3:install-file ..., i.e. explicitly select the version that is known to work.

          Show
          Benjamin Bentmann added a comment - - edited That's not what I asked for. You either need to tell the Maven version being used or attach the output of "mvn install:install-file ... > debug.log". Or, just try mvn org.apache.maven.plugins:maven-install-plugin:2.3:install-file ... , i.e. explicitly select the version that is known to work.
          Hide
          Eric Lewis added a comment -

          Sorry for that! I was using 2.2 without knowing.

          Show
          Eric Lewis added a comment - Sorry for that! I was using 2.2 without knowing.

            People

            • Assignee:
              Benjamin Bentmann
              Reporter:
              Eric Lewis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: