How do I undeploy all artifacts from WildFly?

这一生的挚爱 提交于 2019-12-04 10:07:46

You have multiple options here:

  1. via Maven:

    • add the wildfly plugin parameters matchPattern and matchPatternStrategy to your pom.xml in the section <project><build><plugins>:

      <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>
      

      (unfortunately there are no predefined corresponding CLI properties)

    • and run from a console

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

      (or setup an equivalent run configuration in your IDE)

  2. via WildFly Command Line Interface (CLI):

    • run jboss-cli -c controller=https-remoting://XXX:9993 -u=XXX
    • type in your password and then
    • undeploy (discover artifacts by pressing TAB)
  3. via WildFly Web Management Interface:

    • visit e.g. https://XXX:9993/console/App.html#standalone-deployments
    • select the artifact and choose 'Remove' from the dropdown menu
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!