After importing the source code there are a couple of steps to run through for your first build.
This page documents what exists right now – specifically an ant script that uses maven-ant-tasks to download the needed jars. This solution is working very well, but we need your input. We have a couple of ideas on how to make this step easier, but they involve committing jars into an svn repository.
Building for the First Time
In a Perfect World
- The net.refractions.udig.libs plugin includes a refresh.xml ant script that is hooked into the build process
- Turn on automatic builds
- You can watch a script run in the Console. The script will create a lib folder and download a bunch of jars.
- The script is not currently smart enough to "refresh" the eclipse project (so eclipse knows about the jars).
- Please select the net.refractions.udig.libs project and hit refresh (or F5) - you can check the "Referenced Libraries" and see if all the gt-main, gt-api, etc... jars have actually been downloaded.
- If everything worked well uDig will compile
This perfect world has worked for two developers thus far - are you feeling lucky? Have a look for any red
in your project view ....
Build Advice
The copy.properties file contains the URLs to check when downloading stuff. By default the copy.properties file refers to a couple of servers in North America.
Outside of North America
If you are in Europe we recommend switching to maven.geotools.fr; you may also wish to list a couple of ibiblio mirrors closer to your location (or even on your LAN):
Forcing a Download
- Switch to the plugin perspective
- Select net.refractions.udig.libs, right click and choose clean
- When presented with the clean dialog ensure the libs plug-in has a check mark
- As part of the clean process the refresh.xml script will create a lib folder, and download a bunch of open source jars
- Refresh if the libs folder does not show up for you
- Select "PDE Tools" and "Update Classpath..."
If the refresh.xml script failed to find a couple jars (usually from ibliblio) then you will need can try changing copy.properties to use a different mirror - or just run it again until it finds everything.
Using refresh.xml by Hand
- Switch to the plugin perspective
- Open up net.refractions.udig.libs and select refresh.xml
- In the outline view select a target to run:
- build - will create the lib directory and download the jars from the maven repositories defined in copy.properties
- clean - will delete the lib directory
- Right click on the target and Run as an Ant Build
- Right click the net.refractions.udig.libs plugin and press refresh
( This should allow Eclipse to see the recently downloaded jars )
- Right click inside the Package Explorer window
- Select "PDE Tools" and "Update Classpath..."
- Press Select All and then Finish
This procedure uses the plugin/META-INF/MANIFEST.MF file (defined as part of the PDE nature) to generate the .classpath and .project files used by the Java nature to compile. It is a good way to make sure everything is in sync. You may want to open up the MANIFEST.MF editor and check the "runtime" tab to see that all the download jars are mentioned.
If you have difficulty with this step please check out:
Previous: 08 Importing the Source Code Next: 10 Running the Main Application
Updated by Andrea Antonello
May 16, 2008 16:11
After the download of the libs, I have a bunch of errors in my libs plugin:
net,
net.refractions,
net.refractions.udig,
net.refractions.udig.libs