java – GWT模块…在项目源或资源中找不到
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了java – GWT模块…在项目源或资源中找不到,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2123字,纯文字阅读大概需要4分钟。
内容图文
![java – GWT模块…在项目源或资源中找不到](/upload/InfoBanner/zyjiaocheng/749/b88eae05f9a14752b3b9fa40ebdc901f.jpg)
我是GWT的新手.我尝试制作一个Web应用程序并使用以下maven配置来配置gwt.我把它放在一个配置文件中,所以只有在调用配置文件时才会编译gwt.
个人资料如下:
<profiles>
<profile>
<id>gwtCompile</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.5.0</version>
<configuration>
<extraJvmArgs>-Xmx512M -Xss1024k </extraJvmArgs>
<module>com.mycompany.MyMainModule</module>
<inplace>true</inplace>
<force>true</force>
<disableCastChecking>true</disableCastChecking>
<style>PRETTY</style>
<warSourceDirectory>${basedir}/war</warSourceDirectory>
</configuration>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>compileJS</id>
<phase>process-classes</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
当我运行命令时:
mvn clean install -Dmaven.test.skip=true -PgwtCompile
它给了我错误信息:
GWT Module com.mycompany.MyMainModule not found in project sources or resources.
我的MyMainModule.gwt.xml是这样的:
<?xml version="1.0" encoding="UTF-8"?>
<module>
<inherits name='com.google.gwt.user.User' />
<entry-point class='com.mycompany.MyMainModule' />
<source path='client' />
<source path='shared' />
</module>
我可以看到一些在线文档说多个模块项目应该有这个错误.但是mime不是一个多模块项目.
有人能告诉我这可能出了什么问题吗?
非常感谢.
编辑:
我有这个到位:
<resources>
<resource>
<directory>${basedir}/src/main/java</directory>
<includes>
<include>**/client/**</include>
<include>**/*.gwt.xml</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
解决方法:
尝试在构建代码中添加资源标记.
<build>
<resources>
<resource>
<directory>${basedir}/src/main/java</directory>
</resource>
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
<!-- **Other build tags** -->
</build>
内容总结
以上是互联网集市为您收集整理的java – GWT模块…在项目源或资源中找不到全部内容,希望文章能够帮你解决java – GWT模块…在项目源或资源中找不到所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。