Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-2880

error message for artifacts with classifiers doesn't instruct user to install with classier

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.5
    • 2.0.7
    • Errors
    • None

    Description

      Brian Fox suggested opening this jira after an irc discussion.

      I'm trying to manipulate a zip (or tgz) distribution for my own evil purposes.

      I installed it in my local maven repo using the command maven suggested:

      mvn install:install-file -DgroupId=org.apache.roller -DartifactId=roller -Dversion=3.1-rc6 -Dpackaging=zip -Dfile=roller-war/apache-roller-3.1-rc6.zip

      it ended up:
      $ ls ~/.m2/repository/org/apache/roller/roller/3.1-rc6/roller-3.1-rc6.zip
      /Users/david/.m2/repository/org/apache/roller/roller/3.1-rc6/roller-3.1-rc6.zip

      I'm trying to unpack it with the dependency plugin:

      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-dependency-plugin</artifactId>
      <executions>

      <execution>
      <id>unpack-distribution</id>
      <phase>generate-resources</phase>
      <goals>
      <goal>unpack</goal>
      </goals>
      <configuration>
      <artifactItems>
      <artifactItem>
      <groupId>org.apache.roller</groupId>
      <artifactId>roller</artifactId>
      <classifier>bin</classifier>
      <type>zip</type>
      <version>3.1-rc6</version>
      </artifactItem>
      </artifactItems>
      <outputDirectory>${project.build.directory}/scratch</outputDirectory>
      </configuration>
      </execution>
      </executions>
      </plugin>

      and maven complains it can't find it:

      [INFO] Failed to resolve artifact.

      GroupId: org.apache.roller
      ArtifactId: roller
      Version: 3.1-rc6

      Reason: System is offline.

      Try downloading the file manually from the project website.

      Then, install it using the command:
      mvn install:install-file -DgroupId=org.apache.roller -DartifactId=roller \
      -Dversion=3.1-rc6 -Dpackaging=zip -Dfile=/path/to/file

      org.apache.roller:roller:zip:3.1-rc6

      It turns out that if I remove the <classifier>bin</classifier> line from the dependency plugin config then maven can find the file.

      Attachments

        Activity

          People

            brianf Brian E Fox
            djencks David Jencks
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: