Hi, Did you put this plugin configuration in pluginManagement section ?
2010/1/12 skanatiker <[email protected]>: > > Thanks a lot for your quick reply, but unfortunately the file is still not > being overwritten. Any other ideas? > > > Entner Harald wrote: >> >> Hi, >> >> >> try to set the ${maven.resources.overwrite} property. >> >> Eg. >> >> <properties> >> <maven.resources.overwrite>true</maven.resources.overwrite> >> </properties> >> >> Even this means that all resources are overwritten. >> >> I haven't tested the solution, so it is not sure that it is working that >> way (even i'm pretty sure) >> >> regards, harald >> >> -----Ursprüngliche Nachricht----- >> Von: skanatiker [mailto:[email protected]] >> Gesendet: Dienstag, 12. Januar 2010 14:33 >> An: [email protected] >> Betreff: copy resources does not overwrite existing files >> >> >> 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? >> >> -- >> View this message in context: >> http://old.nabble.com/copy-resources-does-not-overwrite-existing-files-tp27127591p27127591.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> >> > > -- > View this message in context: > http://old.nabble.com/copy-resources-does-not-overwrite-existing-files-tp27127591p27127925.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Olivier --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
