針對報錯
17:47:13,705 ERROR [org.jboss.as.server.deployment.scanner] (Deploymen
tScanner-threads - 1) JBAS015010: The deployment scanner found a direc
tory named WEB-INF that was not inside a directory whose name ends wit
h .ear, .jar, .rar, .sar or .war. This is likely the result of unzippi
ng an archive directly inside the D:\resp\jboss-as-7.1.1.Final\standal
one\deployments directory, which is a user error. The WEB-INF director
y will not be scanned for deployments, but it is possible that the sca
nner mayfind other files from the unzipped archive and attempt to depl
oy them, leading to errors.
以應用文件夾app爲例,部署步驟如下
將應用文件夾"jboss-as-7.0.0.Final\jboss-as-7.0.0.Final\standalone\deployments",
重命名工程文件夾爲 app.war,並新建文件app.war.dodeploy。
更改"jboss-as-7.0.0.Final\jboss-as-7.0.0.Final\standalone\configuration\standalone.xml"文件的deployment-scanner元素,增加auto-deploy-exploded="true",改爲 <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" auto-deploy-exploded="true"/>
重啓jboss即可。