nyxz
nyxz

Reputation: 7438

Eclipse -> Run as -> Run on server - How to get it to work with JBoss?

I use Eclipse Juno and I've made 2 projects:

Now the reason I do the whole "Export" thing is because the Run as -> Run on server does not build and deploy my projects. I thought that is its primary goal. Am I wrong? Is there a way to make this command work as I expected it to? I think it worked this way with Tomcat and web projects...

I know this could be easily done by build script but that is not my point!

Thanks in advance for your help and suggestions.

Upvotes: 4

Views: 24637

Answers (2)

Smajl
Smajl

Reputation: 8015

First of all, check if you have JBoss Tools installed in your Eclipse IDE. You can find them here.

By default JBoss AS Adapter uses .metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss-AS-5.1.0.GA/deploy folder to deploy your project and then register this temp folder in JBoss. In other words, if you are starting JBoss AS from Eclipse, you have to deploy your project to this directory.

You can try this (taken from JBoss community site), helped me too:

  1. Server configuration (in Servers view in your Eclipse IDE)

  2. Deployment > "Use the JBoss Deploy folder"

  3. Save Server configuration

  4. Select your project on server and make a "Ful Publish" using project context menu

  5. Start server

If you have everything configured correctly, the "add and remove" method from the previous answer should be working, too...

Let me know, if you got it working.

Upvotes: 7

klimpond
klimpond

Reputation: 766

I would recommend another approach. First Build both projects in eclipse (right click on project -> Build), then left click on your server -> Add and Remove ... and check if both projects are added. Now you can use Run on server or Publish in server context menu.

If there will be still no progress, try to undeploy your projects from JBoss which were Exported to autodeploy directory.

Upvotes: 2

Related Questions