myGrid

Remove hardcoded bootstrap locations/dependencies

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 1.5
  • Fix Version/s: 1.5
  • Component/s: None
  • Labels:
    None

Description

Bootstrap should check to see whether there's a local copy of Raven (i.e. taverna.home/repository/uk/org/mygrid/raven/1.5-SNAPSHOT/raven-1.5-SNAPSHOT.jar or whatever exists) and use that along with a local cached copy of the splashscreen in preference to allow Taverna to start when not connected to the network. Currently the boostrap class uses Raven from a URLClassLoader pointed at my maven repository. The list of remote repositories to use is currently hardcoded and should be read from a config file if present.

So:

  1. Get rid of hardcoded dependencies/locations
  2. Load configuration of those dependencies/location, write out defaults
  3. Make sure the whole thing can work offline

Issue Links

Activity

Hide
Stian Soiland-Reyes added a comment - 2006-10-19 16:29

Now with support for arbitrary repositories and target classes.

: stain@mira ~/Documents/workspace/taverna1.x;cat executeworkflow.sh
java \
-Draven.splashscreen=false \
-Draven.target.groupid=uk.org.mygrid.taverna.scufl \
-Draven.target.artifactid=scufl-tools \
-Draven.target.class=org.embl.ebi.escience.scufl.tools.WorkflowLauncher \
-Draven.target.method=main \
-jar taverna-bootstrap/target/taverna-bootstrap-1.5-SNAPSHOT.jar $@

: stain@mira ~/Documents/workspace/taverna1.x;sh executeworkflow.sh -help
usage: executeworkflow <workflow> [..]
Execute workflow and save outputs. Inputs can be specified by multiple
--input options, or loaded from an XML input document as saved from
Taverna. By default, a new directory is created named workflow.xml_output
unless the --output or --outputdocoptions are given. All files to be read
can be either a local file or an URL.

(does not work to execute workflows like this, as scufl-tools don't depend on any of the processors needed).

We should probably need to pop in the raven profile TAV-188 here as well.

The default properties are in taverna-bootstrap/src/main/resources/raven.properties, but can be overriden with system properties, as shown above.

For instance, you might want to add
raven.repository.0 = http://yourrepository.org/maven/ if your local repository is not in $HOME/.m2/repository.

(In fact, Raven works also for some non-mygrid stuff:

: stain@mira ~/Documents/workspace/taverna1.x;cat j2h.sh
java -Draven.splashscreen=false -Draven.target.groupid=java2html -Draven.target.artifactid=j2h -Draven.target.version=1.3.1 -Draven.target.class=j2h -Draven.target.method=main -jar taverna-bootstrap/target/taverna-bootstrap-1.5-SNAPSHOT.jar $@
: stain@mira ~/Documents/workspace/taverna1.x;sh j2h.sh
java2html:j2h:1.3.1 not found in file:/Users/stain/.m2/repository/
java2html:j2h:1.3.1 not found in http://www.mygrid.org.uk/maven/repository/
java2html:j2h:1.3.1 not found in file:/Users/stain/.m2/repository/
java2html:j2h:1.3.1 not found in http://www.mygrid.org.uk/maven/repository/
Java2HTML Version 1.3.1
Copyright (c) 2000-2003 Polygon Enterprises.
(..)

So if something is in Maven with proper dependencies, you could run it! (Now that leaves out anything larger than 1 jars in most cases.. I tried to run both Maven and ant like this)

I didn't add any magic for finding the main class from the .jar, left as an exercise for the reader.

Show
Stian Soiland-Reyes added a comment - 2006-10-19 16:29 Now with support for arbitrary repositories and target classes. : stain@mira ~/Documents/workspace/taverna1.x;cat executeworkflow.sh java \ -Draven.splashscreen=false \ -Draven.target.groupid=uk.org.mygrid.taverna.scufl \ -Draven.target.artifactid=scufl-tools \ -Draven.target.class=org.embl.ebi.escience.scufl.tools.WorkflowLauncher \ -Draven.target.method=main \ -jar taverna-bootstrap/target/taverna-bootstrap-1.5-SNAPSHOT.jar $@ : stain@mira ~/Documents/workspace/taverna1.x;sh executeworkflow.sh -help usage: executeworkflow <workflow> [..] Execute workflow and save outputs. Inputs can be specified by multiple --input options, or loaded from an XML input document as saved from Taverna. By default, a new directory is created named workflow.xml_output unless the --output or --outputdocoptions are given. All files to be read can be either a local file or an URL. (does not work to execute workflows like this, as scufl-tools don't depend on any of the processors needed). We should probably need to pop in the raven profile TAV-188 here as well. The default properties are in taverna-bootstrap/src/main/resources/raven.properties, but can be overriden with system properties, as shown above. For instance, you might want to add raven.repository.0 = http://yourrepository.org/maven/ if your local repository is not in $HOME/.m2/repository. (In fact, Raven works also for some non-mygrid stuff: : stain@mira ~/Documents/workspace/taverna1.x;cat j2h.sh java -Draven.splashscreen=false -Draven.target.groupid=java2html -Draven.target.artifactid=j2h -Draven.target.version=1.3.1 -Draven.target.class=j2h -Draven.target.method=main -jar taverna-bootstrap/target/taverna-bootstrap-1.5-SNAPSHOT.jar $@ : stain@mira ~/Documents/workspace/taverna1.x;sh j2h.sh java2html:j2h:1.3.1 not found in file:/Users/stain/.m2/repository/ java2html:j2h:1.3.1 not found in http://www.mygrid.org.uk/maven/repository/ java2html:j2h:1.3.1 not found in file:/Users/stain/.m2/repository/ java2html:j2h:1.3.1 not found in http://www.mygrid.org.uk/maven/repository/ Java2HTML Version 1.3.1 Copyright (c) 2000-2003 Polygon Enterprises. (..) So if something is in Maven with proper dependencies, you could run it! (Now that leaves out anything larger than 1 jars in most cases.. I tried to run both Maven and ant like this) I didn't add any magic for finding the main class from the .jar, left as an exercise for the reader.
Hide
Stian Soiland-Reyes added a comment - 2006-10-19 16:46

We should try to minimize even more what we have in Bootstrap, because it will be the single binary that remains for years on people's machines.

So the raven.properties should be fetched from mr. Intarnet.

Show
Stian Soiland-Reyes added a comment - 2006-10-19 16:46 We should try to minimize even more what we have in Bootstrap, because it will be the single binary that remains for years on people's machines. So the raven.properties should be fetched from mr. Intarnet.
Hide
Stian Soiland-Reyes added a comment - 2006-11-08 14:12

TAV-228 takes care of the remaining tasks.

Show
Stian Soiland-Reyes added a comment - 2006-11-08 14:12 TAV-228 takes care of the remaining tasks.

People

Vote (0)
Watch (0)

Dates

  • Created:
    2006-10-12 13:15
    Updated:
    2006-11-08 14:13
    Resolved:
    2006-11-08 14:13