...
Option Name | Notes | Optional | Default Value |
---|---|---|---|
file | This specifies the path to the file that should be used. Can also specify a directory path if a whole directory needs to be copied over. | no | n/a |
todir | This specified the name the directory that the file should be copied to relative to the configurations home. | yes | The configuration home root |
tofile | This specified the name the file to where it should be copied relative to the configurations home. This path variable can also be used to specify both the directory and file name. | yes | The file name of the original file |
configfile | This specifies if the file being copied is a configuration file or not. This determines whether token replacement should be applied to the file. | yes | false |
overwrite | This specifies if the file should overwrite a file if it already exists | yes | true |
Example:
file | todir | tofile | destination file (relative to standalone configuration root) | ||
---|---|---|---|---|---|
/tmp/server.xml | conf |
| conf/server.xml | ||
/tmp/server.xml | conf/server.xml | conf/server.xml | |||
/tmp/server.xml | conf | server-2.xml | conf/server-2.xml | ||
/tmp/server.xml |
|
| server.xml |
Usage
Example pom.xml fragment of how to use custom file configuration.s
Note in this example if (customMessage) is set in any of the files with configfile=true it will be replaced with "Hello World" when it gets copied to the standalone server's directory.
Code Block | ||||
---|---|---|---|---|
| ||||
<build> <plugins> <plugin> <groupId>org.codehaus.cargo.maven2<maven3</groupId> <artifactId>cargo-maven2maven3-plugin</artifactId> <configuration> <container> <containerId>tomcat5x</containerId> </container> <configuration> <files> <copy> <file>/tmp/server.xml</file> <tofile>conf/server.xml</tofile> <configfile>true</configfile> <overwrite>true</overwrite> </copy> </files> <properties> <customMessage>Hello World</customMessage> </properties> </configuration> </configuration> </plugin> </plugins> </build> |
...