Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31218

No undeployment of war file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Jenkins ver. 1.625.1, WildFly Deployer Plugin 1.0

      I have a war file which is not directly in the workspace directory. (WAR/EAR files = "myproject/target/test.war")

      The first build is correct. Previously there is no deployment on wildfly and afterwards i can access my deployed war.

      But the second build runs on a problem. It seems that the deployed war is not recognized. The deployment breaks with following message:
      {{java.lang.IllegalArgumentException: Error handling command: deploy /var/jenkins_home/jobs/Project/workspace/myproject/target/test.war
      at org.jboss.as.cli.scriptsupport.CLI.cmd(CLI.java:189)
      at org.jenkinsci.plugins.wildfly.WildflyBuilder.perform(WildflyBuilder.java:166)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:919)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:870)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
      at hudson.model.Run.execute(Run.java:1741)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:408)
      Caused by: org.jboss.as.cli.CommandFormatException: 'test.war' already exists in the deployment repository (use --force to replace the existing content in the repository).
      at org.jboss.as.cli.handlers.DeployHandler.doHandle(DeployHandler.java:422)
      at org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:88)
      at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:614)
      at org.jboss.as.cli.scriptsupport.CLI.cmd(CLI.java:186)
      ... 10 more}}

      I had a look at the sourcecode. Maybe in WildflyBuilder.applicationExists the deploy-info response is checked against the complete war file definition (with directory) and the deploy-info just returns the war-file name.

            ddilling Dan Dillingham
            bschueller Benjamin Schueller
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: