简体   繁体   English

运行具有Maven依赖关系的GWT项目的步骤如何?

[英]Steps followed to run a GWT project with Maven dependency?

  • MAVEN-1.7 MAVEN-1.7
  • GWT- 2.7.0 GWT-2.7.0
  • Eclipse Luna Eclipse Luna

I have created a simple GWT project and then converted it into a Maven project. 我创建了一个简单的GWT项目,然后将其转换为Maven项目。 I am a new to Maven dependency and know very little about it. 我是Maven依赖的新手,对此知之甚少。
Searching with Google I only find how to convert a simple project into a Maven project. 使用Google搜索我只找到如何将简单项目转换为Maven项目。 Added the Maven plugin and all in Eclipse. 在Eclipse中添加了Maven插件和所有插件。

The Maven project consists of a pom.xml file. Maven项目包含一个pom.xml文件。 According to me we just have to add all the dependencies of the jar we are using in the project. 根据我的说法,我们只需添加我们在项目中使用的jar的所有依赖项。 I did this only. 我这样做了。 I had a thought that I would be able to use the classes of the jar dependency in the project, but I wasn't. 我有一个想法,我可以在项目中使用jar依赖的类,但我不是。

Problem 1: 问题1:

How exactly does Maven work with GWT projects? Maven究竟如何与GWT项目合作? Does it work on hosted mode or does it also work on development mode? 它是在托管模式下工作还是在开发模式下工作?

Problem 2: 问题2:

Other than dependencies do we have to add something else to the pom.xml file? 除了依赖项之外,我们还要在pom.xml文件中添加其他内容吗?
What are all the settings that have to be used in the pom.xml file? pom.xml文件中必须使用的所有设置是什么?


EDIT 1: 编辑1:

I have studied many articles. 我研究了很多文章。 Have converted my basic gwt project into maven project also executed it with maven dependency of gwt. 已将我的基本gwt项目转换为maven项目,并使用gwt的maven依赖项执行它。 But still I am stuck at places. 但我仍然被困在某些地方。 I have some dependency like https://mvnrepository.com/artifact/net.sf.json-lib/json-lib not working? 我有一些依赖,如https://mvnrepository.com/artifact/net.sf.json-lib/json-lib不工作?

I am stuck on some basic queries like this. 我被困在这样的一些基本查询上。 The dependency is giving error continously. 依赖性不断给出错误。 I am using couchdb in my project except fr json-lib and couchdb4j dependency other dependencies are not giving error. 我在我的项目中使用couchdb,除了fr json-lib和couchdb4j依赖项,其他依赖项没有给出错误。

I am a newbie to MAVEN, so those previous questions are not answering my query that why i raised a new question. 我是MAVEN的新手,所以以前的问题都没有回答我的问题,为什么我提出了一个新问题。

EDIT2:- EDIT2: - 想要这些jar文件 Have got all except as told before json-lib and couchdb4j. 除了在json-lib和couchdb4j之前告诉所有的一切。 Json-lib artifact url i have already given you but its not accepting and i tried for couchdb 4j also. Json-lib神器网址我已经给你了,但它不接受,我也尝试了couchdb 4j。

 <dependency> <groupId>com.google.code</groupId> <artifactId>couchdb4j</artifactId> <version>0.1.2</version> </dependency> 

Whats missing then? 什么东西丢失了?

@Vartika, you should've tried to check for similar questions on SO before posting a duplicate of your own! @Vartika,您应该在发布自己的副本之前尝试检查类似的问题! Having said that, consider going through this post and this post which have detailed explanation with all the tweaks needed to get this working. 话虽如此,请考虑通过这篇文章和这篇文章详细解释所需的所有调整以使其工作。

Apart from the details provided on the SO questions that I pointed out to, please go through this GWT documentation as well. 除了我提到的SO问题上提供的详细信息之外,请同时阅读 GWT文档。 Hope this helps! 希望这可以帮助!

EDIT 1: 编辑1:

Based on the new questions that you've posted, I've done some R & D myself and a little research to get these links, a SO question on this issue and a GITHUB project that used GWT along with CouchDB. 根据您已经发布了新的问题,我做了一些R&d自己,一点点研究,以获得这些链接,一个SO问题,一个在这个问题上和GitHub的项目所使用GWT使用CouchDB一起。 Hope this helps now! 希望现在有所帮助!

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

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