dependency plugin has trouble recognizing that a dependency is in the repo when 
you specify a classifier
--------------------------------------------------------------------------------------------------------

                 Key: MNG-2880
                 URL: http://jira.codehaus.org/browse/MNG-2880
             Project: Maven 2
          Issue Type: Bug
          Components: Plugins and Lifecycle
    Affects Versions: 2.0.5
            Reporter: David Jencks


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to