VikC
VikC

Reputation: 389

JBoss tools deploys (copies) entire project structure to wildfly deployment directory. What is wrong in configuration

I have installed JBoss Tools 4.3.0.CR1 on STS 3.8.0. I have gradle based web application. To add it to Wildfly 10 server on JBoss tools, I right clicked on the project, and selected 'Mark as deployable'. Then the project starts showing on add/remove options on wildfly server. Once done, I noticed that entire project folder is copied as it is, to the wildfly deployment folder, which is not right. What am I doing wrong while configuring the project for deployment on server, on JBoss tools.

Upvotes: 0

Views: 401

Answers (2)

Rob Stryker
Rob Stryker

Reputation: 46

The 'Mark as deployable' action turns a given resource (project / folder / file) into a deployable entity. However, it's use is most advantageous when you're working with a plain old java project, or if you don't have the jeetools parts of webtools installed in your eclipse installation. It's also useful if you just want to make a single file (a .jar, a .xml file, etc) deployable to a server.

However, your best action generally is to have a project type that meets your needs. If you're making a webapp, you probably want a Dynamic Web Project. If you're making an ejb project, use webtools' EJB Project. These are all faceted projects, which allow you to enable or disable 'facets' to the project. The primary faceted project types available in webtools (web / ejb / ear) are all automatically a 'module type', which means they can be deployed to servers. More than that, you can also configure the layout of the zipped jar using project preferences, which allow you to map various project folders into specific locations in the assembled archive.

If your source code repository has a maven-based project structure with pom.xml etc, and you don't wish to persist project configuration like an eclipse .project file, or the .settings folder, facets, etc, you may find that the eclipse "m2e" plugins for maven integration, and the m2e-wtp plugins, for converting web / ejb / ear maven projects into wtp-style projects that are more easily deployable with the eclipse server tooling, meet your needs. What these plugins basically do is look at your pom.xml and try to add the facets and other configuration details to make it look and function like a wtp-style faceted project for easy deployment in eclipse.

Upvotes: 0

VikC
VikC

Reputation: 389

In case someone is interested, this got solved by setting the correct Project facet in eclipse project properties to 'Dynamic web Module'. Marking the 'project as deployable' is not correct option to exercise in this case.

Upvotes: 1

Related Questions