Hi,

i want to copy a resource. That works fine, as long as the file does not exist 
in the target directory. But in this case the file has to exist in the target 
directory and has to be overwritten. Here are the two relevant parts of my 
pom.xml:

Integration of Resources-Plugin:

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.4.1</version>
</plugin>


Build-Configuration:

<build>
        <resources>
                <resource>
                        <directory>conf/${env}</directory>
                        <targetPath >../app/pages/global/</targetPath>
                        <includes>
                                <include>part.jspx</include>
                        </includes>
                </resource>
        </resources>
...

I've found out that an overwrite parameter exists, but I have no idea where to 
put this parameter 
(http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#overwrite).

I tried:

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
                <overwrite>true</overwrite>
      </configuration>
</plugin>

Or:

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
                <resources>
                        <overwrite>true</overwrite>
                </resources>
       </configuration>
</plugin>


In the first case the build process works fine, but the file is not being 
overwritten. In the second case the following error occurs:

------------------------------------------
Instead of configuring this parameter directly, try configuring your POM or 
settings.xml file.

Using the default-value and expression annotations built into the mojo itself, 
these values were found in your build:

Value: null
Using the expression:null

Value: null
Using the expression:null

If one of the above expressions rendered a valid value, it may give some 
indication of which part of the POM or settings.xml you can modify in order to 
change this parameter's value.
-------------------------------------------

How do I configure the overwritte parameter correctly?

___________________________________________________

IPS Software GmbH | Isaac-Fulda-Allee 9 | 55124 Mainz
Fon. +49 (6131) 37577 -0 | Fax. +49 (6131) 37577 -55 
mailto: [email protected] | www.ipsways.com

IPSWAYS - information people software -
IPS Software  IPS Projects  IPS Services
___________________________________________________

Handelsregister Mainz: HRB 3963
USt-IdNr. DE 149054424
Gesch?ftsf?hrer: Klaus Schlitt / Klaus-D. Steidl


Diese e-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte  
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese  e-Mail 
irrtuemlich erhalten haben informieren Sie bitte sofort den  Absender und 
vernichten Sie diese e-Mail. Das unerlaubte Kopieren  sowie die unbefugte 
Weitergabe dieser e-Mail ist nicht gestattet.
-
This e-mail contains confidential and/or proprietary information. If you are 
not the intended recipient or if you received the e-Mail  by mistake we ask you 
to notify the sender immediately and destroy  this e-Mail. The unauthorized 
reproduction or distribution of this  e-Mail is prohibited.

_-_-_-_

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to