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:-
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!
Related
This is the first time I have encountered Maven so I don't really know what I'm doing here.
What I'm trying to accomplish is to import the java library Beat Link into my java code using Maven.
Could anyone please provide a simple step by step on how to do this in eclipse?
On maven central you got the maven dependency text -
<dependency>
<groupId>org.deepsymmetry</groupId>
<artifactId>beat-link</artifactId>
<version>0.6.3</version>
</dependency>
Once you create a maven project you should have a pom.xml file.
You need to add this text to the dependencies section of your pom.xml file.
If that doesnt make sense to you, do yourself a favor and read/watch a quick tutorial about using maven on a java project. It's pretty simple once you see how it works.
I am trying to use the javaFXGL library. Which is the java gaming library. I am not sure how to use maven to download the library to eclipse. Does anyone know a step by step way to download this. I need to this get some example code running.
I would be easier to get the help if you add your code in the question along with the problems/errors you are facing. Anyways I would suggest you to first read this and this to understand what is maven and how it works with Eclipse IDE.
After reading the articles you will understand that maven project has pom.xml file which is used for maven settings or you can say for Dependency Management, Build Management, etc.
To add the library you need to add its maven dependency in the pom.xml inside the <dependencies> tag like below:
<!-- https://mvnrepository.com/artifact/com.github.almasb/fxgl -->
<dependency>
<groupId>com.github.almasb</groupId>
<artifactId>fxgl</artifactId>
<version>0.2.9</version>
</dependency>
You can also find other dependencies on www.mvnrepository.com
I followed this Getting Started with Spring/Maven Tutorial to well, get started with spring and maven. I thought Maven helps me with deploying libraries/dependencies etc.
But in the tutorial for maven, there are two libraries (joda/hamcast) already, which are not included in IntelliJ. If I just follow the guide though, nothing works as its stated there, I have to manually download the .jar files and add them to my Project Structure.
What is to gain here or did I understand Maven wrong?
EDIT: You wanted additional information, which I will provide now to clarify things. Thanks for all the replies so far!
After adding the joda dependecy as stated by the tutorial, the first maven compile downloaded the .jars. Nevertheless, it is saying "No sources to compile" and "BUILD SUCCESS". Still, in my project, LocalTime is still red and unknown, even after refreshing/rebuilding the project.
The "reimport" feature solved my problem, thanks everyone!
In the Intellij Idea this can be accomplished by using "Reimport all Maven Projects"
I have a project implemented in ADF.
I need to build it using Maven now.
I wrote the POM but now stuck at adding dependancies.
There are way too many JAR files, specifically about ADF, Toplink etc which I believe I will need to put in my POM.
Now, only way till now i could figure out is to go to each JAR, open manifest file, get version etc, and then get the dependancy block from maven online repository.
Is there a diff and easier and faster way of doing it.
Please help!!
Note: Chances are high that my question may sound illogical or stupid cause I have been using maven only for a week now.
-Santosh
If you are using a decend IDE, it could resolve your dependencies for you. If it can't import a class, you can ask it to look up the class in the Maven repository. Then you can choose which dependency to add to your pom.xml.
I've made a few Android apps, but every time I need a library, I'd either download the jar and include it in my /libs folder, or clone the repository and include it as an Android Library. However, many of the more robust libraries recommend using Maven, and considering that more and more people are using it, AND Gradle apparently uses it as well (another system I need to eventually adapt to), I feel like it's time I finally get on board. Unfortunately, most of the tutorials and questions regarding Maven that I've found seem to assume at least a basic working knowledge of the system. What I need is a "Baby's First Maven Tutorial," so to speak. Can anyone help?
For example, the networking library Ion. The Maven dependency block for it is as follows:
<dependency>
<groupId>com.koushikdutta.ion</groupId>
<artifactId>ion</artifactId>
<version>1.2.4</version>
</dependency>
How would one incorporate this library into an existing Android project in Eclipse, via Maven, starting from the very beginning?