]
Brian Stansberry commented on WFCORE-1628:
------------------------------------------
You can also have two params --resources and --absolute-resources (or some name like that)
with the latter being used for absolute paths. That allows a mix and is less typing for
the case where all resources are absolute.
Create module using 'module add' CLI command with
absolute-path in resource-root element
----------------------------------------------------------------------------------------
Key: WFCORE-1628
URL:
https://issues.jboss.org/browse/WFCORE-1628
Project: WildFly Core
Issue Type: Enhancement
Components: CLI
Reporter: Martin Simka
Assignee: Alexey Loubyansky
MODULES-218, included in WildFly 10/WildFly Core 2.0.10, allows absolute paths to be used
for resource-roots in module.xml. But there is no way to create module with absolute paths
in resource-roots using CLI command {{module add}}.
{quote}
resource-root's path previously only allowed resources within the module's
directory, e.g.:
<resource-root path="wildfly-controller-2.2.0.CR2.jar"/>
With MODULES-218 it allows resources to exist anywhere on the filesystem, in the form of
an absolute path, e.g.:
<resource-root
path="/Users/whoever/mymodules/wildfly-controller-2.2.0.CR2.jar"/>
{quote}
{{module add}} command could have optional argument {{--copy-resources=(true|false)}}
with default {{true}}, which would specify how new module will look like.
* {{true}} copy files to the created module's directory = no change from how it works
now.
* {{false}} don't copy files and use absolute paths in {{resource-root}} instead.
Another option could be to add optional argument without value, which would only specify
to not copy files to the created module's directory and use absolute paths in
{{resource-root}} instead. Name of this argument could be something like
{{--use-absolute-paths-for-resources}}.