2017-04-23 39 views
2

我正在開發一個Web應用程序並將其(使用IntelliJ)部署到WildFly 10.1。我最近重命名了我的webapp模塊,這導致我將war文件從foo.war重命名爲bar.war。我每次啓動時,我得到這個錯誤:如何取消部署WildFly中的所有工件?

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.<init>(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中的所有工件以重新開始?

回答

3

你有多種選擇這裏:

  1. 通過Maven的

    <plugin> 
        <groupId>org.wildfly.plugins</groupId> 
        <artifactId>wildfly-maven-plugin</artifactId> 
        <configuration> 
         <!-- use regular expressions here --> 
         <matchPattern>(foo|bar).war</matchPattern> 
         <matchPatternStrategy>all</matchPatternStrategy> 
        </configuration> 
    </plugin> 
    

    • 在部分<project><build><plugins>的wildfly插件參數matchPatternmatchPatternStrategy添加到您的pom.xml

      (不幸的是沒有預定義的相應的CLI屬性)

    • 和從控制檯(在IDE或設置的等效運行配置)運行

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

  2. via WildFly命令行界面(CLI)

    • (按TAB發現文物)通過
  3. WildFly運行jboss-cli -c controller=https-remoting://XXX:9993 -u=XXX

  4. 輸入您的密碼,然後
  5. undeploy Web管理界面

    • 訪問例如https://XXX:9993/console/App.html#standalone-deployments
    • 選擇神器,然後從下拉菜單中
+0

感謝 '刪除'。在我的情況下,WildFly管理端口是「9990」而不是「9993」。如果其他人正在尋找它,當WildFly啓動時的輸出提到它是「檢測到的服務器管理端口:9990」。 –

+1

@GeoffreyDeSmet'9993'是默認的https端口,'9990'是默認的http。 –

+0

啊,啓動過程中這個警告可能解釋了爲什麼我在'9993'上沒有'https'服務:'WARN [org.jboss.as.domain.management.security](MSC服務線程1-5)WFLYDM0111:Keystore /.../wildfly-10.1.0.Final/standalone/configuration/application.keystore未找到,它將在首次使用時自動生成,併爲主機localhost的自簽名證書 –

相關問題