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

4

3 回答 3

2

为了解决这个问题,我必须编辑我的项目部署程序集属性并将路径添加到 target/myproject 目录。完成此操作后,wtp 将我生成的项目的内容复制到 wtpwebapps/myproject 目录。

于 2013-11-07T16:18:39.030 回答
1

我假设您使用 gwt-maven-plugin?如果是这样,您可以使用 pom.xml 中的属性设置输出路径,并让它指向您的目标目录,如下所示:

<properties>
...
 <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
...
</properties>
于 2013-11-07T08:56:20.207 回答
0

在 Eclipse 中查看每个文件夹的 PROPERTIES > JAVA BUILD PATH > SOURCE > OUTPUT FOLDER 并设置默认文件夹

于 2016-10-20T15:10:57.460 回答