To build/test locally:

0. Run a web server locally, so you can access central/site/target/site/devstudio-directory.xml via an http:// URL. You have many options for this. Here's one:

	su
	cd /tmp; wget -nc http://elonen.iki.fi/code/nanohttpd/NanoHTTPD.java
	javac NanoHTTPD.java; java NanoHTTPD -d /path/to/parent/folder/for/product/

1. If you need to iterate through changes to the product/plugins/com.jboss.jbds.central plugin, you can do so, rebuild it, and reinstall it into a running JBDS instance.

   	Help > Install new > file:///path/to/product/site/target/site/

2. Rebuild:

	cd /path/to/product; mvn install -DskipTests -Dmaven.test.skip; # rebuild everything
		or
	cd /path/to/product; mvn install -DskipTests -Dmaven.test.skip -f pom-discovery-feature-site.xml; # rebuild just the plugin, containing feature, and site

3. Verify the directory.xml file is generated, and http-accessible:

	firefox http://localhost/product/site/target/site/devstudio-directory.xml 

4. Verify product/site/target/site/devstudio-directory.xml points at the updated version of the c.j.j.central plugin in /path/to/product/site/target/site/plugins/ 

	Note: if built locally, there should be no Jenkins/Hudson buildID Hxxx number in the version suffix, eg., 
		1.0.0.v20120120-1459-Beta1 
	instead of 
		1.0.0.v20120120-1459-H123-Beta1

5. Launch JBDS like this:

	./jbdevstudio -vmargs -Djboss.discovery.directory.url=file:///path/to/product/site/target/site/devstudio-directory.xml
		or
	./jbdevstudio -vmargs -Djboss.discovery.directory.url=http://localhost/product/site/target/site/devstudio-directory.xml
		or
	add the -Djboss.discovery.directory.url flag to your jbdevstudio/studio/jbdevstudio.ini file after the -vmargs line

6. Select 'Help > Jboss Central' (if not already loaded). Check the 'Software/Updates' tab to review contents of the discovery site (as per com.jboss.jbds.central.discovery/plugin.xml). Hit the refresh icon if necessary to see changes.

--

To iterate through local changes:

7. Change product/plugins/com.jboss.jbds.central.discovery/plugin.xml.

8. Repeat steps 2-6. If you rebuild the central plugin, you must reinstall it; the discovery plugin can simply be rebuilt and refreshed w/o needing to install anything new.

