[ https://issues.apache.org/jira/browse/MINSTALL-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17965954#comment-17965954 ]
Olivier Lamy commented on MINSTALL-70: -------------------------------------- This project has moved from Jira to GitHub Issues. This issue was migrated to [apache/maven-install-plugin#183|https://github.com/apache/maven-install-plugin/issues/183]. > install-file should take the version from the parent if the version for the > artifact is missing in the POM > ---------------------------------------------------------------------------------------------------------- > > Key: MINSTALL-70 > URL: https://issues.apache.org/jira/browse/MINSTALL-70 > Project: Maven Install Plugin (Moved to GitHub Issues) > Issue Type: Bug > Components: install:install-file > Affects Versions: 2.2 > Reporter: Eric Lewis > Assignee: Benjamin Bentmann > Priority: Major > > 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 > {quote} > [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 {execution: default-cli}] > [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 > {org.springframework.ldap:spring-ldap-core:null:pom}: The version cannot be > empty. > {quote} > The POM looks like this: > {quote} > <?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> > ... > {quote} -- This message was sent by Atlassian Jira (v8.20.10#820010)