1

When I choose to run my gwt project in eclipse it is deploying the src/main/webapp directory but I want it to publish the target/myproject directory. I have verified that it is copying the contents of src/main/webapp to wtpwebapps/myproject. How can I configure Eclipse Kepler to deploy the contents of my target/myproject directory instead. I really don't want to have to redirect my build to output to the src/main/webapp directory as this would pollute my src directory. In the past I have always manually configured tomcat to point to my generated target directory in the modules configuration but I would really like to get the "Run as" -> "Run on server" to work correctly.

Thanks in advance

Chris Hinshaw
  • 6,967
  • 2
  • 39
  • 65

3 Answers3

2

To fix this problem I had to edit my projects Deployment Assembly properties and add the path to the target/myproject directory. After doing this wtp copied the contents of my generated project to the wtpwebapps/myproject directory.

Chris Hinshaw
  • 6,967
  • 2
  • 39
  • 65
1

I assume you use the gwt-maven-plugin? If so, you can set the output path with a property in your pom.xml and let it point to your target directory like this:

<properties>
...
 <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
...
</properties>
Rob
  • 5,353
  • 33
  • 34
0

in Eclipse have a look at the PROPERTIES > JAVA BUILD PATH > SOURCE > OUTPUT FOLDER of every folder and also set the Default Folder

Erdinc Ay
  • 3,224
  • 4
  • 27
  • 42