This page assumes that you have the local BioCoRE server installed and working via the source code. If you haven't accomplished this yet, please refer to the instructions.

Using ant to compile and deploy the BioCoRE server:

You can perform the following operations via 'ant' from the biocore directory.
  • ant - by itself, running ant will compile the code.
  • ant -p - List all of the options (the following list, in other words)
  • ant reload - This does a 'deploy' and tells Tomcat to reload the web application.
  • ant deploy - This will compile the code if source files have changed, and deploy the resulting java classes to the proper tomcat directory.
  • ant dist - This does a 'deploy' as well as create archive files of the binaries and source.
  • ant javadoc - Create javadocs of the source code files.
  • ant clean - removes all temporary files.
  • ant all - Does a 'clean' and then a generic 'ant'.
  • ant applets - compiles the applets. Note that some applets need to be securely signed before deployment.

Modifying The BioCoRE Server

The typical build cycle for modifying server code is:

Modify code
ant reload
Test via a web browser

Modifying BioCoRE Applets (such as the Control Panel)

Typical build cycle if working on applets:

Modify applet code
ant applets
ant reload
Test via a web browser and tomcat

Signing Applets

Modifying BioCoRE applets is more tricky than modifying the server code because of secure certificate signing issues. In the source distribution we have included presigned copies of the applets that you can use. If you want to change the applet code, though, you will have to get the applets signed. For signing applets, we really suggest that you sign them with an actual developer's certificate purchased from Verisign or Thawte.

We are now going to describe how to create an development certificate that can be used for signing applets so that they can be executed with the Java Plugin. This is useful for testing, but doesn't work as well for actual release to other users because it results in the JVM putting up a big evil sounding dialog that users have to agree to.

To make a development certificate that is good for 3000 days, use the following as a guide. keytool is a program that should be in your java distribution that you have already installed. Replace youralias and yourpassword with appropriate values.

> keytool -genkey -alias youralias -validity 3000
Enter keystore password:  yourpassword
What is your first and last name?
  [Unknown]:  Your Name
What is the name of your organizational unit?
  [Unknown]:  YourOrgUnit
What is the name of your organization?
  [Unknown]:  YourOrg
What is the name of your City or Locality?
  [Unknown]:  YourCity
What is the name of your State or Province?
  [Unknown]:  YourState
What is the two-letter country code for this unit?
  [Unknown]:  XX
Is  correct?
  [no]:  yes

Enter key password for 
        (RETURN if same as keystore password):
This will create a development certificate and put it in the .java directory in your home directory.

The default values in the build.properties file will expect to find a dev certificate here. Simply doing an ant applets will compile the code and then sign it using the development certificate.

If you have purchased a code signing certificate for Netscape, you need to add the following to your build.properties file:

signStore=/path/to/private/code/cert/file.p12
signAlias=exact alias given from the company
signPass=PASSWORD
signType=pkcs12
You need to export the real certificate from your browser to a p12 file to be able to use this.

Feedback

The BioCoRE team welcomes any comments, questions, or suggestions that you might have concerning our software! Please email us or fill out our feedback form.