当前位置:  开发笔记 > 编程语言 > 正文

如何从WildFly取消部署所有工件?

如何解决《如何从WildFly取消部署所有工件?》经验,为你挑选了1个好方法。

我正在开发一个Web应用程序并将其(使用IntelliJ)部署到WildFly 10.1。我最近将我的webapp模块重命名,这将我的war文件从重命名foo.warbar.war。每次启动时,都会出现以下错误:

12:24:15,899 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."foo_war_exploded.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."foo_war_exploded.war".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "foo_war_exploded.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0160: Failed to mount deployment content
    at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:95)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
    ... 5 more
Caused by: java.io.FileNotFoundException: /.../foo_war_exploded (No such file or directory)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.(FileInputStream.java:138)
    at org.jboss.vfs.spi.RootFileSystem.openInputStream(RootFileSystem.java:51)
    at org.jboss.vfs.VirtualFile.openStream(VirtualFile.java:318)
    at org.jboss.vfs.VFS.mountZipExpanded(VFS.java:533)
    at org.jboss.as.server.deployment.DeploymentMountProvider$Factory$ServerDeploymentRepositoryImpl.mountDeploymentContent(DeploymentMountProvider.java:108)
    at org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:91)
    ... 6 more
...
[2017-04-23 12:24:18,957] Artifact bar:war exploded: Artifact is deployed successfully

请注意,部署(和取消部署)重命名的战争工作正常。我只是不能取消部署旧战争的剩余物。

如何取消部署WildFly中的所有工件以重新开始?



1> Jens Piegsa..:

您在这里有多种选择:

    通过Maven

    添加wildfly插件参数matchPatternmatchPatternStrategypom.xml的部分

    
        org.wildfly.plugins
        wildfly-maven-plugin
        
            
            (foo|bar).war
            all
        
    
    

    (不幸的是,没有预定义的相应CLI属性)

    并从控制台运行

    mvn wildfly:undeploy -Dwildfly.hostname=XXX -Dwildfly.port=9993 -Dwildfly.username=XXX -Dwildfly.password=XXX -Dwildfly.protocol=https-remoting

    (或在您的IDE中设置等效的运行配置

    通过WildFly命令行界面(CLI)

    jboss-cli -c controller=https-remoting://XXX:9993 -u=XXX

    输入您的密码,然后

    undeploy(通过按来发现工件TAB

    通过WildFly Web管理界面

    拜访 https://XXX:9993/console/App.html#standalone-deployments

    选择工件,然后从下拉菜单中选择“删除”

推荐阅读
拾味湖
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有