I have created a Jenkins job that builds, deploys, and starts a JBoss server. According to the Jenkins build job console the JBoss server has started successfully, but the actual Jenkins build job still does not finish. It just hangs there. Any ideas on what to do with this?
0
votes
1 Answers
1
votes
Since you have not sent any configuration information I can just guess that you do not stop your jboss in the end of your build, so maven just does not know it should terminate.
If you are running JBoss in order to run integration tests your executions configuration should be similar to mine:
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
Please pay attention on phase post-integration-test where I stop the server.
If however you want to run JBoss and terminate you probably should use <forkMode>true</forkMode> into configuration.