This plugin provides support for including resources in ClassPath. These
resources are stored in other source directories than the compilation source
directory compile.sources.directory
(default to java/
).
<plugin name="resources"> <attribute name="resources.directories" value="conf"/> </plugin>
When the plugin is declared, the files available in the list of
resources.directories
for a module are copied into classes/
when
compile.module
is invoked. The exclusion filter compile.resources.excludes
is applied. Of course, files are included in jar files according to the
execution unit filters.
When a module resource directory does not exist, it is ignored without any warning.
resources.copy.module
copies the resources files for a given
module. This target is automatically invoked after the target compile
(hook post.compile.[module]
).
resources.directories
is the list (comma separated) of optional
directories to consider as resources in a module.
The Eclipse plugin manages the directories declared in resources.directories
as source directories. But the directory is declared in .project
only if it
exists when the project configuration is done. If you add a new resource
directory in a module, you have to force a new project configuration with
ant configure
and to refresh concerned Eclipse projects.