[ 
http://jira.codehaus.org/browse/MDEP-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=214835#action_214835
 ] 

Ruediger Dreier commented on MDEP-225:
--------------------------------------

I do not know how I can use the files/project/test in src/IT/unpack - I do not 
know how the validate.bsh file is used (looks like Java code) and the pom.xml 
alone does not work (<version>@project.version@</version> causes problems). If 
you can give me any hints how this works I will be happy to supply a better 
integration test for my proposed fix.

So I try to explain in more detail how I can reproduce the behaviour.
I have two projects (both build on one Windows XP PC), one creates an artifact 
(as SNAPSHOT version), the other uses the artifact as dependency and unpacks it 
using the following pom:

<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";>
        <modelVersion>4.0.0</modelVersion>
        <groupId>de.bdal.test.maven.result.plugin</groupId>
        <artifactId>test</artifactId>
        <version>0.0.1-SNAPSHOT</version>

        <properties>
                <reader.version>0.0.1-SNAPSHOT</reader.version>
        </properties>

        <dependencies>
                <dependency>
                        <groupId>de.bdal.reader</groupId>
                        <artifactId>mock</artifactId>
                        <version>${reader.version}</version>
                        <classifier>binaries</classifier>
                        <type>zip</type>
                </dependency>
        </dependencies>

        <build>
                <plugins>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-dependency-plugin</artifactId>
                                <executions>
                                        <execution>
                                                <phase>process-resources</phase>
                                                <goals>
                                                        
<goal>unpack-dependencies</goal>
                                                </goals>
                                                <configuration>
                                                        
<includeTypes>zip</includeTypes>
                                                        
<outputDirectory>./target/References</outputDirectory>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>

                </plugins>
        </build>
</project>

I first build the first project (mvn deploy). Then the second project (mvn 
install) - it unpacks the dependency, the marker file get the current date/time.
When I build the second project again (mvn install), I get 
"mock-0.0.1-SNAPSHOT-binaries.zip already exists in destination." and does not 
unpack - that's fine.
Then I build the first project again (mvn deploy).
Then, when I build the second project (mvn -U install; -U to make sure I get 
the newest version of SNAPSHOTs), it unpacks the new build of the dependency, 
but DOES NOT UPDATE THE MARKER FILE TIMESTAMP (on Windows using Sun's JRE1.6u18 
File.createNewFile does NOT update the timestamp of an existing file - I am not 
sure about other operating systems). 
Them all subsequent calls of mvn install (second project) will unpack the 
dependency again.


> Dependency plugin seems to unpack archive even, if it is already unpacked
> -------------------------------------------------------------------------
>
>                 Key: MDEP-225
>                 URL: http://jira.codehaus.org/browse/MDEP-225
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: unpack
>    Affects Versions: 2.1
>            Reporter: Jason Chaffee
>            Assignee: Brian Fox
>         Attachments: MDEP-225.patch, MDEP-225.patch
>
>
> The plugin used to be smart about not unpacking archives if it found the 
> archive was already unpacked (maybe I was doing something different than..not 
> sure).  However, now it unpacks the archive every time, no matter what I try 
> to keep it from doing it, including using overwriteIfNewer.
> I would like to be able to run the build once to extract the archive, then 
> not have it extracted again, unless I clean the target directory because the 
> archive takes several minutes to unpack.
> Here are the steps.
> 1) configure unpack in pom
> 2) run mvn clean install --> expect unpacking
> 3) run mvn install --> do not expect unpacking as it is still unpaced from 
> step (2)

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