You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by Apache Wiki <wi...@apache.org> on 2008/10/14 21:03:57 UTC
[Pig Wiki] Trivial Update of "Eclipse Environment" by CorinneC
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Pig Wiki" for change notification.
The following page has been changed by CorinneC:
http://wiki.apache.org/pig/Eclipse_Environment
New page:
==== Install Eclipse ====
Eclipse is an open source development community. If you have not already done so, download and install Eclipse on your development machine. For more information, see [http://www.eclipse.org Eclipse] and [http://www.eclipse.org/downloads/moreinfo/java.php Eclipse IDE for Java Developers].
==== Download and Install the Eclipse Plugins ====
For Pig, you need the [http://www.easyeclipse.org/site/plugins/javacc.html JavaCC plugin] and the[http://subclipse.tigris.org/ Subclipse Subversion plugin].
To download and install the plugins:
1. Open Eclipse
1. Select Help > Software Update > Find and Install...
1. Select Search for new feature to install
1. Add the two plugin sites using one of these options:
* New Remove Site (''enter the Name and URL for each site'')
* Import Sites (''use the attached file:'' PigEclipse.xml)
1.#5 From the "Site to include in search" list, select the two plugin sites: Eclipse JavaCC ''and'' Subsclipse update site
1. Click Finish - and follow the prompts to download and install the plugins
==== Add the Pig Trunk Repository ====
To add the Pig trunk repository:
1. Open Eclipse
1. Select file > New > Other...
1. Choose SVN, Repository Location > Next
1. Under the General tab:
* URL: http://svn.apache.org/repost/ask/incubator/pig/
* Use a custom label: Pig
1.#5 Click Finish
To view the results:
* Window > Open Perspective > Other... > SVN Repository Exploring
* Window > Show View > SVN Repositories
==== Create a Java Project ====
First, create a directory on your development machine (for example "mypig") and checkout the Pig source form SVN: http://svn.apache.org/repos/asf/incubator/pig/
Note: Windows users will need to download and install TortoiseSVN (http://tortoiseSVN.tigris.org/)
To create a Java project:
1. Open Eclipse
1. Select file > New > Other ...
1. Select Java Project
1. On the New Java Project dialog:
* Project name: !PigProject
* Select: Create project from existing source
* Directory: browse to the "mypig" directory on your development machine and select the Trunk directory
1.#5 Click Next
1. Click Finish
To view the results:
* Window > Open Perspective > Java
* Window > Show View > ''see the various options ...''
==== Update the Build Configuration ====
After the Java project is created, update the build configuration.
To update the build configuration:
1. Open Eclipse
1. Select Window > Open Perspective > Java (to open the !MyPig project)
1. Select Project > Properties
1. For the Java Build Path, check the settings as shown below.
Source
{{{
lib-src/bzip2
lib-src/shock
src
src-gen -> To get this do "ant clean jar" externally which will create this dir (refresh in eclipse to see it)
test -> Make sure nothing is excluded
The default output folder should be bin.
}}}
Libraries
{{{
lib/hadoopXXX.jar
lib/javacc.jar
lib/jline-XXX.jar -> Appears with latest Pig version only
lib/jsch-xxx.jar
lib/junit-xxx.jar
}}}
Order and Export
{{{
Should have be the following order:
test
lib-src/bzip2
lib-src/shock
src-gen
src
JRE System Library
all the jars from the "Libraries" tab
}}}