Using ant to compile and deploy the BioCoRE server:You can perform the following operations via 'ant' from the
ant- by itself, running
antwill 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 ServerThe typical build cycle for modifying server code is:
Test via a web browser
Modifying BioCoRE Applets (such as the Control Panel)Typical build cycle if working on applets:
Modify applet code
Test via a web browser and tomcat
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
yourpassword with appropriate
> 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 IsThis will create a development certificate and put it in the
correct? [no]: yes Enter key password for (RETURN if same as keystore password):
.javadirectory in your home directory.
The default values in the build.properties file will expect to find
a dev certificate here. Simply doing an
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
signStore=/path/to/private/code/cert/file.p12 signAlias=exact alias given from the company signPass=PASSWORD signType=pkcs12You need to export the real certificate from your browser to a p12 file to be able to use this.