Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make JBoss launch block until build workspace is complete?

Tags:

eclipse

jboss

In my previous version of Eclipse, I could launch my JBoss server from the same run or debug configurations menu that I use for launching all my other programs, and if I launched the server while "build workspace" was going on, the launch would block until build workspace was complete.

Now that I have upgraded to Luna, if I want to launch JBoss , I have to go to the servers tab because JBoss is no longer listed in the run/debug menus with my other programs, and also, if I launch the server while "build workspace" is going on, the server launches immediately. Usually this causes a problem because after the build finishes, classes are replaced in the running server JVM, and I get a notice that the hot replace was not successful.

How can I get back to the old behavior for my server? Is it still possible to have the server launch wait for build workspace to complete?

like image 529
skiphoppy Avatar asked Jun 09 '15 19:06

skiphoppy


2 Answers

Launch configurations are stored in the workspace directory, under the ${workspace_dir}/.metadata/.plugins/org.eclipse.debug.core/.launches directory. You should be able to find the file corresponding to the launch that used to work there (unless it was deleted during the upgrade to Luna). The name of the file is the same name of the run configuration, e.g. LaunchServer.launch.

It could be that the workspace was somehow corrupted after upgrading Eclipse. If you locate the launch configuration file, you can import it by selecting File --> Import --> Launch Configurations and browsing the location of the .launch file.

A launch configuration can also be shared if you don't want to store it in the .metadata folder. From the configuration dialog, under the Common tab, select the Shared file radio button to point to the .launch file.

See How do I save Eclipse launch profiles across workspaces and How can I clean up Eclipse “run configurations”.

EDIT:

Based on the comments, the workspace seems to already contain the launch configuration file, but it's not showing in the menu. This could possibly be due to some corrupted metadata. You can try to do the following:

  1. Copy the existing .launch file from ${workspace_dir}/.metadata/.plugins/org.eclipse.debug.core/.launches to a backup file.

  2. Delete the .launch file.

  3. Restart Eclipse.

  4. Import the copied launch config file using File --> Import --> Launch Configurations.

like image 119
M A Avatar answered Oct 09 '22 00:10

M A


See Run/Debug > Launching in Preferences. Also see "Launch Groups" that allow you to daisy chain run config launches. More on Launch Groups here.

enter image description here

like image 26
martinez314 Avatar answered Oct 09 '22 00:10

martinez314