You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2016/02/03 00:29:17 UTC
[1/2] incubator-taverna-language git commit: More README improvements
Repository: incubator-taverna-language
Updated Branches:
refs/heads/master 8fc9b5008 -> 76e1c6025
More README improvements
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/commit/6fd1a7e1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/tree/6fd1a7e1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/diff/6fd1a7e1
Branch: refs/heads/master
Commit: 6fd1a7e16ca46b8563a77fdd0641901f3b7c0a8a
Parents: 8fc9b50
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Feb 2 23:22:39 2016 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Feb 2 23:22:39 2016 +0000
----------------------------------------------------------------------
taverna-scufl2-api/README.md | 6 ++-
taverna-scufl2-examples/README.md | 85 +++++++++++++---------------------
2 files changed, 37 insertions(+), 54 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/6fd1a7e1/taverna-scufl2-api/README.md
----------------------------------------------------------------------
diff --git a/taverna-scufl2-api/README.md b/taverna-scufl2-api/README.md
index b6ef033..9e6a72f 100644
--- a/taverna-scufl2-api/README.md
+++ b/taverna-scufl2-api/README.md
@@ -36,7 +36,8 @@ of this API.
For more information, see the [SCUFL2 API][9] pages, the
-[Javadoc][10] and the [SCUFL2 examples](../scufl2-examples/).
+[Javadoc](http://taverna.incubator.apache.org/javadoc/taverna-language/)
+and the [SCUFL2 examples](../taverna-scufl2-examples/).
Usage
@@ -50,7 +51,8 @@ loading and saving of SCUFL2 workflows in the `.wfbundle` format.
All Scufl2 modules are also valid OSGi bundles, see the [OSGi
section](#osgi-services) below.
-See the [Taverna Language Javadoc][10] for documentation of classes and methods
+See the [Taverna Language Javadoc](http://taverna.incubator.apache.org/javadoc/taverna-language/)
+for documentation of classes and methods
of SCUFL2. The package
[org.apache.taverna.scufl2.api](http://taverna.incubator.apache.org/javadoc/taverna-language/org/apache/taverna/scufl2/api/package-summary.html)
is a good starting point.
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/6fd1a7e1/taverna-scufl2-examples/README.md
----------------------------------------------------------------------
diff --git a/taverna-scufl2-examples/README.md b/taverna-scufl2-examples/README.md
index 429d4e8..3b3c44e 100644
--- a/taverna-scufl2-examples/README.md
+++ b/taverna-scufl2-examples/README.md
@@ -1,64 +1,39 @@
SCUFL2 examples
===============
-Examples of using the [SCUFL2 API](http://dev.mygrid.org.uk/wiki/display/developer/SCUFL2+API) v0.14.0.
-
-[![Build Status](https://travis-ci.org/myGrid/scufl2-examples.svg?branch=master)](https://travis-ci.org/myGrid/scufl2-examples)
+Examples of using the [SCUFL2 API](http://taverna.incubator.apache.org/download/language/).
As this code is meant only as examples that you can extend and modify, the
groupId and package name are `org.apache.taverna.examples`, which should be changed
in your application.
-
-
-Download
---------
-Download the `scufl2-examples-0.x.x-standalone.jar` from the
-[latest build](http://build.mygrid.org.uk/ci/job/scufl2-examples/lastSuccessfulBuild/com.example$scufl2-examples/), or browse the [Maven snapshot repository](http://repository.mygrid.org.uk/artifactory/libs-snapshot-local/com/example/scufl2-examples/).
-
-This is a standalone executable JAR (see below).
-
+Note that while these examples are presented as command line tools for
+ease of testing, they are not recommended for general command line usage.
+Instead, see the [tavlang](../taverna-tavlang-tool) tool.
Build
-----
+To build, you'll need [Maven](http://maven.apache.org/download) 3.0.5 or newer, and run
+
+ mvn clean install
-To build, you'll need [Maven](http://maven.apache.org/download.cgi) 3.0.5 or newer, and run
-```mvn clean install```:
-
- C:\Users\stain\workspace\scufl2-examples> mvn clean install
-
- [INFO] ------------------------------------------------------------------------
- [INFO] Building SCUFL2 examples 0.1.1-SNAPSHOT
- [INFO] ------------------------------------------------------------------------
- [INFO]
- [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ scufl2-examples ---
- [INFO] Deleting C:\Users\stain\workspace\scufl2-examples\target
- (..)
- [INFO] Installing C:\Users\stain\workspace\scufl2-examples\target\scufl2-examples-0.1.1-SNAPSHOT.jar to C:\Users\stain\.m2\repository\com\example\scufl2-examples\0.1.1-SNAPSHOT\scufl2-examples-0.1.1-SNAPSHOT.jar
- [INFO] Installing C:\Users\stain\workspace\scufl2-examples\pom.xml to C:\Users\stain\.m2\repository\com\example\scufl2-examples\0.1.1-SNAPSHOT\scufl2-examples-0.1.1-SNAPSHOT.pom
- [INFO] ------------------------------------------------------------------------
- [INFO] BUILD SUCCESS
- [INFO] ------------------------------------------------------------------------
- [INFO] Total time: 6.223s
- [INFO] Finished at: Tue Apr 23 11:00:27 BST 2013
- [INFO] Final Memory: 15M/243M
- [INFO] ----------------
-
-To run the examples, see the folder ```target\scufl2-examples``` which has a `bin/` executable for each of the below tools. Note that these tools require the provided `bin/` and `lib/` folder structure.
-
-Alternatively you can use ```java -jar target/scufl2-examples-0.2.0-SNAPSHOT-standalone.jar``` - this is a standalone
-JAR file that can execute any of the tools as the first argument.
+To run the examples, see the folder ```target/scufl2-examples``` which has a `bin/`
+executable for each of the below tools. Note that these tools require the provided `bin/` and `lib/` folder structure.
+
+Alternatively you can use ```java -jar target/scufl2-examples-0.15.0-standalone.jar```
+(or equivalent filename) - this is a standalone
+JAR file that can execute any of the tools as the first argument.
Linux users can install this with:
chmod 755 target/scufl2-examples-*-standalone.jar
sudo cp target/scufl2-examples-*-standalone.jar /usr/local/bin/scufl2tool
-
+
as long as JAR files are recognized as executables:
- stain@biggie-mint ~/src/scufl2-examples $ target/scufl2-examples-0.2.0-SNAPSHOT-standalone.jar
+ stain@biggie-mint ~/src/scufl2-examples $ target/scufl2-examples-0.15.0-standalone.jar
SCUFL2 workflow tool
Usage: scufl2tool <tool> [option] ...
@@ -78,8 +53,8 @@ This tool lists a tree of the processor names in the workflows of the given bund
C:\Users\stain\workspace\scufl2-examples> target\scufl2-examples\bin\processornames examples/helloworld.t2flow
+ Hello_World
- hello
-
-
+
+
C:\Users\stain\workspace\scufl2-examples> target\scufl2-examples\bin\processornames examples/helloanyone.t2flow
+ Hello_Anyone
- Concatenate_two_strings
@@ -103,12 +78,12 @@ See the source code for [org.apache.taverna.examples.ServiceTypes](src/main/java
workflowmaker
-------------
-This tool shows how to construct a workflow from scratch and save it as a
+This tool shows how to construct a workflow from scratch and save it as a
[SCUFL2 wfbundle](http://dev.mygrid.org.uk/wiki/display/developer/Taverna+Workflow+Bundle).
C:\Users\stain\workspace\scufl2-examples> target\scufl2-examples\bin\workflowmaker
Written to C:\Users\stain\AppData\Local\Temp\test6264603033381329995.wfbundle
-
+
WorkflowBundle '4fdb73e3-a5c6-41a8-aafb-32f67ca552b2'
MainWorkflow 'Echotest'
Workflow 'Echotest'
@@ -140,20 +115,20 @@ This tool shows how to construct a workflow from scratch and save it as a
'''out1 = in1'''
-See the source code for [org.apache.taverna.examples.WorkflowMaker](src/main/java/org/apache/taverna/WorkflowMaker.java)
+See the source code for [WorkflowMaker](src/main/java/org/apache/taverna/examples/WorkflowMaker.java)
for how this is implemented.
t2flowtowfbundle
----------------
-This tool shows how to convert a *.t2flow* file to a
-[SCUFL2 .wfbundle](http://dev.mygrid.org.uk/wiki/display/developer/Taverna+Workflow+Bundle).
+This tool shows how to convert a *.t2flow* file to a
+[SCUFL2 .wfbundle](http://taverna.incubator.apache.org/documentation/scufl2/bundle).
C:\Users\stain\workspace\scufl2-examples> rm helloworld.wfbundle
-
+
C:\Users\stain\workspace\scufl2-examples> target\scufl2-examples\bin\t2flowtowfbu
-
+
C:\Users\stain\workspace\scufl2-examples> unzip -t helloworld.wfbundle
Archive: helloworld.wfbundle
testing: mimetype OK
@@ -173,8 +148,8 @@ This tool shows how to convert a *.t2flow* file to a
testing: META-INF/container.xml OK
No errors detected in compressed data of helloworld.wfbundle.
-See the source code for
-[org.apache.taverna.examples.ConvertT2flowToWorkflowBundle.java](src/main/java/org/apache/taverna/examples/ConvertT2flowToWorkflowBundle.java)
+See the source code for
+[ConvertT2flowToWorkflowBundle.java](src/main/java/org/apache/taverna/examples/ConvertT2flowToWorkflowBundle.java)
for how this is implemented.
The included files [helloworld.wfbundle](helloworld.wfbundle?raw=true) and
@@ -204,13 +179,15 @@ Converting multiple files:
c:\Users\stain\src\scufl2-examples> target\scufl2-examples\bin\jsonexport examples/helloworld.t2flow examples/helloanyone.wfbundle
examples/helloworld.json
examples/helloanyone.json
-
+
See the converted [examples/helloworld.json](helloworld.json) and
[examples/helloanyone.json](helloanyone.json).
Example using STDIN/STDOUT:
c:\Users\stain\src\scufl2-examples> target\scufl2-examples\bin\jsonexport - < examples/helloworld.t2flow
+
+```json
{
"@context" : [ "https://w3id.org/scufl2/context", {
"@base" : "http://ns.taverna.org.uk/2010/workflowBundle/8781d5f4-d0ba-48a8-a1d1-14281bd8a917/"
@@ -248,4 +225,8 @@ Example using STDIN/STDOUT:
"http://purl.org/dc/terms/title" : "Hello World"
}
}
+```
+This JSON export is also available as `application/json` using the
+[WorkflowBundleIO](http://taverna.incubator.apache.org/javadoc/taverna-language/org/apache/taverna/scufl2/api/io/WorkflowBundleIO.html) API
+if `taverna-scufl2-examples` is on the class path.
[2/2] incubator-taverna-language git commit: Removed Scufl2Tool,
replaced by tavlang
Posted by st...@apache.org.
Removed Scufl2Tool, replaced by tavlang
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/commit/76e1c602
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/tree/76e1c602
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/diff/76e1c602
Branch: refs/heads/master
Commit: 76e1c6025f9a83aed731a02a4050bc63af8f2969
Parents: 6fd1a7e
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue Feb 2 23:29:09 2016 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue Feb 2 23:29:09 2016 +0000
----------------------------------------------------------------------
taverna-scufl2-examples/README.md | 23 -----
taverna-scufl2-examples/pom.xml | 29 +-----
.../org/apache/taverna/examples/Scufl2Tool.java | 101 -------------------
3 files changed, 2 insertions(+), 151 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/76e1c602/taverna-scufl2-examples/README.md
----------------------------------------------------------------------
diff --git a/taverna-scufl2-examples/README.md b/taverna-scufl2-examples/README.md
index 3b3c44e..a03da30 100644
--- a/taverna-scufl2-examples/README.md
+++ b/taverna-scufl2-examples/README.md
@@ -22,29 +22,6 @@ To build, you'll need [Maven](http://maven.apache.org/download) 3.0.5 or newer,
To run the examples, see the folder ```target/scufl2-examples``` which has a `bin/`
executable for each of the below tools. Note that these tools require the provided `bin/` and `lib/` folder structure.
-Alternatively you can use ```java -jar target/scufl2-examples-0.15.0-standalone.jar```
-(or equivalent filename) - this is a standalone
-JAR file that can execute any of the tools as the first argument.
-
-Linux users can install this with:
-
- chmod 755 target/scufl2-examples-*-standalone.jar
- sudo cp target/scufl2-examples-*-standalone.jar /usr/local/bin/scufl2tool
-
-as long as JAR files are recognized as executables:
-
- stain@biggie-mint ~/src/scufl2-examples $ target/scufl2-examples-0.15.0-standalone.jar
- SCUFL2 workflow tool
- Usage: scufl2tool <tool> [option] ...
-
- Available tools:
- t2flowtowfbundle - Convert t2flow workflows to wfbundle
- jsonexport - Export JSON structure of workflow
- processornames - List tree of processor names in workflow
- servicetypes - List service types used in workflow
- workflowmaker - Create an example workflow programmatically
-
-
processornames
--------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/76e1c602/taverna-scufl2-examples/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-scufl2-examples/pom.xml b/taverna-scufl2-examples/pom.xml
index 896ad88..59a2926 100644
--- a/taverna-scufl2-examples/pom.xml
+++ b/taverna-scufl2-examples/pom.xml
@@ -23,6 +23,7 @@
<version>0.15.1-incubating-SNAPSHOT</version>
</parent>
<artifactId>taverna-scufl2-examples</artifactId>
+ <packaging>bundle</packaging>
<name>Apache Taverna Scufl 2 examples</name>
<dependencies>
<dependency>
@@ -67,7 +68,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
- <version>1.1.1</version>
+ <version>1.10</version>
<executions>
<execution>
<id>assemble</id>
@@ -105,32 +106,6 @@
</programs>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <shadedArtifactAttached>true</shadedArtifactAttached>
- <shadedClassifierName>standalone</shadedClassifierName>
- <transformers>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
- <mainClass>org.apache.taverna.examples.Scufl2Tool</mainClass>
- </transformer>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer" />
- <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
- <transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
- <resource>META-INF/spring</resource>
- </transformer>
- </transformers>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/76e1c602/taverna-scufl2-examples/src/main/java/org/apache/taverna/examples/Scufl2Tool.java
----------------------------------------------------------------------
diff --git a/taverna-scufl2-examples/src/main/java/org/apache/taverna/examples/Scufl2Tool.java b/taverna-scufl2-examples/src/main/java/org/apache/taverna/examples/Scufl2Tool.java
deleted file mode 100644
index 1f2a842..0000000
--- a/taverna-scufl2-examples/src/main/java/org/apache/taverna/examples/Scufl2Tool.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.apache.taverna.examples;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * A wrapper around the other example main() methods
- *
- * This in order to make a single executable JAR file.
- *
- * @author Stian Soiland-Reyes
- *
- */
-public class Scufl2Tool {
-
- public enum Tool {
- t2flowtowfbundle(ConvertT2flowToWorkflowBundle.class, "Convert t2flow workflows to wfbundle"),
- jsonexport(JsonExport.class, "Export JSON structure of workflow"),
- processornames(ProcessorNames.class, "List tree of processor names in workflow"),
- servicetypes(ServiceTypes.class, "List service types used in workflow"),
- workflowmaker(WorkflowMaker.class, "Create an example workflow programmatically");
-
- private final String description;
- private final Class<?> mainClass;
-
- Tool(Class<?> mainClass, String description) {
- this.mainClass = mainClass;
- this.description = description;
- }
-
- @Override
- public String toString() {
- return name() + " - " + description;
- }
-
- public Class<?> getMainClass() {
- return mainClass;
- }
- }
-
- public static void main(String[] args) throws IllegalAccessException,
- IllegalArgumentException, InvocationTargetException,
- NoSuchMethodException, SecurityException {
- List<String> argsList = Arrays.asList(args);
- if (argsList.isEmpty() || argsList.get(0).equals("-h")) {
- help();
- return;
- }
- Tool tool;
- try {
- tool = Tool.valueOf(argsList.get(0).toLowerCase());
- } catch (IllegalArgumentException e) {
- System.err.println("Invalid tool: " + argsList.get(0));
- help();
- return;
- }
-
- // Find and invoke the main method
- Class<?> mainCls = tool.getMainClass();
- Method main = mainCls.getMethod("main", String[].class);
- // But stripping out the first argument
- args = argsList.subList(1, argsList.size()).toArray(new String[0]);
- // Array of arrays!
- Object[] mainArgs = new Object[]{args};
- main.invoke(null, mainArgs);
- }
-
- public static void help() {
- System.out.println("SCUFL2 workflow tool");
- System.out.println("Usage: scufl2tool <tool> [option] ...");
- System.out.println();
- System.out.println("Available tools:");
- for (Tool tool : Tool.values()) {
- System.out.println(tool);
- }
-
- }
-}
-;