Hi David,

I really appreciate your help.  I modified my pom and did "mvn package" 
successfully.   Then I got a 
target/myfancytool-taverna-0.0.1-SNAPSHOT.xml

But no pluginlist.xml was produced.  "mvn deploy" complained about the missing 
pluginlist.xml.
Would you have any suggestions on how to debug this? 
I have attached my pom.xml.

Thanks
jane
________________________________________
From: David Withers [[email protected]]
Sent: Tuesday, January 11, 2011 2:12 PM
To: List for general discussion and hacking of the Taverna project
Subject: Re: [Taverna-hackers] Problems Deploying a New Plugin

Hi Jane,

On 11 Jan 2011, at 20:53, Jane Ren wrote:

> 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

No, I would create a separate project for the plugin management, so add the pom 
file from the tutorial at:

./example-activity-plugin/pom.xml

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

That is correct.

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

Yes, it will create myfancytool-taverna-0.0.1-SNAPSHOT.xml, copy it to the 
location specified in the distributionManagement section and update the 
pluginlist.xml to include myfancytool-taverna-0.0.1-SNAPSHOT.xml. If 
pluginlist.xml  doesn't already exist it will be created.

> 4. In that sample pom.xml, is that "http://www.example.com/maven/repository"; 
> just a plain web directory?

It's the location of the repository where you deployed the jars for your 
plugin, i.e. the repository specified by the distributionManagement section of 
./example-activity/pom.xml and ./example-activity-ui/pom.xml

> 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?

The distributionManagement section of the plugin pom specifies where the plugin 
file will be deployed - this would not normally be the same location as your 
maven repository.

As an example, the default Taverna plugins location is 
http://www.mygrid.org.uk/taverna/updates/2.2.0/plugins/official/ while the 
Taverna maven repository is at http://www.mygrid.org.uk/maven/repository/

The distributionManagement for your plugin pom section should be something like:

  <distributionManagement>
    <repository>
      <id>my-plugin-site</id>
      <name>My Plugin Site</name>
      <url>ftp://vm6.ucsd.edu/pub//taverna/plugins/</url>
    </repository>
  </distributionManagement>

You also need to update the dependencies section, it should be more like:

  <dependencies>
    <dependency>
      <groupId>uk.ac.manchester.cs.img.myfancytool</groupId>
      <artifactId>example-activity</artifactId>
      <version>0.0.1-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>uk.ac.manchester.cs.img.myfancytool</groupId>
      <artifactId>example-activity-ui</artifactId>
      <version>0.0.1-SNAPSHOT</version>
    </dependency>
  </dependencies>


> 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

The version for the maven-taverna-plugin in the attached pom file is not 
correct, it should be 0.1.1 (not 0.0.1-SNAPSHOT).

Thanks for your feedback, I'll try and update the wiki page to make it clearer.

David.

--
David Withers
School of Computer Science, University of Manchester,
Oxford Road, Manchester, M13 9PL, UK.
+44 (0)161 275 0683





------------------------------------------------------------------------------
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/
<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> -->
<!--        <groupId>uk.ac.manchester.cs.img.myfancytool</groupId>  -->
<!--        <artifactId>maven-taverna-plugin</artifactId> -->
<!--        <artifactId>myfancytool-taverna</artifactId> -->
<!--        <version>0.0.1-SNAPSHOT</version> -->
        <groupId>net.sf.taverna.t2.maven.plugins</groupId>
        <artifactId>maven-taverna-plugin</artifactId>
        <version>0.1.1</version>

        <extensions>true</extensions>
        <configuration>
          <provider>vm6.ucsd.edu/maven2</provider>
          <tavernaVersion>2.2.0</tavernaVersion>
        </configuration>
      </plugin>
    </plugins>


    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ftp</artifactId>
        <version>1.0-beta-7</version>
      </extension>
    </extensions>



  </build>
 

  <!-- The location of your plugin site -->
  <!--
  <distributionManagement>
    <repository>
      <id>my-plugin-site</id>
      <name>My Plugin Site</name>
      <url>ftp://vm6.ucsd.edu/pub/maven2</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>uk.ac.manchester.cs.img.myfancytool</groupId>
      <artifactId>example-activity</artifactId>
      <version>0.0.1-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>uk.ac.manchester.cs.img.myfancytool</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