Maven Workflow Blocks

It is now possible to create workflow blocks from an Apache Maven project using your favourite IDE and then upload them automatically into e-Science Central.  These instructions assume that you’re comfortable running command line applications but there are equivalent methods in most IDEs.

To create a Java block:

1. Run the following command to create a new Maven project for a Java block

mvn archetype:generate				\
 -DarchetypeGroupId=com.connexience             \
 -DarchetypeArtifactId=workflow-block-java      \
 -DarchetypeVersion=3.0				\
 -DgroupId=sjw.test                             \
 -DartifactId=helloWorldJava 			\
 -Dversion=1.0-SNAPSHOT				\
 -DarchetypeRepository=http://www.esciencecentral.co.uk/artifactory/libs-release-local

You will need to replace the values for groupId and artifactId. This will create you a blank Java Workflow block that you can edit. The source code is src/main/java/MyService.java

2. Create the file $USER_HOME/.inkspot/maven.props and paste in the following contents. This will allow Maven to upload your new block into e-Science Central. You will need to edit the username and password but leave the other fields as they are. Alternatively, you can set the values directly in the project’s pom.xml

hostname=http://esciencecentral.co.uk
port=80
username=XXX
password=XXX

3. Now you can run ‘mvn install’ for your project.  It will build, package and upload the workflow block into e-Science Central.  The name of the block will be the artifactId for your project.  All project settings are as decsribed in the manual.

Whilst this has described the process for Java Blocks, R and Octave are very similar.  Just replace the archetypeArtifactId with workflow-block-r or workflow-block-octave in the archetype:generate command.
If you have any problems, please leave a comment or get in touch

 

Comments are closed.