Dashboard > Admin > Home > 02 Development Environment > 09 Your first build
09 Your first build Log In | Sign Up   View a printable version of the current page.

Added by jive , last edited by Jody Garnett on May 15, 2008  (view change)
Labels: 
(None)

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

  1. The net.refractions.udig.libs plugin includes a refresh.xml ant script that is hooked into the build process
  2. Turn on automatic builds
  3. You can watch a script run in the Console. The script will create a lib folder and download a bunch of jars.
  4. The script is not currently smart enough to "refresh" the eclipse project (so eclipse knows about the jars).
  5. 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.
  6. 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):

# Update URL used to fetch GeoTools jars
updateURL=http://lists.refractions.net/m2
# updateURL=http://maven.geotools.fr/repository/

# Ibiblio Mirrors used to fetch Apache jars
mirror1=http://www.ibiblio.org/maven
mirror2=ftp://ibiblio.org/pub/packages/maven2

# Your local repository
repo=file:///${user.home}/.m2/repository
...

Forcing a Download

  1. Switch to the plugin perspective
  2. Select net.refractions.udig.libs, right click and choose clean
  3. When presented with the clean dialog ensure the libs plug-in has a check mark
  4. As part of the clean process the refresh.xml script will create a lib folder, and download a bunch of open source jars
  5. Refresh if the libs folder does not show up for you
  6. 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

  1. Switch to the plugin perspective
  2. Open up net.refractions.udig.libs and select refresh.xml
  3. 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
  4. Right click on the target and Run as an Ant Build
  5. Right click the net.refractions.udig.libs plugin and press refresh
    ( This should allow Eclipse to see the recently downloaded jars )
  6. Right click inside the Package Explorer window
  7. Select "PDE Tools" and "Update Classpath..."
  8. 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:

  1. the geotools libs were not added to the build path, had to do that manually
  2. some of the entries in MANIFEST.MF refer to folders that do not exist, they have to be removed:
    net,
    net.refractions,
    net.refractions.udig,
    net.refractions.udig.libs
  3.  lib/geoapi-2.2-M0.jar is not added to the classpath, which results in errors in the MANIFEST.MF
Powered by a free Atlassian Confluence Open Source Project License granted to uDig. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators
User-friendly Desktop Internet GIS