Build Environment Setup

The aim to this document is to show developers to setup their environment beside the one setup in CVS. I'm describing this in a Windows environment. If you're using Linux, you probably should know what you're doing...:)

Downloading JDK

  1. Download Sun's JDK 1.4.2 from http://java.sun.com
  2. Install jdk in c:\j2sdk1.4.2
  3. Add "c:\j2sdk1.4.2\bin" to PATH

Dowloading Cygwin

  1. Download the setup.exe from http://www.cygwin.com/ .
  2. Run setup.exe. You usually install in c:\cygwin. You need to select custom package to include the following (they're not there by default):
    • cvs
    • openssh
    • openssl
    • rsync
    • man
  3. Add "c:\cygwin\bin" and "c:\cygwin\usr\bin" to your path.

Downloading Build Tools

  1. Download Maven 1.0 (latest beta is fine) from http://maven.apache.org
  2. Unzip all tarballs to the c:\jtools with top level "ant" and "maven" accordingly.
  3. Add c:\jtools\maven\bin to PATH
  4. Create ENV variable "MAVEN_HOME=c:\jtools\maven"
  5. For maven: Notes the jar repository is $HOME/.maven/repository, where $HOME is set to your home directory usually.

Note: The first time you run "maven" you probably need an network con nection for it'll try to download all the dependent jars.

Setup Your Certificate On Sourceforge

  1. Generate a certificate using the "ssh-keygen -r rsa" command. It'll generate a $HOME/.ssh/id_rsa and $HOME/.ssh/id_rsa.pub (your home may be in c:\cygwin\[user name ] )
  2. Go to the shell access link on sourceforge.net and see the insturction on how to set up a certificate authentication.
  3. Try ssh [username ] @shell.sourceforge.net after the certificate is activiated.
  4. See the man page on ssh for details. It's really important that you get this to work. See the sourceforge's documentation in order to see how this works.

To Build

  1. From Eclipse, Windows -> Open Perspectives -> Others
  2. Chose "CVS Repository Exploring"
  3. Right click on the "CVS Repositories" pane and select New -> Repository location
  4. Fill out the following:
    Host: cvs.sourceforge.net
    Repository path: /cvsroot/sketchalbum
    User: [user name]
    Password: [password]
    Connection type: extssh
    
  5. Click on Finish
  6. You should get an CVS entry in the pane. Expand that and you should see "HEAD", expand that and right-click on the "portaview" folder.
  7. Right-click that and select "Check Out As Project".
  8. Switch back to the default Java view. You should see a tree of files that got checked out as a result.
  9. Copy "project.properties.sample" (in the root portaview directory) to "project.properties". Note: DO NOT check in the project.properties in CVS.
  10. Eclipse should be able to build everything automatically.

Setting up Eclipse to Run PortaView

  1. In the run settings configuration panel (click on the down arrow of the "bug" icon in the toolbar and choose "Debug..."), create a new run configuration under "Java Application".
  2. In the "(x)=Arguments" tab, put this as your "Program arguments":
    -m -n "Cool PortaView" -i 127.0.0.1 -c 127.0.0.1 -a "src/test/test/portaview/images"
    
  3. Then click on "Debug". You should get a 3 pane panel.

To use Maven

  • In your project.properties file, change the "sourceforge.user" to your Sourceforge user name.
  • Run "maven" to build the jar in the "target" directory.
  • Run "maven site" to generate all the site files (ends up in "target/docs").
  • Run "maven rsync" the generated sites to sourceforge using rsync.exe. Please read the man page for rsync for details. You probably need to setup your ssh to use a certificate authentication with sourceforge's server.