[英]What changes to be made in standalone.xml file to exclude a particular directory from getting auto deployed in JBoss Server[Wildfly 9xx]
I have a requirement in WildFly server to stop auto deploying the directory if there are any changes in the file. 如果文件中有任何更改,我在WildFly服务器中要求停止自动部署目录。 The problem is I want to exclude a particular folder from getting auto deployed,not the whole directory . 问题是我想从自动部署中排除特定文件夹,而不是整个目录 。
I tried to add another deployment scanner same as the default one by changing the path but didn't succeed.Please suggest me what changes to be made in standalone.xml. 我试图通过更改路径来添加与默认部署扫描器相同的另一部署扫描器,但没有成功。请建议我在standalone.xml中进行哪些更改。 Thanks in advance. 提前致谢。
default deployment scanner 默认部署扫描器
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="1" auto-deploy-zipped="true" auto-deploy-exploded="true" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
</subsystem>
new deployment scanner added 添加了新的部署扫描器
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
<deployment-scanner path="deployments/demo/dist" relative-to="jboss.server.base.dir" scan-interval="1" auto-deploy-zipped="false" auto-deploy-exploded="false" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
</subsystem>
Getting this Exception 获取此异常
12:01:26,611 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
at org.jboss.as.server.ServerService.boot(ServerService.java:347)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[165,62]
Message: WFLYCTL0069: Duplicate subsystem declaration
at org.jboss.as.server.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:1195)
at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_4(StandaloneXml.java:457)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:144)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:106)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
You've got two subsystems now called deployment-scanner
. 您现在有了两个名为deployment-scanner
子系统。 You only need one subsystem entry. 您只需要一个子系统条目。
I'd also advise you to use the web console or CLI to add a new deployment scanner. 我也建议您使用Web控制台或CLI添加新的部署扫描程序。 With CLI the command would look something like the following. 使用CLI,该命令将类似于以下内容。
/subsystem=deployment-scanner/scanner=custom:add(path=deployments/demo/dist, relative-to=jboss.server.base.dir, scan-interval=1, auto-deploy-zipped=false, auto-deploy-exploded=false, runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.