Al Koch
Al Koch

Reputation: 423

How configure Eclipse (Kepler) to use Wildfly

I have an Eclipse Dynamic Web Project that I have used with JBoss 7.1 but I now want to try the Wildfly release. I can define a new server as Wildfly but my Project's javax.servlet imports are unresolved because I do not have a server in the Build Path. (I originally had JBoss 7.1 but removed that in preparation for using Wildfly.) However, when I access my Project's Properties > Java Build Path > Libraries > Add Library > Server Runtime I have an empty list. I cannot see how to get Wildfly into this list so that I can add it to the Build Path to resolve the javax.servlet imports.

Can someone tell me how to do this?

Thank you. Al

Upvotes: 3

Views: 21576

Answers (4)

Adolfo Eloy
Adolfo Eloy

Reputation: 21

Another way to solve this, is going to Project Properties and select Project Facets. At Project Facets, select Dynamic Web Project and open Runtimes tab panel at right.

Your Wildfly Runtime certainly will be there.

Upvotes: 2

akelec
akelec

Reputation: 4003

After adding the WildFly server, like user2795605 explained, you should set WildFly as Target Runtime of your app:

  1. Right click on project/ Properties

  2. Select "Target Runtimes"

  3. If WildFly not appears, click new

  4. Under folder JBoss Community, select WildFly / Finish

  5. Check WildFly server, that you added

  6. Apply

Now, your errors should disappear!

Cheers.

Upvotes: 0

Xavier Coulon
Xavier Coulon

Reputation: 1600

In case you did not solve your problem earlier: JBoss Tools 4.1.1 provides you with a Server Adapter to develop and deploy with Wildfly. You can download it from the Marketplace by searching for "JBoss Tools (Kepler)"

Upvotes: 0

user2795605
user2795605

Reputation: 47

You have to create a server runtime environment for the wildfly server. Go to window - preferences - servers - runtime environments and click the add button. Then choose from jboss community the wildfly 8 runtime (experimental). If you don't see the entry for wildfly 8, go to the eclipse marketplace and install the latest jboss tools (JbossAS) for kepler.

When the runtime environment for wildfly is created, you must create a new "server" from within the "Servers View" (right click and say new - server). Then choose the jboss community wildfly 8 server type and in the drop down box choose the previously created wildfly 8 runtime.

After that, you should be able to start the wildfly server (without deployments so far). When this is successful, you will be able to add the server runtime to the build path of your project.

If the runtime environment is not selectable at all, try to create a new project. Delete the project from eclipse (without deleting contents on disk) and remove the .project and .classpath manually. Then recreate the project using the dynamic web project wizard and select the wildfly 8 runtime as target runtime.

Upvotes: 3

Related Questions