你怎么能加上&引用;作为使用jboss cli的模块的资源根?
我不确定是否有办法使用jboss cli实现我想要的功能,所以希望得到确认 如果我使用jboss cli连接到EAP并运行此命令以添加模块:你怎么能加上&引用;作为使用jboss cli的模块的资源根?,jboss,jboss-cli,Jboss,Jboss Cli,我不确定是否有办法使用jboss cli实现我想要的功能,所以希望得到确认 如果我使用jboss cli连接到EAP并运行此命令以添加模块: [standalone@localhost:9999 /] module add --name="test" --resources="." Failed to locate C:\EAP-6.4.0\bin\"." module add命令应使用以下元素创建module.xml: 描述似乎与行为相符,所以在求助于sed之前,只需确认没有“jbossc
[standalone@localhost:9999 /] module add --name="test" --resources="."
Failed to locate C:\EAP-6.4.0\bin\"."
module add命令应使用以下元素创建module.xml:
描述似乎与行为相符,所以在求助于sed之前,只需确认没有“jbosscli”方法
谢谢。在JBoss EAP 7.2上(也可能在JBoss的其他版本上),可以通过提前创建module.xml文件并使用带有--module xml选项的“module add”来显式指定module.xml文件来实现
下面是一个示例,它创建一个由单个属性文件组成的模块,创建module.xml文件,然后将该模块添加到JBoss:
% mkdir /tmp/module-src
% cd /tmp/module-src
% echo hello=bonjour > example.properties
% cat > module.xml
<module xmlns="urn:jboss:module:1.1" name="test">
<resources>
<resource-root path="."/>
</resources>
<dependencies>
% jboss-cli.sh --command="module add --resources=example.properties --module-xml=module.xml --name=test"
%mkdir/tmp/module src
%cd/tmp/模块src
%echo hello=bonjour>example.properties
%cat>module.xml
%jboss-cli.sh--command=“模块添加--resources=example.properties--module xml=module.xml--name=test”
这将创建模块目录,将模块文件(带有resource root path=“.”)复制到模块目录中,并将指定的资源复制到模块目录中。使用CLI似乎不可能做到这一点。如果您愿意,可以在此处提交增强请求。
--resources - (used with add, required unless module-xml is used) a list of
filesystem paths (usually jar files) separated by a
filesystem-specific path separator, i.e.
java.io.File.pathSeparatorChar. The file(s) specified will be
copied to the created module's directory.
% mkdir /tmp/module-src
% cd /tmp/module-src
% echo hello=bonjour > example.properties
% cat > module.xml
<module xmlns="urn:jboss:module:1.1" name="test">
<resources>
<resource-root path="."/>
</resources>
<dependencies>
% jboss-cli.sh --command="module add --resources=example.properties --module-xml=module.xml --name=test"