简体   繁体   English

如何使用Maven for App Engine设置Java Eclipse(Juno)动态Web项目

[英]How to setup a Java Eclipse (Juno) dynamic web project with Maven for App Engine

I am using appengine + GWT in Eclipse and have working code but wanted to add Maven to control jar files. 我在Eclipse中使用appengine + GWT并且有工作代码但是想要添加Maven来控制jar文件。 What is the current suggested way to setup such a project? 目前建议设置这样一个项目的方法是什么?

I have found a few possible options, but non work for me: 我找到了一些可能的选择,但对我来说不起作用:

1) create "Dynamic Web Project" and setup directories to fit with Maven ... https://developers.google.com/eclipse/docs/faq#gwt_with_maven 1)创建“动态Web项目”并设置目录以适应Maven ... https://developers.google.com/eclipse/docs/faq#gwt_with_maven

2) Similar to 1, with more steps Java Dynamic Web project with Maven and Eclipse 2)与1类似, 使用Maven和Eclipse执行Java Dynamic Web项目的更多步骤

3) use plugins m2e 1.3+ and m2e-wtp 0.16.0+ http://wiki.eclipse.org/M2E-WTP/New_and_Noteworthy/0.16#New_project_conversion_participants 3)使用插件m2e 1.3+和m2e-wtp 0.16.0+ http://wiki.eclipse.org/M2E-WTP/New_and_Noteworthy/0.16#New_project_conversion_participants

I have tried creating projects from scratch and adding Maven to a working project, but non work. 我尝试从头开始创建项目并将Maven添加到工作项目中,但是没有工作。 Maven looks to be working as every thing compiles ok, but the deploy fails. Maven看起来工作正常,但是部署失败了。 Look like the Jar files from Maven are not being deployed. 看起来没有部署来自Maven的Jar文件。

我认为Maven GWT插件可以帮到你!

You can do it by terminal: 你可以通过终端来做到:

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

and make it compatible with eclipse with: 并使其与eclipse兼容:

mvn eclipse::eclipse

(last command you may do in the project folder) (您可以在项目文件夹中执行的最后一个命令)

(If command not works, make sure than you have Maven installed with: mvn -version ) (如果命令不起作用,请确保安装Maven时使用: mvn -version

After that open Eclipse import and u have maven's setup project ready... For change things you can use pow.xml file 之后打开Eclipse导入并准备好maven的安装项目...对于更改内容,您可以使用pow.xml文件

Hope that helps you 希望对你有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM