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:18 UTC
[2/2] incubator-taverna-language git commit: Removed Scufl2Tool,
replaced by tavlang
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);
- }
-
- }
-}
-;