Hi Stian,

I really appreciate your long reply.  But I am still having trouble with it.
As a first step, I'm just trying to deploy the myfancytool-taverna plugin as a 
test.

I have some questions about that "Maven plugin for managing Taverna plugins" 
tutorial

1.  When I followed the myfancytool-taverna example from the tutorial on the 
taverna website, I automatically got 3 pom.xml's.   I only need to modify the 
pom.xml from the top level directory, right? 
./example-activity/pom.xml
./example-activity-ui/pom.xml
./pom.xml

2. From the "Maven plugin for managing Taverna plugins" tutorial, I should not 
modify the   <pluginRepositories>
 section right?

3.  This Maven plugin will automatically create pluginlist.xml and 
myfancytool-plugin.xml, right?

4. In that sample pom.xml, is that "http://www.example.com/maven/repository"; 
just a plain web directory?  I mean, I just went to /var/www/html and created a 
maven2 directory.  Or would I have to set up some kind fo special maven 
repository.  I also set up ftp and added the info to my distributionManagement 
section.  I was planning on copying the ftp directory to /var/www/html/maven2.  
Is that ok assuming I don't plan to update the plugin again?  

5.  After I modified my pom.xml (from the one created by the 
myfancytool-taverna tutorial) and then "mvn package", I got the error below, 
any ideas?  I have attached my modified pom.xml (renamed to pom.txt because my 
email server doesn't seem to allow me to upload xml files) and would really 
appreciate it if you could take a look.  
[INFO] Scanning for projects...
Downloading: 
http://www.mygrid.org.uk/maven/repository/net/sf/taverna/t2/maven/plugins/maven-taverna-plugin/0.0.1-SNAPSHOT/maven-taverna-plugin-0.0.1-SNAPSHOT.pom
[INFO] Unable to find resource 
'net.sf.taverna.t2.maven.plugins:maven-taverna-plugin:pom:0.0.1-SNAPSHOT' in 
repository mygrid-repository (http://www.mygrid.org.uk/maven/repository)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: net.sf.taverna.t2.maven.plugins:maven-taverna-plugin

Reason: POM 'net.sf.taverna.t2.maven.plugins:maven-taverna-plugin' not found in 
repository: Unable to download the artifact from any repository

  net.sf.taverna.t2.maven.plugins:maven-taverna-plugin:pom:0.0.1-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  mygrid-repository (http://vm6.ucsd.edu/maven2)

 for project net.sf.taverna.t2.maven.plugins:maven-taverna-plugin


Thanks
Jane

________________________________________
From: Stian Soiland-Reyes [[email protected]]
Sent: Tuesday, January 11, 2011 12:51 AM
To: List for general discussion and hacking of the Taverna project
Subject: Re: [Taverna-hackers] Problems Deploying a New Plugin

On Tue, Jan 11, 2011 at 06:19, Jane Ren <[email protected]> wrote:
> But in my directory, I have only a couple of pom.xmls, so how do I get the 
> xml that I need to add to pluginlist.xml?  It doesn't seem like I have any 
> xml files I can the path to pluginlist.xml.  Any ideas?

This bit is unfortunately not yet covered by our tutorial.

We've got a Maven plugin that can help you generate the plugin file.

See 
http://www.mygrid.org.uk/dev/wiki/display/developer/Maven+plugin+for+managing+Taverna+plugins


Alternatively, look at
http://www.mygrid.org.uk/taverna/updates/2.2.0/plugins/prototype/ for
some inspiration based on the prototype plugins.

The most important things to get right based on this example:



<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<plugins:plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://taverna.sf.net/2008/xml/plugins
    http://taverna.sourceforge.net/2008/xml/plugins/plugins-2008-10-16.xsd";
    xmlns:plugins="http://taverna.sf.net/2008/xml/plugins";>
  <provider>taverna.org.uk</provider>
  <identifier>net.sf.taverna.t2.ui-activities.rest</identifier>
  <version>0.3.1</version>
  <!-- Does not match the workbench version, this -->
  <!-- is the plugin version -->
  <name>REST Activity Plugin</name>
  <description>Generic REST Activity that can handle all HTTP
methods</description>
  <enabled>true</enabled>
  <repositories>
    <!-- myGrid repositories and mirrors  -->
    <repository>http://www.mygrid.org.uk/maven/repository/</repository>
    <repository>http://bioinf.ncl.ac.uk/mirror/maven/repository/</repository>
    <repository>http://mirror.omii.ac.uk/maven/repository/</repository>
    <repository>http://www.mygrid.org.uk/maven/snapshot-repository/</repository>

    <!--  Mirror of official maven repository -->
    <repository>http://www.mygrid.org.uk/maven/repo1/</repository>
    <repository>http://ibiblio.lsu.edu/main/pub/packages/maven2/</repository>
    <repository>http://www.eviware.com/repository/maven2/</repository>
  </repositories>

  <profile>
    <artifact groupId="net.sf.taverna.t2.ui-activities"
artifactId="rest-activity" version="0.3.1" />
        <artifact groupId="net.sf.taverna.t2.ui-activities"
artifactId="rest-activity-ui" version="0.3.1" />
  </profile>

  <compatibility>
    <application>
      <version>2.2.0</version>
    </application>
  </compatibility>
</plugins:plugin>


under <repositories> make sure your new repository (where Maven has
deployed the artifacts) is listed.

<provider> is informational only, and mainly used to identify the
plugin site - so if you deploy to maven.jane.org - use
<provider>maven.jane.org</provider>

<identifier> identifies this particular plugin, so that it can be
matched for upgrades. Generally this should match the groupID and
artifactID, which should match your Java package name. For instance:

  <identifier>org.jane.taverna.pdfviewer</identifier>

<version> is the version of this plugin DEFINITION - a new version
here (when ASCII-compared) means that it will be offered as an upgrade
to the user. Any new versions of artifacts under <profile> will be
downloaded as well.


under <profile> you need to include the head Maven artifacts you want
Taverna to load. For activities this typically will only be the
"x-activity" and the "x-activity-ui". You can either use the
short-hand format as above, or you can use a standard <dependency>
block as in pom.xml:

<profile>
  <dependency>
    <groupId>net.sf.taverna.t2.activities</groupId>
    <artifactId>sadi-activity</artifactId>
    <version>0.3.0</version>
  </dependency>
  <dependency>
    <groupId>net.sf.taverna.t2.ui-activities</groupId>
    <artifactId>sadi-activity-ui</artifactId>
    <version>0.3.0</version>
  </dependency>
</profile>

(note that properties are not allowed, and all three of <groupId>,
<artifactId> and <version> must be present).

You don't need to add the individual dependencies that x-activity
needs, etc, as Taverna will pick up these by following the POMs
recursively.


Typically the <version> of the artifacts your plugin pulls in are
matching the plugin version. Note that if you are doing a new release
it's essential for your Maven artifacts to have a new version number -
if Taverna has already downloaded blah-activity version 0.1, it's not
going to download that JAR and POM file again even if you have updated
the plugin definition version.

If it's only you testing, you can work around this by simply deleting
the 'repository' folder from Taverna's home directory. (Click Advanced
-> View log folder and go one up to find this folder)


For a plugin update, you'll need to redeploy in new versions the
affected Maven artifacts (and any artifacts which depend on those),
and then add a new plugin definition file with a new version number
both on the artifacts and for itself, and add this to the
pluginlist.xml. When Taverna checks for updates it will pick up your
new plugin definition and offer it as an upgrade to users who had the
old version installed. You can leave the old version in pluginlist.xml
as the Plugin manager will only offer to install the latest version.


--
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
taverna-hackers mailing list
[email protected]
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/
<project>
  <modelVersion>4.0.0</modelVersion>
   <groupId>com.example.taverna.plugins</groupId> 
  <artifactId>myfancytool-taverna</artifactId>
  <packaging>taverna-plugin</packaging>
  <name>Example Activity</name>
  <version>0.0.1-SNAPSHOT</version>
  <description>My Taverna plugin that does cool stuff</description>

 
  <!-- The repository that your jars are deployed to -->

        <repositories>
                <repository>
                        <releases />
                        <snapshots>
                                <enabled>false</enabled>
                        </snapshots>
                        <id>mygrid-repository</id>
                        <name>myGrid Repository</name>
                        <url>http://vm6.ucsd.edu/maven2</url> 
                </repository>
        </repositories>
 
  <!-- The repository for the Maven plugin -->
  <pluginRepositories>
    <pluginRepository>
      <id>mygrid-repository</id>
      <name>myGrid Repository</name>
      <url>http://www.mygrid.org.uk/maven/repository</url>
    </pluginRepository>
  </pluginRepositories>
 
  <!-- Configure the Maven plugin -->
  <build>
    <plugins>
      <plugin>
        <groupId>net.sf.taverna.t2.maven.plugins</groupId>
        <artifactId>maven-taverna-plugin</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <extensions>true</extensions>
        <configuration>
          <provider>vm6.ucsd.edu</provider>
          <tavernaVersion>2.2.0</tavernaVersion>
        </configuration>
      </plugin>
    </plugins>
  </build>
 

  <!-- The location of your plugin site -->
  <!--
  <distributionManagement>
    <repository>
      <id>my-plugin-site</id>
      <name>My Plugin Site</name>
      <url>scpexe://example.com/www/taverna/plugins/</url>
    </repository>
    <snapshotRepository>
      <id>my-test-plugin-site</id>
      <name>My Test Plugin Site</name>
      <url>file:///var/www/taverna/test-plugins/</url>
    </snapshotRepository>
  </distributionManagement>
  -->

  <distributionManagement>
    <repository>
      <id>example-ftp</id>
     <name>myGrid Repository</name>
      <url>ftp://vm6.ucsd.edu/pub/maven2</url>
    </repository>
  </distributionManagement>
 
  <!-- The jars for your plugin code -->
  <dependencies>
    <dependency>
      <groupId>com.example.taverna.activities</groupId>
      <artifactId>example-activity</artifactId>
      <version>0.0.1-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>com.example.taverna.ui-activities</groupId>
      <artifactId>example-activity-ui</artifactId>
      <version>0.0.1-SNAPSHOT</version>
    </dependency>
  </dependencies>
 
</project>




------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
taverna-hackers mailing list
[email protected]
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