Dashboard > Admin > Home > 03 Trouble Shooting > 01 How to fix a broken build
01 How to fix a broken build Log In | Sign Up   View a printable version of the current page.

Added by Jody Garnett , last edited by Jody Garnett on Oct 16, 2007  (view change)
Labels: 
(None)

In general try and get your build working in the following order:

subversion update

Head to your udig directory:

C:\java\udig\trunk>svn update

Some errors can be caused by new projects being added. To ensure that you have all the projects in you work space:

  1. Select all project
  2. Delete all project (ONLY from workspace)
  3. Import all projects
  4. Update classpath for all projects, clean all

If you ever notice net.refractions.udig.libs/build.xml being modified you will probably have to do the next step.

net.refractions.udig.libs

The libs plugin is the hardest to get to work. You must be connected to the internet (Advanced: or have a local maven 2 repository). The reason the plugin is so dempanding is that it downloads all the other open source projects we make use of (in jar form).

Here are the steps to get libs working:

  1. Switch to resource view
  2. delete all the jars in libs
    • Advanced: If you have a local maven repository:
      Go into your local .m2 directory and rename repository to repository2.
      (You can change it back after)
  3. Run clean on libs
    1. Project > Clean ...
    2. Select libs from the list and press Finish
  4. Update the classpath
    1. Right click on net.refractions.udig.libs
    2. Select PDE > update classpath
    3. Confirm libs is selected and press Finish
Sanity check on unused jars

With the default settings the PackageExplorer shows most jars as in use (they have a little jar glyph).

As of this writing there are two are left unsed in the libs folder ( ostgis-driver-1.0.jar and postgisql-74.213.jar).

If you see unused jars:

  • try a PDE Builder > update classpath ... (they are not blessed with a jar icon until the Java Nature makes use of them); and then
  • email the developers list, chances are there is a left-over that needs to be removed from the build.xml script

Final Comment: You may see additional jars here if you did not clear out the contents before running clean. This often occurs when jars are updated to a newer version, you can safely remove these unused jars.

Build Path Error

Okay now for the build path error:
This would be a problem with the "Java Nature" (aka the .classpath and .projects).
So we need to look into the net.refractions.udig.libs > Properties and check out the the actual problem. Switch to the Java Build Path properties page.

For libs you should confirm that all the jars in libs are listed in the Libraries tab, and exported on the Order and Export tab.

So how do you fix a problem?

What makes Plugin projects special (over and above Java projects) is the use of a PluginNature. You can see this by looking at the .project file directly if you are interested. This nature is contributed by the Plugin Developement Envioronment (PDE).

Since the .classpath & .project is completly generated from the PDE (via the plugin.xml and/or MANIFEST.MF) we can try to regenerate them.

If you find a problem (missing jar or extra jar):

  1. Open up MANIFEST.MF* and switch to the Runtime tab
  2. Confirm that the Classpath includes the jars you want
  3. Right click on net.refractions.udig.libs > PDE Tools > Update Classpath...
  4. Head back to the Project properties and see if the problem is fixed

net.refractions.udig.core

Core is a very stable plugin, it is the first plugin that depends on libs. Often it will fail if libs is not configured to export out the correct plugins.

net.refractions.udig.catalog

When you have catalog working you have the basis for GIS Platform. Since the project and everything else is based on these facilities they are not expected to build until catalog is working.

Note: Some plugins at the catalog level like Oracle and DB2 are not expected to work until you have managed to download the required drivers from their respective development sites. We cannot redistribute everything.

net.refractions.udig.project

Project forms the application model for udig. If it is broken chances are you need to know a little bit of EMF to fix it. I have not been stuck with project being broken for 4 months so the chances are good you will not run into a problem.

If you are not comfortable with EMF, just hop on IRC and ask for help on this one. Chances are nobody is working if project is down for the count.

net.refractions.udig.project.ui

This forms the GIS Application, providing extentions for tools and renderers. As a group these form the GISApplication.

Once you get this far you have something you are able to run.

Community, Tests, and Tutorials

These plugins are built on the GIS Applicaiton. All of these are recommended as examples to see how things work. Tests can be run by right-clicking on a test and running with JUnit (in case you want to see something actually work).

It is strongly recommend that you write tests when working on your own code, it is nice to hit a button (rather then running the application all the time when developing).

If you do see a test or tutorial being broken, please let us know on the development list.

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