GridSafeDocumentation/Building/

Building Grid-SAFE

Obtain source code

The easiest way to obtain the Grid-SAFE code is via CVS

cvs -d:pserver:anonymous@gridsafe.cvs.sourceforge.net:/cvsroot/gridsafe login

cvs -z3 -d:pserver:anonymous@gridsafe.cvs.sourceforge.net:/cvsroot/gridsafe co WEBPORTAL

The program can then be built using ant.

$ ant
Buildfile: build.xml

basic:
     [copy] Copying 48 files to /tmp/WEBPORTAL/build
     [copy] Copying 6 files to /tmp/WEBPORTAL/build/css
     [copy] Copying 1 file to /tmp/WEBPORTAL/build/WEB-INF
     [copy] Copying 4 files to /tmp/WEBPORTAL/build/WEB-INF/classes
     [copy] Copying 1 file to /tmp/WEBPORTAL/build/WEB-INF/email-templates
     [copy] Copying 24 files to /tmp/WEBPORTAL/build/WEB-INF/lib
     [copy] Copying 1 file to /tmp/WEBPORTAL/build/WEB-INF/lib
     [copy] Copying 9 files to /tmp/WEBPORTAL/build/WEB-INF/report-templates
     [copy] Copying 15 files to /tmp/WEBPORTAL/build/WEB-INF/schema
     [copy] Copying 16 files to /tmp/WEBPORTAL/build/WEB-INF/stylesheets

compile-java:
    [javac] Compiling 275 source files to /tmp/WEBPORTAL/build/WEB-INF/classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

service:

service-flavour:

prepare:
Trying to override old definition of task jasper2
  [jasper2] log4j:WARN No appenders could be found for logger (org.apache.jasper.JspC).
  [jasper2] log4j:WARN Please initialize the log4j system properly.

compile-jsps:
    [javac] Compiling 24 source files
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

BUILD SUCCESSFUL
Total time: 5 seconds

The default ant target builds a war file for upload to tomcat. If you also wish to use the command line tools build the app-jar target

$ ant app-jar
Buildfile: build.xml

basic:

compile-java:

service:

service-flavour:

prepare:
Trying to override old definition of task jasper2
  [jasper2] log4j:WARN No appenders could be found for logger (org.apache.jasper.JspC).
  [jasper2] log4j:WARN Please initialize the log4j system properly.

app-jar:
  [one-jar] Building jar: /tmp/WEBPORTAL/gridsafe-apps.jar

BUILD SUCCESSFUL
Total time: 2 seconds

The ant build.xml is written to support building different variations of the code. It does this by adding files from the services directory to the build. To include files from the services/service-name directory tree into the build define the service.id parameter on the ant command line.

$ ant -Dservice.id=ngs
Buildfile: build.xml

basic:

compile-java:

service:
     [copy] Copying 1 file to /tmp/WEBPORTAL/build
     [copy] Copying /tmp/WEBPORTAL/services/ngs/WEB-INF/classes/deploy-config.properties to /tmp/WEBPORTAL/build/WEB-INF/classes/deploy-config.properties

service-flavour:

prepare:
Trying to override old definition of task jasper2
  [jasper2] log4j:WARN No appenders could be found for logger (org.apache.jasper.JspC).
  [jasper2] log4j:WARN Please initialize the log4j system properly.

compile-jsps:

BUILD SUCCESSFUL
Total time: 1 second

This allows you to add local configuration to your deployment without having your changes overwritten every time you update the grid-SAFE code from the CVS repository.

 

Grid-SAFE was funded by JISC and is maintained, developed, and managed by EPCC at the University of Edinburgh