how to setup a sqoop2 application project in eclipse? - java

I'm referencing Sqoop Client API Guide. Inside the guide, it says:
It requires Sqoop Client JAR and its dependencies.
It then lists the maven dependency:
<dependency>
<groupId>org.apache.sqoop</groupId>
<artifactId>sqoop-client</artifactId>
<version>${requestedVersion}</version>
</dependency>
Does that mean I need to setup a maven project with the dependency above? If not, where do I find and download the Sqoop Client JAR and its dependencies?
Thanks much!

This is how I setup right now and it works for now but I highly doubt this is the "official recommended" way:
Download all the required jar files from this link. The link points to jar-download.com and claims to offer sqoop client JAR and dependencies for 1.99.6
unzip the downloaded zip file from above
create a java project in eclipse and "configure build path" then "Add External JARS ..." to include all the jars from downloaded zip file.
So far, I can import the sqoop java api class (i.e., import org.apache.sqoop.client.SqoopClient;) but I haven't tried to build the app.

Related

How to export a java Maven file from eclipse

How to export a java maven file from eclipse with all external libraries and maven dependacies so the other peorson opening does not have to download and import the external libraries?
I tried the Archive file exporting method. But it wasn't successful, cause it lost the external libraries while importing, and it lost clases and packages .
The default local repository is located based on OS:
Windows: C:\Users<User_Name>.m2
Linux: /home/<User_Name>/.m2
Mac: /Users/<user_name>/.m2
Assuming that you want to store these dependencies in the project folder so that every user does not have to download and import the external libraries according to this source you can download all your dependencies to the target folder with the following command.
mvn install dependency:copy-dependencies
You can also specify the folder.
mvn dependency:copy-dependencies -DoutputDirectory=specific-folder/
To make use of these commands you will have to install Apache Maven Dependency Plugin

Adding javadoc to a library included as .jar in NetBeans

I'm using Twitter4j for a Twitter Java client Java FX App. I downloaded the sources and included the .jar to NetBeans after going to: Projects->Libraries->Add Jar/Folder.
I'd like to include the JavaDoc for library but at site they only offer an html.
I've tried:
downloading the html and adding the folder as JavaDoc for that jar,
downloading and compressing to index.html and the downloaded folder to .jar
adding the URL
But got any good results. .
How can I achieve this?
On Maven Central, you can have the javadoc jar.
When listing the available files for version 2.1.4 there is a:
twitter4j-core-2.1.4-javadoc.jar
Netbeans should be able to download maven dependencies, including javadoc; at least, IDEA does.

build jar from loopj android-async-http source

I'm trying to build a jar from the https://github.com/loopj/android-async-http source code but have been unsuccessful.
I also tried including the source as a library in my android project in android studio but was unable to.
I want to build from source because the jar's available in maven and in the github repo are too old and I want to use and test some of the new features available in the source.
How can I either build the jar and include the jar in my android studio project or simply properly include the source in my android studio project?
I was able to build the jar myself in ubuntu:
cd android-async-http/library
gradle build
That generated a build directory that contained a jar of the library.
Do you just need a Jar or you want to build the jar yourself. If you are just looking for the jar, they are already compiled and ready to download on this link here.
Looks like github download is not working. Use this link to download the latest android-async-http jar

Importing JParsec in Eclipse

I downloaded both the .jar file and the "source and documentation" zip archive from the JParsec download section. Somehow I failed to import the JParsec source code using the Eclipse IDE (and also to find any documentation). Can someone please explain how to import it?
Thanks a lot!
You need to create a Java project and add the appropriate .jar file into the build path. You can also link the source file to the .jar file using the "Build Path" choice.
The codehaus project is no longer active, jparsec is now hosted on github. If you clone the source code from there, you can import the project using the maven plugin for Eclipse, or alternatively do mvm eclipse:eclipse inside the project source tree and then open the project in Eclipse.

Adding External JARs to Openshift

I have a pretty basic Java web application (created using Eclipse openshift plugin). The app runs fine on the OpenShift server. Now I need to use an external JAR library for JSON parsing and creation in Java. I can't understand my way around how to add that JAR to openshift server.
I went to project properties>>BuildPath>>Add external JAR. While that does import the JAR, it does not work on openshift server and gives error relating to that file's import (NoClassDefFound, I guess). Could you tell me how to import external jars into openshift project?
Since we use Maven for the build process, all you have to do is add it as a dependency in your pom.xml
Here is an example that adds a mongo driver
https://github.com/thesteve0/openshift-mongo-spatial-jee6/blob/master/pom.xml
Look under the dependencies tag
You can add the jar as a dependency in your pom.xml file. This will cause the jar to be included in your war. If the jar is not available in a public maven repo, please see here: http://www.billdecoste.net/?p=16
[Updates in 2017]
You might want to take a look at this link from OpenShift itself.
It includes information about adding jars with and without maven dependencies.

Categories