简体   繁体   中英

Steps followed to run a GWT project with Maven dependency?

  • MAVEN-1.7
  • GWT- 2.7.0
  • Eclipse Luna

I have created a simple GWT project and then converted it into a Maven project. I am a new to Maven dependency and know very little about it.
Searching with Google I only find how to convert a simple project into a Maven project. Added the Maven plugin and all in Eclipse.

The Maven project consists of a pom.xml file. According to me we just have to add all the dependencies of the jar we are using in the project. 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.

Problem 1:

How exactly does Maven work with GWT projects? Does it work on hosted mode or does it also work on development mode?

Problem 2:

Other than dependencies do we have to add something else to the pom.xml file?
What are all the settings that have to be used in the pom.xml file?


EDIT 1:

I have studied many articles. Have converted my basic gwt project into maven project also executed it with maven dependency of gwt. But still I am stuck at places. I have some dependency like https://mvnrepository.com/artifact/net.sf.json-lib/json-lib not working?

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.

I am a newbie to MAVEN, so those previous questions are not answering my query that why i raised a new question.

EDIT2:- 想要这些jar文件 Have got all except as told before json-lib and couchdb4j. Json-lib artifact url i have already given you but its not accepting and i tried for couchdb 4j also.

 <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! 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. Hope this helps!

EDIT 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. Hope this helps now!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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