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/05/16 11:12:37 UTC
incubator-taverna-engine git commit: Another filtering/escape level
to insert our versions
Repository: incubator-taverna-engine
Updated Branches:
refs/heads/master f2c12f8aa -> b5f8f0b81
Another filtering/escape level to insert our versions
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/commit/b5f8f0b8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/tree/b5f8f0b8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/diff/b5f8f0b8
Branch: refs/heads/master
Commit: b5f8f0b81fe3bc2475d8b6b754621647e1033c74
Parents: f2c12f8
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon May 16 12:11:17 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon May 16 12:11:17 2016 +0100
----------------------------------------------------------------------
taverna-activity-archetype/pom.xml | 16 +++++++++
.../__rootArtifactId__-activity-ui/pom.xml | 26 +++++++--------
.../__classPrefix__ConfigurationPanel.java | 9 ++----
.../config/__classPrefix__ConfigureAction.java | 11 +++----
.../__classPrefix__ConfigureMenuAction.java | 15 ++++-----
.../__classPrefix__ServiceDesc.java | 13 +++-----
.../__classPrefix__ServiceIcon.java | 11 +++----
.../__classPrefix__ServiceProvider.java | 13 +++-----
...classPrefix__ActivityContextViewFactory.java | 11 +++----
.../ui/view/__classPrefix__ContextualView.java | 17 ++++------
.../resources/META-INF/spring/context-osgi.xml | 8 ++---
.../main/resources/META-INF/spring/context.xml | 16 ++++-----
.../__rootArtifactId__-activity/pom.xml | 18 +++++------
.../src/main/java/__classPrefix__Activity.java | 13 +++-----
.../java/__classPrefix__ActivityFactory.java | 17 ++++------
.../__classPrefix__ActivityHealthChecker.java | 19 +++++------
.../resources/META-INF/spring/context-osgi.xml | 34 --------------------
.../main/resources/META-INF/spring/context.xml | 29 -----------------
.../src/main/resources/schema.json | 23 +++++++++++--
.../src/main/resources/spring/context-osgi.xml | 34 ++++++++++++++++++++
.../src/main/resources/spring/context.xml | 29 +++++++++++++++++
.../__classPrefix__ActivityFactoryTest.java | 15 ++++-----
.../test/java/__classPrefix__ActivityTest.java | 9 ++----
.../__rootArtifactId__-plugin/pom.xml | 24 +++++++-------
.../main/resources/archetype-resources/pom.xml | 26 +++++++--------
.../projects/dummyActivity/archetype.properties | 15 +++++++++
26 files changed, 240 insertions(+), 231 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/pom.xml b/taverna-activity-archetype/pom.xml
index fa6ce2f..dd2d032 100644
--- a/taverna-activity-archetype/pom.xml
+++ b/taverna-activity-archetype/pom.xml
@@ -31,6 +31,15 @@
Includes engine and UI parts, and a test class to run the workbench with the new activity.
</description>
<build>
+ <resources>
+ <resource>
+ <!-- Filter BEFORE making the Velocity templates
+ in target/classes - so that ${taverna.osgi.version}
+ etc. can be taken from OUR parent -->
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
@@ -43,6 +52,13 @@
<artifactId>maven-archetype-plugin</artifactId>
<version>2.4</version>
</plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <escapeString>\</escapeString>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/pom.xml b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/pom.xml
index 67a39b6..a2d0c18 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/pom.xml
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/pom.xml
@@ -15,44 +15,44 @@
##
## Note: Above Velocity comment should NOT be included in generated
## pom.xml from the archetype
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>${groupId}</groupId>
- <artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
+ <groupId>\${groupId}</groupId>
+ <artifactId>\${rootArtifactId}</artifactId>
+ <version>\${version}</version>
</parent>
- <artifactId>${artifactId}</artifactId>
+ <artifactId>\${artifactId}</artifactId>
<packaging>bundle</packaging>
- <name>${classPrefix} Taverna activity UI bindings</name>
+ <name>\${classPrefix} Taverna activity UI bindings</name>
<dependencies>
<dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${rootArtifactId}-activity</artifactId>
- <version>${version}</version>
+ <groupId>\${project.groupId}</groupId>
+ <artifactId>\${rootArtifactId}-activity</artifactId>
+ <version>\${version}</version>
</dependency>
<dependency>
<groupId>org.apache.taverna.workbench</groupId>
<artifactId>taverna-activity-palette-api</artifactId>
- <version>${taverna.workbench.version}</version>
+ <version>\${taverna.workbench.version}</version>
</dependency>
<dependency>
<groupId>org.apache.taverna.workbench</groupId>
<artifactId>taverna-menu-api</artifactId>
- <version>${taverna.workbench.version}</version>
+ <version>\${taverna.workbench.version}</version>
</dependency>
<dependency>
<groupId>org.apache.taverna.workbench</groupId>
<artifactId>taverna-contextual-views-api</artifactId>
- <version>${taverna.workbench.version}</version>
+ <version>\${taverna.workbench.version}</version>
</dependency>
<dependency>
<groupId>org.apache.taverna.workbench</groupId>
<artifactId>taverna-activity-tools</artifactId>
- <version>${taverna.workbench.version}</version>
+ <version>\${taverna.workbench.version}</version>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/config/__classPrefix__ConfigurationPanel.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/config/__classPrefix__ConfigurationPanel.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/config/__classPrefix__ConfigurationPanel.java
index 150b109..d7eb537 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/config/__classPrefix__ConfigurationPanel.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/config/__classPrefix__ConfigurationPanel.java
@@ -15,10 +15,7 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.ui.config;
+package \${package}.ui.config;
import java.awt.GridLayout;
import java.net.URI;
@@ -33,14 +30,14 @@ import org.apache.taverna.services.ServiceRegistry;
import org.apache.taverna.scufl2.api.activity.Activity;
@SuppressWarnings("serial")
-public class ${classPrefix}ConfigurationPanel extends ActivityConfigurationPanel {
+public class \${classPrefix}ConfigurationPanel extends ActivityConfigurationPanel {
private final ServiceRegistry serviceRegistry;
private JTextField fieldString;
private JTextField fieldURI;
- public ${classPrefix}ConfigurationPanel(Activity activity, ServiceRegistry serviceRegistry) {
+ public \${classPrefix}ConfigurationPanel(Activity activity, ServiceRegistry serviceRegistry) {
super(activity);
this.serviceRegistry = serviceRegistry;
initialise();
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/config/__classPrefix__ConfigureAction.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/config/__classPrefix__ConfigureAction.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/config/__classPrefix__ConfigureAction.java
index 4c17d12..24cf82b 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/config/__classPrefix__ConfigureAction.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/config/__classPrefix__ConfigureAction.java
@@ -15,10 +15,7 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.ui.config;
+package \${package}.ui.config;
import java.awt.event.ActionEvent;
@@ -33,13 +30,13 @@ import org.apache.taverna.workbench.ui.actions.activity.ActivityConfigurationAct
import org.apache.taverna.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog;
@SuppressWarnings("serial")
-public class ${classPrefix}ConfigureAction extends ActivityConfigurationAction {
+public class \${classPrefix}ConfigureAction extends ActivityConfigurationAction {
private final EditManager editManager;
private final FileManager fileManager;
private final ServiceRegistry serviceRegistry;
- public ${classPrefix}ConfigureAction(Activity activity,
+ public \${classPrefix}ConfigureAction(Activity activity,
EditManager editManager, FileManager fileManager,
ActivityIconManager activityIconManager,
ServiceDescriptionRegistry serviceDescriptionRegistry,
@@ -57,7 +54,7 @@ public class ${classPrefix}ConfigureAction extends ActivityConfigurationAction {
return;
}
- ${classPrefix}ConfigurationPanel panel = new ${classPrefix}ConfigurationPanel(getActivity(), serviceRegistry);
+ \${classPrefix}ConfigurationPanel panel = new ${classPrefix}ConfigurationPanel(getActivity(), serviceRegistry);
ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(), panel, editManager);
setDialog(getActivity(), dialog, fileManager);
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/menu/__classPrefix__ConfigureMenuAction.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/menu/__classPrefix__ConfigureMenuAction.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/menu/__classPrefix__ConfigureMenuAction.java
index 99121cb..669e1d0 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/menu/__classPrefix__ConfigureMenuAction.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/menu/__classPrefix__ConfigureMenuAction.java
@@ -15,10 +15,7 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.ui.menu;
+package \${package}.ui.menu;
import java.net.URI;
@@ -34,13 +31,13 @@ import org.apache.taverna.workbench.activitytools.AbstractConfigureActivityMenuA
import org.apache.taverna.workbench.edits.EditManager;
import org.apache.taverna.workbench.file.FileManager;
-import ${package}.ui.config.${classPrefix}ConfigureAction;
+import \${package}.ui.config.${classPrefix}ConfigureAction;
-public class ${classPrefix}ConfigureMenuAction extends AbstractConfigureActivityMenuAction implements
+public class \${classPrefix}ConfigureMenuAction extends AbstractConfigureActivityMenuAction implements
MenuComponent, ContextualMenuComponent {
private static final URI ACTIVITY_TYPE = URI
- .create("http://example.com/2013/activity/${rootArtifactId}");
+ .create("http://example.com/2013/activity/\${rootArtifactId}");
private EditManager editManager;
private FileManager fileManager;
@@ -48,13 +45,13 @@ public class ${classPrefix}ConfigureMenuAction extends AbstractConfigureActivity
private ServiceDescriptionRegistry serviceDescriptionRegistry;
private ServiceRegistry serviceRegistry;
- public ${classPrefix}ConfigureMenuAction() {
+ public \${classPrefix}ConfigureMenuAction() {
super(ACTIVITY_TYPE);
}
@Override
protected Action createAction() {
- Action result = new ${classPrefix}ConfigureAction(findActivity(), editManager, fileManager,
+ Action result = new \${classPrefix}ConfigureAction(findActivity(), editManager, fileManager,
activityIconManager, serviceDescriptionRegistry, serviceRegistry);
result.putValue(Action.NAME, "Configure example service");
addMenuDots(result);
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceDesc.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceDesc.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceDesc.java
index 4f63b9e..972ca8f 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceDesc.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceDesc.java
@@ -15,10 +15,7 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.ui.serviceprovider;
+package \${package}.ui.serviceprovider;
import java.net.URI;
import java.util.Arrays;
@@ -32,10 +29,10 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
import org.apache.taverna.servicedescriptions.ServiceDescription;
-public class ${classPrefix}ServiceDesc extends ServiceDescription {
+public class \${classPrefix}ServiceDesc extends ServiceDescription {
private static final URI ACTIVITY_TYPE = URI
- .create("http://example.com/2013/activity/${rootArtifactId}");
+ .create("http://example.com/2013/activity/\${rootArtifactId}");
// FIXME: Replace example fields and getters/setters with any required
// and optional fields. (All fields are searchable in the Service palette,
@@ -87,7 +84,7 @@ public class ${classPrefix}ServiceDesc extends ServiceDescription {
*/
@Override
public Icon getIcon() {
- return ${classPrefix}ServiceIcon.getIcon();
+ return \${classPrefix}ServiceIcon.getIcon();
}
/**
@@ -106,7 +103,7 @@ public class ${classPrefix}ServiceDesc extends ServiceDescription {
@Override
public List<String> getPath() {
// For deeper paths you may return several strings
- return Arrays.asList("${classPrefix}s " + exampleUri);
+ return Arrays.asList("\${classPrefix}s " + exampleUri);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceIcon.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceIcon.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceIcon.java
index fc9516f..a8f0f96 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceIcon.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceIcon.java
@@ -15,10 +15,7 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.ui.serviceprovider;
+package \${package}.ui.serviceprovider;
import java.net.URI;
@@ -27,10 +24,10 @@ import javax.swing.ImageIcon;
import org.apache.taverna.workbench.activityicons.ActivityIconSPI;
-public class ${classPrefix}ServiceIcon implements ActivityIconSPI {
+public class \${classPrefix}ServiceIcon implements ActivityIconSPI {
private static final URI ACTIVITY_TYPE = URI
- .create("http://example.com/2013/activity/${rootArtifactId}");
+ .create("http://example.com/2013/activity/\${rootArtifactId}");
private static Icon icon;
@@ -49,7 +46,7 @@ public class ${classPrefix}ServiceIcon implements ActivityIconSPI {
public static Icon getIcon() {
if (icon == null) {
- icon = new ImageIcon(${classPrefix}ServiceIcon.class.getResource("/exampleIcon.png"));
+ icon = new ImageIcon(\${classPrefix}ServiceIcon.class.getResource("/exampleIcon.png"));
}
return icon;
}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceProvider.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceProvider.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceProvider.java
index 2b0cf5e..bcf6055 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceProvider.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/serviceprovider/__classPrefix__ServiceProvider.java
@@ -15,10 +15,7 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.ui.serviceprovider;
+package \${package}.ui.serviceprovider;
import java.net.URI;
import java.util.ArrayList;
@@ -29,10 +26,10 @@ import javax.swing.Icon;
import org.apache.taverna.servicedescriptions.ServiceDescription;
import org.apache.taverna.servicedescriptions.ServiceDescriptionProvider;
-public class ${classPrefix}ServiceProvider implements ServiceDescriptionProvider {
+public class \${classPrefix}ServiceProvider implements ServiceDescriptionProvider {
private static final URI providerId = URI
- .create("http://example.com/2011/service-provider/${rootArtifactId}");
+ .create("http://example.com/2011/service-provider/\${rootArtifactId}");
/**
* Do the actual search for services. Return using the callBack parameter.
@@ -47,7 +44,7 @@ public class ${classPrefix}ServiceProvider implements ServiceDescriptionProvider
// FIXME: Implement the actual service search/lookup instead
// of dummy for-loop
for (int i = 1; i <= 5; i++) {
- ${classPrefix}ServiceDesc service = new ${classPrefix}ServiceDesc();
+ \${classPrefix}ServiceDesc service = new ${classPrefix}ServiceDesc();
// Populate the service description bean
service.setExampleString("Example " + i);
service.setExampleUri("http://localhost:8192/service");
@@ -69,7 +66,7 @@ public class ${classPrefix}ServiceProvider implements ServiceDescriptionProvider
* Icon for service provider
*/
public Icon getIcon() {
- return ${classPrefix}ServiceIcon.getIcon();
+ return \${classPrefix}ServiceIcon.getIcon();
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/view/__classPrefix__ActivityContextViewFactory.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/view/__classPrefix__ActivityContextViewFactory.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/view/__classPrefix__ActivityContextViewFactory.java
index 91b7afd..82c2904 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/view/__classPrefix__ActivityContextViewFactory.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/view/__classPrefix__ActivityContextViewFactory.java
@@ -15,10 +15,7 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.ui.view;
+package \${package}.ui.view;
import java.net.URI;
import java.util.Arrays;
@@ -34,10 +31,10 @@ import org.apache.taverna.workbench.file.FileManager;
import org.apache.taverna.workbench.ui.views.contextualviews.ContextualView;
import org.apache.taverna.workbench.ui.views.contextualviews.activity.ContextualViewFactory;
-public class ${classPrefix}ActivityContextViewFactory implements ContextualViewFactory<Activity> {
+public class \${classPrefix}ActivityContextViewFactory implements ContextualViewFactory<Activity> {
private static final URI ACTIVITY_TYPE = URI
- .create("http://example.com/2013/activity/${rootArtifactId}");
+ .create("http://example.com/2013/activity/\${rootArtifactId}");
private EditManager editManager;
private FileManager fileManager;
@@ -52,7 +49,7 @@ public class ${classPrefix}ActivityContextViewFactory implements ContextualViewF
@Override
public List<ContextualView> getViews(Activity selection) {
- return Arrays.<ContextualView>asList(new ${classPrefix}ContextualView(selection, editManager,
+ return Arrays.<ContextualView>asList(new \${classPrefix}ContextualView(selection, editManager,
fileManager, activityIconManager, serviceDescriptionRegistry, serviceRegistry));
}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/view/__classPrefix__ContextualView.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/view/__classPrefix__ContextualView.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/view/__classPrefix__ContextualView.java
index 25ec2b9..a34cf2c 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/view/__classPrefix__ContextualView.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/java/ui/view/__classPrefix__ContextualView.java
@@ -15,10 +15,7 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package}.ui.view;
+package \${package}.ui.view;
import java.awt.Frame;
@@ -39,10 +36,10 @@ import org.apache.taverna.workbench.ui.actions.activity.ActivityContextualView;
import org.apache.taverna.scufl2.api.activity.Activity;
-import ${package}.ui.config.${classPrefix}ConfigureAction;
+import \${package}.ui.config.${classPrefix}ConfigureAction;
@SuppressWarnings("serial")
-public class ${classPrefix}ContextualView extends ActivityContextualView {
+public class \${classPrefix}ContextualView extends ActivityContextualView {
private final EditManager editManager;
private final FileManager fileManager;
@@ -52,7 +49,7 @@ public class ${classPrefix}ContextualView extends ActivityContextualView {
private JLabel description = new JLabel("ads");
- public ${classPrefix}ContextualView(Activity activity, EditManager editManager,
+ public \${classPrefix}ContextualView(Activity activity, EditManager editManager,
FileManager fileManager, ActivityIconManager activityIconManager,
ServiceDescriptionRegistry serviceDescriptionRegistry, ServiceRegistry serviceRegistry) {
super(activity);
@@ -75,7 +72,7 @@ public class ${classPrefix}ContextualView extends ActivityContextualView {
@Override
public String getViewTitle() {
JsonNode configuration = getConfigBean().getJson();
- return "${classPrefix} service " + configuration.get("exampleString").asText();
+ return "\${classPrefix} service " + configuration.get("exampleString").asText();
}
/**
@@ -84,7 +81,7 @@ public class ${classPrefix}ContextualView extends ActivityContextualView {
@Override
public void refreshView() {
JsonNode configuration = getConfigBean().getJson();
- description.setText("${classPrefix} service " + configuration.get("exampleUri").asText()
+ description.setText("\${classPrefix} service " + configuration.get("exampleUri").asText()
+ " - " + configuration.get("exampleString").asText());
// TODO: Might also show extra service information looked
// up dynamically from endpoint/registry
@@ -101,7 +98,7 @@ public class ${classPrefix}ContextualView extends ActivityContextualView {
@Override
public Action getConfigureAction(final Frame owner) {
- return new ${classPrefix}ConfigureAction(getActivity(), editManager, fileManager,
+ return new \${classPrefix}ConfigureAction(getActivity(), editManager, fileManager,
activityIconManager, serviceDescriptionRegistry, serviceRegistry);
}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/resources/META-INF/spring/context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/resources/META-INF/spring/context-osgi.xml b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/resources/META-INF/spring/context-osgi.xml
index bca8cd6..13ceefb 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/resources/META-INF/spring/context-osgi.xml
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/resources/META-INF/spring/context-osgi.xml
@@ -23,13 +23,13 @@
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd">
- <service ref="${classPrefix}ServiceIcon" interface="org.apache.taverna.workbench.activityicons.ActivityIconSPI" />
+ <service ref="\${classPrefix}ServiceIcon" interface="org.apache.taverna.workbench.activityicons.ActivityIconSPI" />
- <service ref="${classPrefix}ServiceProvider" interface="org.apache.taverna.servicedescriptions.ServiceDescriptionProvider" />
+ <service ref="\${classPrefix}ServiceProvider" interface="org.apache.taverna.servicedescriptions.ServiceDescriptionProvider" />
- <service ref="${classPrefix}ConfigureMenuAction" auto-export="interfaces" />
+ <service ref="\${classPrefix}ConfigureMenuAction" auto-export="interfaces" />
- <service ref="${classPrefix}ActivityContextViewFactory" interface="org.apache.taverna.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
+ <service ref="\${classPrefix}ActivityContextViewFactory" interface="org.apache.taverna.workbench.ui.views.contextualviews.activity.ContextualViewFactory" />
<reference id="editManager" interface="org.apache.taverna.workbench.edits.EditManager" />
<reference id="fileManager" interface="org.apache.taverna.workbench.file.FileManager" />
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/resources/META-INF/spring/context.xml
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/resources/META-INF/spring/context.xml b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/resources/META-INF/spring/context.xml
index f5ff9d9..948d3d8 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/resources/META-INF/spring/context.xml
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity-ui/src/main/resources/META-INF/spring/context.xml
@@ -21,14 +21,14 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
- <bean id="${classPrefix}ServiceIcon"
- class="${package}.ui.serviceprovider.${classPrefix}ServiceIcon" />
+ <bean id="\${classPrefix}ServiceIcon"
+ class="\${package}.ui.serviceprovider.${classPrefix}ServiceIcon" />
- <bean id="${classPrefix}ServiceProvider"
- class="${package}.ui.serviceprovider.${classPrefix}ServiceProvider" />
+ <bean id="\${classPrefix}ServiceProvider"
+ class="\${package}.ui.serviceprovider.${classPrefix}ServiceProvider" />
- <bean id="${classPrefix}ConfigureMenuAction"
- class="${package}.ui.menu.${classPrefix}ConfigureMenuAction">
+ <bean id="\${classPrefix}ConfigureMenuAction"
+ class="\${package}.ui.menu.${classPrefix}ConfigureMenuAction">
<property name="editManager" ref="editManager" />
<property name="fileManager" ref="fileManager" />
<property name="activityIconManager" ref="activityIconManager" />
@@ -36,8 +36,8 @@
<property name="serviceRegistry" ref="serviceRegistry" />
</bean>
- <bean id="${classPrefix}ActivityContextViewFactory"
- class="${package}.ui.view.${classPrefix}ActivityContextViewFactory">
+ <bean id="\${classPrefix}ActivityContextViewFactory"
+ class="\${package}.ui.view.${classPrefix}ActivityContextViewFactory">
<property name="editManager" ref="editManager" />
<property name="fileManager" ref="fileManager" />
<property name="activityIconManager" ref="activityIconManager" />
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/pom.xml b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/pom.xml
index dafe1cc..1caf895 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/pom.xml
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/pom.xml
@@ -20,24 +20,24 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>${groupId}</groupId>
- <artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
+ <groupId>\${groupId}</groupId>
+ <artifactId>\${rootArtifactId}</artifactId>
+ <version>\${version}</version>
</parent>
- <artifactId>${artifactId}</artifactId>
+ <artifactId>\${artifactId}</artifactId>
<packaging>bundle</packaging>
- <name>${classPrefix} Taverna activity</name>
+ <name>\${classPrefix} Taverna activity</name>
<dependencies>
<dependency>
<groupId>org.apache.taverna.engine</groupId>
<artifactId>taverna-workflowmodel-api</artifactId>
- <version>${taverna.engine.version}</version>
+ <version>\${taverna.engine.version}</version>
</dependency>
<dependency>
<groupId>org.apache.taverna.engine</groupId>
<artifactId>taverna-reference-api</artifactId>
- <version>${taverna.engine.version}</version>
+ <version>\${taverna.engine.version}</version>
</dependency>
<dependency>
@@ -55,13 +55,13 @@
<dependency>
<groupId>org.apache.taverna.engine</groupId>
<artifactId>taverna-workflowmodel-impl</artifactId>
- <version>${taverna.engine.version}</version>
+ <version>\${taverna.engine.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.taverna.engine</groupId>
<artifactId>taverna-activity-test-utils</artifactId>
- <version>${taverna.engine.version}</version>
+ <version>\${taverna.engine.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__Activity.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__Activity.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__Activity.java
index f3ede4f..19fad6d 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__Activity.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__Activity.java
@@ -15,10 +15,7 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package};
+package \${package};
import java.util.ArrayList;
import java.util.HashMap;
@@ -36,12 +33,12 @@ import org.apache.taverna.workflowmodel.processor.activity.AsynchronousActivity;
import org.apache.taverna.workflowmodel.processor.activity.AsynchronousActivityCallback;
/**
- * ${classPrefix} <code>Activity<code>.
+ * \${classPrefix} <code>Activity<code>.
*/
-public class ${classPrefix}Activity extends AbstractAsynchronousActivity<JsonNode>
+public class \${classPrefix}Activity extends AbstractAsynchronousActivity<JsonNode>
implements AsynchronousActivity<JsonNode> {
- public static final String ACTIVITY_TYPE = "http://example.com/2013/activity/${rootArtifactId}";
+ public static final String ACTIVITY_TYPE = "http://example.com/2013/activity/\${rootArtifactId}";
/*
* Best practice: Keep port names as constants to avoid misspelling. This
@@ -114,7 +111,7 @@ public class ${classPrefix}Activity extends AbstractAsynchronousActivity<JsonNod
// try {
// results = this.service.invoke(firstInput, special)
// } catch (ServiceException ex) {
-// callback.fail("Could not invoke ${classPrefix} service " + configBean.getExampleUri(),
+// callback.fail("Could not invoke \${classPrefix} service " + configBean.getExampleUri(),
// ex);
// // Make sure we don't call callback.receiveResult later
// return;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__ActivityFactory.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__ActivityFactory.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__ActivityFactory.java
index 2b7de4c..c1fe1ba 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__ActivityFactory.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__ActivityFactory.java
@@ -15,12 +15,9 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package};
+package \${package};
-import static ${package}.${classPrefix}Activity.*;
+import static \${package}.${classPrefix}Activity.*;
import java.io.IOException;
import java.net.URI;
@@ -36,20 +33,20 @@ import org.apache.taverna.workflowmodel.processor.activity.ActivityInputPort;
import org.apache.taverna.workflowmodel.processor.activity.ActivityOutputPort;
/**
- * ${classPrefix} <code>ActivityFactory<code>.
+ * \${classPrefix} <code>ActivityFactory<code>.
*/
-public class ${classPrefix}ActivityFactory implements ActivityFactory {
+public class \${classPrefix}ActivityFactory implements ActivityFactory {
private Edits edits;
@Override
- public ${classPrefix}Activity createActivity() {
- return new ${classPrefix}Activity();
+ public \${classPrefix}Activity createActivity() {
+ return new \${classPrefix}Activity();
}
@Override
public URI getActivityType() {
- return URI.create(${classPrefix}Activity.ACTIVITY_TYPE);
+ return URI.create(\${classPrefix}Activity.ACTIVITY_TYPE);
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__ActivityHealthChecker.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__ActivityHealthChecker.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__ActivityHealthChecker.java
index 38d202a..0427c1f 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__ActivityHealthChecker.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/java/__classPrefix__ActivityHealthChecker.java
@@ -15,10 +15,7 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package};
+package \${package};
import java.net.URI;
import java.util.ArrayList;
@@ -32,17 +29,17 @@ import org.apache.taverna.workflowmodel.health.HealthCheck;
import org.apache.taverna.workflowmodel.health.HealthChecker;
/**
- * ${classPrefix} <code>HealthChecker</code>.
+ * \${classPrefix} <code>HealthChecker</code>.
*/
-public class ${classPrefix}ActivityHealthChecker implements
- HealthChecker<${classPrefix}Activity> {
+public class \${classPrefix}ActivityHealthChecker implements
+ HealthChecker<\${classPrefix}Activity> {
public boolean canVisit(Object o) {
// Return True if we can visit the object. We could do
// deeper (but not time consuming) checks here, for instance
- // if the health checker only deals with ${classPrefix}Activity where
+ // if the health checker only deals with \${classPrefix}Activity where
// a certain configuration option is enabled.
- return o instanceof ${classPrefix}Activity;
+ return o instanceof \${classPrefix}Activity;
}
public boolean isTimeConsuming() {
@@ -53,7 +50,7 @@ public class ${classPrefix}ActivityHealthChecker implements
return false;
}
- public VisitReport visit(${classPrefix}Activity activity, List<Object> ancestry) {
+ public VisitReport visit(\${classPrefix}Activity activity, List<Object> ancestry) {
JsonNode config = activity.getConfiguration();
// We'll build a list of subreports
@@ -77,7 +74,7 @@ public class ${classPrefix}ActivityHealthChecker implements
// The default explanation here will be used if the subreports list is
// empty
return new VisitReport(HealthCheck.getInstance(), activity,
- "${classPrefix} service OK", HealthCheck.NO_PROBLEM, subReports);
+ "\${classPrefix} service OK", HealthCheck.NO_PROBLEM, subReports);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/META-INF/spring/context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/META-INF/spring/context-osgi.xml b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/META-INF/spring/context-osgi.xml
deleted file mode 100644
index 769a344..0000000
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/META-INF/spring/context-osgi.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-## 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.
-##
-## Note: Above Velocity comment should NOT be included in generated
-## pom.xml from the archetype
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:beans="http://www.springframework.org/schema/beans"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/osgi
- http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
- <!-- Services to be registered with the OSGi service register -->
- <service ref="${classPrefix}ActivityHealthChecker" interface="org.apache.taverna.workflowmodel.health.HealthChecker" />
-
- <service ref="${classPrefix}ActivityFactory" interface="org.apache.taverna.workflowmodel.processor.activity.ActivityFactory" />
-
- <!-- References to services required from the OSGi service register -->
- <reference id="edits" interface="org.apache.taverna.workflowmodel.Edits" />
-
-</beans:beans>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/META-INF/spring/context.xml
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/META-INF/spring/context.xml b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/META-INF/spring/context.xml
deleted file mode 100644
index 7cbde6f..0000000
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/META-INF/spring/context.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-## 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.
-##
-## Note: Above Velocity comment should NOT be included in generated
-## xml from the archetype
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean id="${classPrefix}ActivityHealthChecker" class="${package}.${classPrefix}ActivityHealthChecker" />
-
- <bean id="${classPrefix}ActivityFactory" class="${package}.${classPrefix}ActivityFactory">
- <property name="edits" ref="edits" />
- </bean>
-
-</beans>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/schema.json
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/schema.json b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/schema.json
index 2916b11..04ac924 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/schema.json
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/schema.json
@@ -1,13 +1,30 @@
+## 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.
+##
+## Note: Above Velocity comment should NOT be included in generated
+## code from the archetype
{
"$schema": "http://json-schema.org/draft-03/schema#",
- "id": "http://example.com/2013/activity/${rootArtifactId}.schema.json",
- "title": "${classPrefix} activity configuration",
+ "id": "http://example.com/2013/activity/\${rootArtifactId}.schema.json",
+ "title": "\${classPrefix} activity configuration",
"type": "object",
"properties": {
"@context": {
"description": "JSON-LD context for interpreting the configuration as RDF",
"required": true,
- "enum": ["http://example.com/2013/activity/${rootArtifactId}.context.json"]
+ "enum": ["http://example.com/2013/activity/\${rootArtifactId}.context.json"]
},
"exampleString": {
"title": "Example String",
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/spring/context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/spring/context-osgi.xml b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/spring/context-osgi.xml
new file mode 100644
index 0000000..e0a850b
--- /dev/null
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/spring/context-osgi.xml
@@ -0,0 +1,34 @@
+## 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.
+##
+## Note: Above Velocity comment should NOT be included in generated
+## code from the archetype
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+ <!-- Services to be registered with the OSGi service register -->
+ <service ref="\${classPrefix}ActivityHealthChecker" interface="org.apache.taverna.workflowmodel.health.HealthChecker" />
+
+ <service ref="\${classPrefix}ActivityFactory" interface="org.apache.taverna.workflowmodel.processor.activity.ActivityFactory" />
+
+ <!-- References to services required from the OSGi service register -->
+ <reference id="edits" interface="org.apache.taverna.workflowmodel.Edits" />
+
+</beans:beans>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/spring/context.xml
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/spring/context.xml b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/spring/context.xml
new file mode 100644
index 0000000..395292e
--- /dev/null
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/main/resources/spring/context.xml
@@ -0,0 +1,29 @@
+## 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.
+##
+## Note: Above Velocity comment should NOT be included in generated
+## code from the archetype
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean id="\${classPrefix}ActivityHealthChecker" class="${package}.${classPrefix}ActivityHealthChecker" />
+
+ <bean id="\${classPrefix}ActivityFactory" class="${package}.${classPrefix}ActivityFactory">
+ <property name="edits" ref="edits" />
+ </bean>
+
+</beans>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/test/java/__classPrefix__ActivityFactoryTest.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/test/java/__classPrefix__ActivityFactoryTest.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/test/java/__classPrefix__ActivityFactoryTest.java
index 3b65685..adb3885 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/test/java/__classPrefix__ActivityFactoryTest.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/test/java/__classPrefix__ActivityFactoryTest.java
@@ -15,10 +15,7 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package};
+package \${package};
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -40,11 +37,11 @@ import org.apache.taverna.workflowmodel.processor.activity.ActivityOutputPort;
import org.junit.Before;
import org.junit.Test;
-public class ${classPrefix}ActivityFactoryTest {
+public class \${classPrefix}ActivityFactoryTest {
private ObjectNode configuration;
- private ${classPrefix}ActivityFactory activityFactory;
+ private \${classPrefix}ActivityFactory activityFactory;
@Before
public void setUp() throws Exception {
@@ -52,20 +49,20 @@ public class ${classPrefix}ActivityFactoryTest {
configuration.put("exampleString", "something");
configuration.put("exampleUri", "http://localhost:8080/myEndPoint");
- activityFactory = new ${classPrefix}ActivityFactory();
+ activityFactory = new \${classPrefix}ActivityFactory();
activityFactory.setEdits(new EditsImpl());
}
@Test
public void testCreateActivity() {
- ${classPrefix}Activity activity = activityFactory.createActivity();
+ \${classPrefix}Activity activity = activityFactory.createActivity();
assertNotNull(activity);
assertNotSame(activity, activityFactory.createActivity());
}
@Test
public void testGetActivityURI() {
- assertEquals(URI.create(${classPrefix}Activity.ACTIVITY_TYPE), activityFactory.getActivityType());
+ assertEquals(URI.create(\${classPrefix}Activity.ACTIVITY_TYPE), activityFactory.getActivityType());
}
@Test
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/test/java/__classPrefix__ActivityTest.java
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/test/java/__classPrefix__ActivityTest.java b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/test/java/__classPrefix__ActivityTest.java
index e9075be..f83fb39 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/test/java/__classPrefix__ActivityTest.java
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-activity/src/test/java/__classPrefix__ActivityTest.java
@@ -15,10 +15,7 @@
##
## Note: Above Velocity comment should NOT be included in generated
## code from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-package ${package};
+package \${package};
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -42,11 +39,11 @@ import org.apache.taverna.workflowmodel.processor.activity.ActivityOutputPort;
import org.junit.Before;
import org.junit.Test;
-public class ${classPrefix}ActivityTest {
+public class \${classPrefix}ActivityTest {
private ObjectNode configuration;
- private ${classPrefix}Activity activity = new ${classPrefix}Activity();
+ private \${classPrefix}Activity activity = new ${classPrefix}Activity();
@Before
public void makeConfiguration() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-plugin/pom.xml b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-plugin/pom.xml
index 1118ad1..1de5f26 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-plugin/pom.xml
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/__rootArtifactId__-plugin/pom.xml
@@ -15,30 +15,30 @@
##
## Note: Above Velocity comment should NOT be included in generated
## pom.xml from the archetype
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>${groupId}</groupId>
- <artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
+ <groupId>\${groupId}</groupId>
+ <artifactId>\${rootArtifactId}</artifactId>
+ <version>\${version}</version>
</parent>
- <artifactId>${artifactId}</artifactId>
+ <artifactId>\${artifactId}</artifactId>
<packaging>taverna-plugin</packaging>
- <name>${classPrefix} Taverna plugin</name>
+ <name>\${classPrefix} Taverna plugin</name>
<description>Description of Example Taverna plugin</description>
<dependencies>
<dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${rootArtifactId}-activity</artifactId>
- <version>${version}</version>
+ <groupId>\${project.groupId}</groupId>
+ <artifactId>\${rootArtifactId}-activity</artifactId>
+ <version>\${version}</version>
</dependency>
<!-- Enable for Workbench integration
<dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${rootArtifactId}-activity-ui</artifactId>
- <version>${version}</version>
+ <groupId>\${project.groupId}</groupId>
+ <artifactId>\${rootArtifactId}-activity-ui</artifactId>
+ <version>\${version}</version>
</dependency>
-->
</dependencies>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/main/resources/archetype-resources/pom.xml b/taverna-activity-archetype/src/main/resources/archetype-resources/pom.xml
index 932f961..fb336ef 100644
--- a/taverna-activity-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/taverna-activity-archetype/src/main/resources/archetype-resources/pom.xml
@@ -15,24 +15,24 @@
##
## Note: Above Velocity comment should NOT be included in generated
## pom.xml from the archetype
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>${groupId}</groupId>
- <artifactId>${artifactId}</artifactId>
- <version>${version}</version>
+ <groupId>\${groupId}</groupId>
+ <artifactId>\${artifactId}</artifactId>
+ <version>\${version}</version>
<packaging>pom</packaging>
- <name>${classPrefix} Taverna project</name>
+ <name>\${classPrefix} Taverna project</name>
<properties>
- <taverna.language.version>0.15.1-incubating</taverna.language.version>
- <taverna.osgi.version>0.2.1-incubating</taverna.osgi.version>
- <taverna.engine.version>3.1.0-incubating-SNAPSHOT</taverna.engine.version>
+ ## The ${} below are expanded from taverna-engine pom.xml
+ ## by resource filtering, rather than by Velocity
+ ## http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
+ <taverna.language.version>${taverna.language.version}</taverna.language.version>
+ <taverna.osgi.version>${taverna.osgi.version}</taverna.osgi.version>
+ <taverna.engine.version>${project.parent.version}</taverna.engine.version>
<taverna.workbench.version>3.1.0-incubating-SNAPSHOT</taverna.workbench.version>
</properties>
@@ -85,7 +85,7 @@
<plugin>
<groupId>org.apache.taverna.osgi</groupId>
<artifactId>taverna-maven-plugin</artifactId>
- <version>${taverna.osgi.version}</version>
+ <version>\${taverna.osgi.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
@@ -109,7 +109,7 @@
<pluginExecutionFilter>
<groupId>org.apache.taverna.orgi</groupId>
<artifactId>taverna-maven-plugin</artifactId>
- <versionRange>[${taverna.osgi.version},)</versionRange>
+ <versionRange>[\${taverna.osgi.version},)</versionRange>
<goals>
<goal>plugin-generate</goal>
</goals>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/b5f8f0b8/taverna-activity-archetype/src/test/resources/projects/dummyActivity/archetype.properties
----------------------------------------------------------------------
diff --git a/taverna-activity-archetype/src/test/resources/projects/dummyActivity/archetype.properties b/taverna-activity-archetype/src/test/resources/projects/dummyActivity/archetype.properties
index 8ea3260..dd81b6b 100644
--- a/taverna-activity-archetype/src/test/resources/projects/dummyActivity/archetype.properties
+++ b/taverna-activity-archetype/src/test/resources/projects/dummyActivity/archetype.properties
@@ -1,3 +1,18 @@
+## 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.
+##
groupId=com.example
artifactId=dummy-taverna-plugin
version=0.1.0-SNAPSHOT