Software Engineering Project 1 - 4010-561-14.20082 : Build notes
This page last changed on Apr 16, 2009 by pwy4104.
Checkout from our modifications source CVS repository:
The first issue is getting maven looking at right repositories for dependencies and maven plugins. The project POM has all the repositories needed to find available dependencies. There are some that must manually be installed, however. The settings file for maven allows you to specify a server to deploy to which is useful during development. If you've already build atlassian plugins, chances are you can skip this part. If not, the following settings.xml file should get you started. It goes in your .m2 folder (e.g. /home/eugene/.m2/ or C:\Documents and Settings\Eugene\.m2)
After putting the settings in place, try a build. The first try will attempt to pull all of the dependencies and more than likely fail after a while. To start the build, run the following command from the sql-plugin
Note: The dependencies are pretty heavy. Theres a good 70mb at least. The confluence-webapp jar is 50mb itself.
The build will probably fail on java activation framework and oracle's jdbc driver dependencies. You need to manually install all of these dependencies into maven. See belowfor more info. You may also run into HTTPS issues. A solution to this is described below.
Download jta-1.0.1B.jar run:
Download jaf-1_0_2-upd2.zip, unzip it, and run:
Download version 1.3.3: javamail-1_3_3_01.zip, unzip it, and run:
Both the oracle and mysql jdbc drivers are required for the project to build in maven. They are not used in the source code for the main project jar, only during the testing phase. MySQL's driver is available in repositories. Oracle's is not. You should download the latest oracle 11g driver for your version of java (at the moment it is ojdbc5.jar or ojdbc6.jar version 220.127.116.11.0) available here:
Download and run:
If you get issues saying things about SSL or HTTPS, you have to tell maven that you trust the certificates. It doesn't provide a user interface for this so you will get an exception if you run with the -e option, usually it looks like:
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
What you need to do is get the certificate from atlassian (assuming it is failing on the atlassian repository), import it into a Java key store, then tell maven to use that key store. To get the certificate, visit
https://svn.atlassian.com/svn/public/atlassian/pom/atlassian-contrib-pom/tags/atlassian-contrib-pom-9/ or some other page on that server. Then using the Cert Viewer extension for firefox, view page info (in the tools menu), go to the security view, choose export, and save.
Next setup a keystore. Probably best to do this in your .m2 directory. For reference visit: http://maven.apache.org/guides/mini/guide-repository-ssl.html. The general approach is to run:
Where the file after -file is the certificate you exported in firefox. Keytool will ask you for a password and to confirm the insert of the certificate. If you need to add more than one certificate you can keep running the command with different files.
After setting up the keystore you need to tell maven how to find the keystore. In your home directory make a file called .mavenrc with contents like this:
Where PASSWORD HERE is the password you gave to the keystore. Since this is plain text you should probably not choose one of your good passwords.
Try the build again, see what happens.
Check out project
Project -> Properties -> Java Build Path, click jre, edit, choose workspace default
Make sure its JDK, not jre.
|Document generated by Confluence on May 21, 2009 10:23|