• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Maven dependancy unpack

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a assembly that I unpack over the target of another project. If there are duplicate files then I don't want the unpack to overwrite the file in question. I would have thought setting <overWrite>false</overWrite> would have prevented this, but it doesn't seem the case.

This is the configuration I am using, any help would be appreciated

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>compile</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>test.test</groupId>
<artifactId>base</artifactId>
<version>2.4.0-SNAPSHOT</version>
<classifier>war-fragment</classifier>
<outputDirectory>target/${project.build.finalName}</outputDirectory>
<overWrite>false</overWrite>
</artifactItem>
</artifactItems>
<overWriteIfNewer>false</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the dependency plugin the right one to use in this case?
 
David Gibson
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a dependency and I need to unpack the contents into a directory that contains other files. If a file exists in the directory and also exists in the dependency then I want the directory version. Having spent a long time browsing the internet to find a solution, this gave me the nearest result. I would have thought that my requirement of unpacking a dependency but not overwriting existing files would be fulfilled by maven-dependency-plugin:unpack with the overWrite config set to false, but I must be mistaken. If you know of an alternative way then please let me know, I am all ears

 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you specifying the latest dependency plugin?
 
David Gibson
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are using Maven Dependency Plugin 2.1
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Only thing I can suggest is to check their JIRA and/or raise the bug on their mailing list.
 
reply
    Bookmark Topic Watch Topic
  • New Topic