You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Chris Hilton (JIRA)" <ji...@codehaus.org> on 2006/11/14 20:09:31 UTC

[jira] Created: (MDEP-49) Can't unpack multiple classifiers from same artifact; "already unpacked"

Can't unpack multiple classifiers from same artifact; "already unpacked"
------------------------------------------------------------------------

                 Key: MDEP-49
                 URL: http://jira.codehaus.org/browse/MDEP-49
             Project: Maven 2.x Dependency Plugin
          Issue Type: Bug
    Affects Versions: 1.0
            Reporter: Chris Hilton
         Assigned To: Brian Fox


A plugin configuration like this does not work:

      <plugin>      
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>dependency-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-resources-apphome</id>
            <phase>generate-resources</phase>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>com.example</groupId>
                  <artifactId>MyProject</artifactId>
                  <version>5.0-SNAPSHOT</version>
                  <classifier>someFiles</classifier>
                  <type>zip</type>
                  <outputDirectory>target/dir1</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>com.example</groupId>
                  <artifactId>MyProject</artifactId>
                  <version>5.0-SNAPSHOT</version>
                  <classifier>otherFiles</classifier>
                  <type>zip</type>
                  <outputDirectory>target/dir2</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
            <goals>
              <goal>unpack</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

The otherFiles.zip file is never unpacked to dir2 and the conole output states:

    [INFO] MyProject-5.0-SNAPSHOT-otherFiles.zip already unpacked.

When actually it was the someFiles.zip that was already unpacked.

-- 
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

        

[jira] Closed: (MDEP-49) Can't unpack multiple classifiers from same artifact; "already unpacked"

Posted by "Chris Hilton (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MDEP-49?page=all ]

Chris Hilton closed MDEP-49.
----------------------------

       Resolution: Fixed
    Fix Version/s: 2.0-alpha-1

Already fixed in the new version.

> Can't unpack multiple classifiers from same artifact; "already unpacked"
> ------------------------------------------------------------------------
>
>                 Key: MDEP-49
>                 URL: http://jira.codehaus.org/browse/MDEP-49
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Chris Hilton
>         Assigned To: Brian Fox
>             Fix For: 2.0-alpha-1
>
>
> A plugin configuration like this does not work:
>       <plugin>      
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>dependency-maven-plugin</artifactId>
>         <executions>
>           <execution>
>             <id>generate-resources-apphome</id>
>             <phase>generate-resources</phase>
>             <configuration>
>               <artifactItems>
>                 <artifactItem>
>                   <groupId>com.example</groupId>
>                   <artifactId>MyProject</artifactId>
>                   <version>5.0-SNAPSHOT</version>
>                   <classifier>someFiles</classifier>
>                   <type>zip</type>
>                   <outputDirectory>target/dir1</outputDirectory>
>                 </artifactItem>
>                 <artifactItem>
>                   <groupId>com.example</groupId>
>                   <artifactId>MyProject</artifactId>
>                   <version>5.0-SNAPSHOT</version>
>                   <classifier>otherFiles</classifier>
>                   <type>zip</type>
>                   <outputDirectory>target/dir2</outputDirectory>
>                 </artifactItem>
>               </artifactItems>
>             </configuration>
>             <goals>
>               <goal>unpack</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
> The otherFiles.zip file is never unpacked to dir2 and the conole output states:
>     [INFO] MyProject-5.0-SNAPSHOT-otherFiles.zip already unpacked.
> When actually it was the someFiles.zip that was already unpacked.

-- 
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

        

[jira] Commented: (MDEP-49) Can't unpack multiple classifiers from same artifact; "already unpacked"

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-49?page=comments#action_80159 ] 
            
Brian Fox commented on MDEP-49:
-------------------------------

Can you try this with org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-1-snapshot? The code has been refactored and I believe the marker now uses the classifer too.

> Can't unpack multiple classifiers from same artifact; "already unpacked"
> ------------------------------------------------------------------------
>
>                 Key: MDEP-49
>                 URL: http://jira.codehaus.org/browse/MDEP-49
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Chris Hilton
>         Assigned To: Brian Fox
>
> A plugin configuration like this does not work:
>       <plugin>      
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>dependency-maven-plugin</artifactId>
>         <executions>
>           <execution>
>             <id>generate-resources-apphome</id>
>             <phase>generate-resources</phase>
>             <configuration>
>               <artifactItems>
>                 <artifactItem>
>                   <groupId>com.example</groupId>
>                   <artifactId>MyProject</artifactId>
>                   <version>5.0-SNAPSHOT</version>
>                   <classifier>someFiles</classifier>
>                   <type>zip</type>
>                   <outputDirectory>target/dir1</outputDirectory>
>                 </artifactItem>
>                 <artifactItem>
>                   <groupId>com.example</groupId>
>                   <artifactId>MyProject</artifactId>
>                   <version>5.0-SNAPSHOT</version>
>                   <classifier>otherFiles</classifier>
>                   <type>zip</type>
>                   <outputDirectory>target/dir2</outputDirectory>
>                 </artifactItem>
>               </artifactItems>
>             </configuration>
>             <goals>
>               <goal>unpack</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
> The otherFiles.zip file is never unpacked to dir2 and the conole output states:
>     [INFO] MyProject-5.0-SNAPSHOT-otherFiles.zip already unpacked.
> When actually it was the someFiles.zip that was already unpacked.

-- 
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

        

[jira] Commented: (MDEP-49) Can't unpack multiple classifiers from same artifact; "already unpacked"

Posted by "Chris Hilton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-49?page=comments#action_80174 ] 
            
Chris Hilton commented on MDEP-49:
----------------------------------

I tried it with the new snapshot version and it did indeed work fine. Don't you love those kinds of bugs?

I also tried the overwrite flag and even the markerFile property found in the old documentation, but got the "no setters" error for them and, looking at the Javadoc, it does indicate that there are no setters for those properties in ArtifactItem. So I'll stick with the above workaround for now.

> Can't unpack multiple classifiers from same artifact; "already unpacked"
> ------------------------------------------------------------------------
>
>                 Key: MDEP-49
>                 URL: http://jira.codehaus.org/browse/MDEP-49
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Chris Hilton
>         Assigned To: Brian Fox
>
> A plugin configuration like this does not work:
>       <plugin>      
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>dependency-maven-plugin</artifactId>
>         <executions>
>           <execution>
>             <id>generate-resources-apphome</id>
>             <phase>generate-resources</phase>
>             <configuration>
>               <artifactItems>
>                 <artifactItem>
>                   <groupId>com.example</groupId>
>                   <artifactId>MyProject</artifactId>
>                   <version>5.0-SNAPSHOT</version>
>                   <classifier>someFiles</classifier>
>                   <type>zip</type>
>                   <outputDirectory>target/dir1</outputDirectory>
>                 </artifactItem>
>                 <artifactItem>
>                   <groupId>com.example</groupId>
>                   <artifactId>MyProject</artifactId>
>                   <version>5.0-SNAPSHOT</version>
>                   <classifier>otherFiles</classifier>
>                   <type>zip</type>
>                   <outputDirectory>target/dir2</outputDirectory>
>                 </artifactItem>
>               </artifactItems>
>             </configuration>
>             <goals>
>               <goal>unpack</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
> The otherFiles.zip file is never unpacked to dir2 and the conole output states:
>     [INFO] MyProject-5.0-SNAPSHOT-otherFiles.zip already unpacked.
> When actually it was the someFiles.zip that was already unpacked.

-- 
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

        

[jira] Commented: (MDEP-49) Can't unpack multiple classifiers from same artifact; "already unpacked"

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-49?page=comments#action_80160 ] 
            
Brian Fox commented on MDEP-49:
-------------------------------

btw, you should also be able to specify the overWrite flag to force the unpacking instead of adding a second execution.

> Can't unpack multiple classifiers from same artifact; "already unpacked"
> ------------------------------------------------------------------------
>
>                 Key: MDEP-49
>                 URL: http://jira.codehaus.org/browse/MDEP-49
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Chris Hilton
>         Assigned To: Brian Fox
>
> A plugin configuration like this does not work:
>       <plugin>      
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>dependency-maven-plugin</artifactId>
>         <executions>
>           <execution>
>             <id>generate-resources-apphome</id>
>             <phase>generate-resources</phase>
>             <configuration>
>               <artifactItems>
>                 <artifactItem>
>                   <groupId>com.example</groupId>
>                   <artifactId>MyProject</artifactId>
>                   <version>5.0-SNAPSHOT</version>
>                   <classifier>someFiles</classifier>
>                   <type>zip</type>
>                   <outputDirectory>target/dir1</outputDirectory>
>                 </artifactItem>
>                 <artifactItem>
>                   <groupId>com.example</groupId>
>                   <artifactId>MyProject</artifactId>
>                   <version>5.0-SNAPSHOT</version>
>                   <classifier>otherFiles</classifier>
>                   <type>zip</type>
>                   <outputDirectory>target/dir2</outputDirectory>
>                 </artifactItem>
>               </artifactItems>
>             </configuration>
>             <goals>
>               <goal>unpack</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
> The otherFiles.zip file is never unpacked to dir2 and the conole output states:
>     [INFO] MyProject-5.0-SNAPSHOT-otherFiles.zip already unpacked.
> When actually it was the someFiles.zip that was already unpacked.

-- 
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

        

[jira] Commented: (MDEP-49) Can't unpack multiple classifiers from same artifact; "already unpacked"

Posted by "Chris Hilton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MDEP-49?page=comments#action_80157 ] 
            
Chris Hilton commented on MDEP-49:
----------------------------------

Priority should be reduced to minor as I've found the following workaround. Specify the second artifact in a separate execution element and add the <unpackMarkersDirectory> element to the second configuration that points to a different directory (i.e. not target\maven-dependency-plugin-markers).


> Can't unpack multiple classifiers from same artifact; "already unpacked"
> ------------------------------------------------------------------------
>
>                 Key: MDEP-49
>                 URL: http://jira.codehaus.org/browse/MDEP-49
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Chris Hilton
>         Assigned To: Brian Fox
>
> A plugin configuration like this does not work:
>       <plugin>      
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>dependency-maven-plugin</artifactId>
>         <executions>
>           <execution>
>             <id>generate-resources-apphome</id>
>             <phase>generate-resources</phase>
>             <configuration>
>               <artifactItems>
>                 <artifactItem>
>                   <groupId>com.example</groupId>
>                   <artifactId>MyProject</artifactId>
>                   <version>5.0-SNAPSHOT</version>
>                   <classifier>someFiles</classifier>
>                   <type>zip</type>
>                   <outputDirectory>target/dir1</outputDirectory>
>                 </artifactItem>
>                 <artifactItem>
>                   <groupId>com.example</groupId>
>                   <artifactId>MyProject</artifactId>
>                   <version>5.0-SNAPSHOT</version>
>                   <classifier>otherFiles</classifier>
>                   <type>zip</type>
>                   <outputDirectory>target/dir2</outputDirectory>
>                 </artifactItem>
>               </artifactItems>
>             </configuration>
>             <goals>
>               <goal>unpack</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
> The otherFiles.zip file is never unpacked to dir2 and the conole output states:
>     [INFO] MyProject-5.0-SNAPSHOT-otherFiles.zip already unpacked.
> When actually it was the someFiles.zip that was already unpacked.

-- 
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