aDepending on both x-activity-ui modules (or for the command line,
both x-activity modules) from the same plugin should be sufficient -
you might want to put both activities into the same master project to
achieve this.

Here's an example from a different plugin:

https://github.com/wf4ever/astrotaverna

defines several activities and activity-uis, like

PDL-activity-ui
stilts-activity-ui

and in 
https://github.com/wf4ever/astrotaverna/blob/master/astrotaverna-plugin/pom.xml

they are all listed as dependencies:

<dependency>
  <groupId>${project.groupId}</groupId>
  <artifactId>stilts-activity-ui</artifactId>
  <version>${project.version}</version>
</dependency>

<dependency>
  <groupId>${project.groupId}</groupId>
  <artifactId>PDL-activity-ui</artifactId>
   <version>${project.version}</version>
</dependency>

This would mean they are all be added to the generated plugin file:

http://wf4ever.github.io/astrotaverna/astrotaverna-plugin-1.10.xml


However in your case you would need to manually edit the generated
plugins file to add the <system>true</system> on the additional
dependency (which unfortunately the taverna-maven-plugin does not
support at the moment).


On 26 March 2014 12:23, Sidney Niccolson <sidneyniccol...@gmail.com> wrote:
> Hi,
>
> Thanks for the reply. I managed to have both plugins working by explicitly
> adding the jersey-bundle dependecy to the plugin pom.xml and specifying the
> dependency in the upload/download-activity pom.xml. Manually adding the
> <system>true</system> tag for the jersey-bundle dependency (and additionally
> jersey multipart dependency for the upload plugin) of the deployed
> plugin.xml solved the issue.
> I have not found a way to have these services (upload/download activities)
> inside one plugin. How can I develop these activities inside one single
> plugin instead of two separate plugins?
>
> Cheers,
>
> Sidney
>
>
> On Mon, Mar 24, 2014 at 2:12 PM, Stian Soiland-Reyes
> <soiland-re...@cs.manchester.ac.uk> wrote:
>>
>> Have you got a stack trace for where javax/ws/rs/core/MultivaluedMap
>> is not found?
>>
>> It is from the POM file of that class that needs (directly or
>> indirectly) need to depend on the JAR that contains MultivaluedMap. So
>> let's say jersey-client depends on javax.ws.rs.core.MultivaluedMap but
>> has not stated so in its POM - then you will get the stack trace
>> above.
>>
>> The difference from running in TavernaWorkBenchWithExamplePlugin and
>> within Taverna Workbench is that in the first case you get a flat
>> classpath, and so just adding the dependency to the activity's POM
>> file is enough - however within Taverna Workbench's plugin system
>> dependencies are only looked for in depth - so if jersey-client does
>> not state it needs this, it will not be added.
>>
>>
>> Normally the resolution to this is to either redeploy the broken POM
>> file to explicitly add the dependency (under a different version
>> number) - or (when you have circular dependencies) to make a mega-jar
>> that includes all the JARs merged together as a single JAR.  Finally,
>> one solution Taverna supports is to add a 'system' dependency - this
>> is equivalent to adding the JAR file to lib/ in Taverna's startup
>> folder. It should be the last resort - as it affact any other part of
>> Taverna that might depend on the library - a system dependency will
>> always 'override' any explicitly declared dependencies - so a
>> potentitally older (or newer) version might appear to those other
>> parts.
>>
>> This really only works for libraries that don't themselves have
>> further dependencies - as the system dependencies are loaded outside
>> the plugin system - I believe this should work well for you, so try to
>> add to your plugins.xml file:
>>
>> <dependency>
>>     <groupId>javax.ws.rs</groupId>
>>     <artifactId>javax.ws.rs-api</artifactId>
>>     <version>2.0</version>
>>     <system>true</system>
>> <dependency>
>>
>> Note that you will probably need to edit and release Taverna's plugin
>> file manually in order for this to work, as <system>true</system> is
>> not a standard Maven configuration.
>>
>>
>>
>> On 19 March 2014 17:35, Sidney Niccolson <sidneyniccol...@gmail.com>
>> wrote:
>> > Hi,
>> >
>> > Recently I followed the tutorials on creating plugins for Taverna 2. I
>> > managed to develop a plugin for uploading large files to a Tomcat
>> > server.
>> > The server contains a REST service developed with the Jersey API, where
>> > the
>> > post method is used for uploading.The Taverna plugin contains user-side
>> > (client) code which is directly dependent on jersey-client, jersey-core,
>> > jersey-multipart, mimepull. I got the following questions/notes
>> > regarding
>> > the plugin:
>> >
>> > 1: When invoking the service (plugin) the following error occurs:
>> > java.lang.NoClassDefFoundError: javax/ws/rs/core/MultivaluedMap. This
>> > seems
>> > to be an indirect dependency used by Jersey. I do not understand why
>> > this
>> > class is not available even though the jersey-core package contains this
>> > specific class. Looking at the /home/user/.taverna-2.4.0/repository/
>> > folder
>> > on the client side I am able to see the packages specified in the
>> > pom.xml of
>> > the Maven plugin project. I also added the javax-ws.rs-api as an
>> > dependency
>> > to the pom.xml but this does not solve the issue.
>> >
>> > 2: Running the TavernaWorkBenchWithExamplePlugin.java does not give the
>> > NoClassDefFoundError and works perfectly.
>> >
>> > 3: I developed another plugin for downloading large files successfully.
>> > This
>> > service is dependent on jersey-client. I added the jersey-bundle which
>> > contains the jersey-client package as a dependency to the pom.xml. This
>> > dependency seems enough to make the download plugin work.
>> >
>> > 4:Regarding the previous notes I am not able to solve this dependency
>> > issue
>> > for the upload plugin. Am I missing additional dependencies or else why
>> > is
>> > Taverna not able to locate the MultiValuedMap class ? The attachment of
>> > this
>> > mail contains the pom.xml of the Uploader-activity. I also tried adding
>> > the
>> > same dependencies in the pom.xml of the parent project (Uploader) but to
>> > no
>> > avail.
>> >
>> > Cheers,
>> >
>> > Sidney
>> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Learn Graph Databases - Download FREE O'Reilly Book
>> > "Graph Databases" is the definitive new guide to graph databases and
>> > their
>> > applications. Written by three acclaimed leaders in the field,
>> > this first edition is now available. Download your free book today!
>> > http://p.sf.net/sfu/13534_NeoTech
>> > _______________________________________________
>> > taverna-hackers mailing list
>> > taverna-hackers@lists.sourceforge.net
>> > Web site: http://www.taverna.org.uk
>> > Mailing lists: http://www.taverna.org.uk/about/contact-us/
>> > Developers Guide: http://www.taverna.org.uk/developers/
>>
>>
>>
>> --
>> Stian Soiland-Reyes, myGrid team
>> School of Computer Science
>> The University of Manchester
>> http://soiland-reyes.com/stian/work/ http://orcid.org/0000-0001-9842-9718
>>
>>
>> ------------------------------------------------------------------------------
>> Learn Graph Databases - Download FREE O'Reilly Book
>> "Graph Databases" is the definitive new guide to graph databases and their
>> applications. Written by three acclaimed leaders in the field,
>> this first edition is now available. Download your free book today!
>> http://p.sf.net/sfu/13534_NeoTech
>> _______________________________________________
>> taverna-hackers mailing list
>> taverna-hackers@lists.sourceforge.net
>> Web site: http://www.taverna.org.uk
>> Mailing lists: http://www.taverna.org.uk/about/contact-us/
>> Developers Guide: http://www.taverna.org.uk/developers/
>
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> taverna-hackers mailing list
> taverna-hackers@lists.sourceforge.net
> Web site: http://www.taverna.org.uk
> Mailing lists: http://www.taverna.org.uk/about/contact-us/
> Developers Guide: http://www.taverna.org.uk/developers/



-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/0000-0001-9842-9718

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
taverna-hackers mailing list
taverna-hackers@lists.sourceforge.net
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/
Developers Guide: http://www.taverna.org.uk/developers/

Reply via email to