copyResource

Copies a binary template without performing any template processing.

The most common use of this tag is to move binary files such as images and jars into projects created by patterns.


Tag Summary
 
required <copyResource template="value" resource="value" />
 
full tag <copyResource template="value" resource="value" location="value" project="value" binary="value" />

Required Attributes
 
template The project relative path name of the source of the copy action. This would be the same value used by the start and include tags.
resource The path of the file to be created by the copy action. If the target directory contains Java source then the path should be relative to the source folder. Otherwise, the path should be the project relative path.

Optional Attributes
 
location Indicates where the source file can be found and can be one of three values: "pattern", "source" and "target". A location of "pattern" means the source file can be found in the pattern (project or .patzip file). A location of "source" means the source file is in the project containing the primary input, or "appdef", file. A "target" location means the source file is located in the current target project which is the default project when the project attribute is not specified on a start tag. Note that the target project can be changed with the targetProject tag.
project The name of the project in which the source file is to be copied.
binary Indicates whether the file contents are binary

Example
 
<copyResource
        template="/binary/refresh.ico"
        resource="/icons/refresh.ico"
        location="pattern"
        project="%plugin(project-name)%"
        binary="true" />

This copyResource tag will copy a file named refresh.ico in directory /binary to create a new file named /icons/refresh.ico. The name of the project into which the file is copied is taken from the value of the project-name attribute on the model element associated with the variable name "plugin". The source file will be taken from the pattern project if the pattern is in an Eclipse project or it will be found in the .patzip file if the pattern has been exported. Either way, the file contents are specified as being binary.


© Copyright IBM Corporation 2000, 2006. All Rights Reserved.