Thanks for that. Now got another project having the hello plugin in its pom.xml, however, when running:

m2 hello:hello

in the other project, I get the following error:

Nonexistent component: org.codehaus.plexus.component.factory.ComponentFactorymarmalade


This is my pom.xml for the plugin:

<project>
 <modelVersion>4.0.0</modelVersion>

 <!-- for now, this is the only groupId acceptable for maven plugins -->
 <groupId>org.apache.maven.plugins</groupId>

 <!-- uses a standard naming convention -->
 <artifactId>maven-hello-plugin</artifactId>

<!-- uses this version, to make it usable without configuring this plugin from
  |   the project POM.
  -->
 <version>1.0-SNAPSHOT</version>

 <!-- Designate this project as building a maven plugin -->
 <packaging>maven-plugin</packaging>

 <name>Maven Hello World Plugin</name>

 <!--
   You might want to include additional information here
   eg the developers, organisation, and dependencies
 -->

 <build>
   <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>

<!-- Since the script source directory is only a marker for a resource, you | still have to declare that directory for resource inclusion when you
    |   build.
    -->
   <resources>
     <resource>
       <directory>src/main/scripts</directory>
       <includes><include>**/*.mmld</include></includes>
     </resource>
   </resources>
 </build>

<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>marmalade</groupId>
<artifactId>marmalade-core</artifactId>
<version>1.0-alpha-4</version>
</dependency>

<dependency>
<groupId>marmalade</groupId>
<artifactId>marmalade-el-commons</artifactId>
<version>1.0-alpha-3</version>
</dependency>

<dependency>
<groupId>marmalade</groupId>
<artifactId>marmalade-tags-io</artifactId>
<version>1.0-alpha-3</version>
</dependency>

<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-script-marmalade</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
</dependencies>

</project>

This is the script for the plugin:

<mojo xmlns="marmalade:mojo">
 <metadata>
   <goal>hello</goal>
   <description>Say Hello to the World.</description>
   <parameters>
     <parameter>
       <name>salutation</name>
       <expression>#salutation</expression>
       <default>Hello</default>
<description>The salutation to use in greeting the world.</description>
     </parameter>
   </parameters>
 </metadata>
 <execute>
   <c:out xmlns:c="marmalade:core">${salutation}, World.</c:out>
 </execute>
</mojo>

This is how the plugin is declared in other project:

        <plugins>
                <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-hello-plugin</artifactId>
                <version>1.0-SNAPSHOT</version>
                </plugin>
        </plugins>


Any help that would be great. :)

Many thanks,

Mike


<br><br><br>&gt;From: Edwin Punzalan &lt;[EMAIL PROTECTED]&gt;<br>&gt;Reply-To: &quot;Maven Users List&quot; &lt;[email protected]&gt;<br>&gt;To: Maven Users List &lt;[email protected]&gt;<br>&gt;Subject: Re: [M2] Tutorial example not working for me<br>&gt;Date: Fri, 15 Jul 2005 17:59:13 +0800<br>&gt;<br>&gt;Did you check the repository?<br>&gt;<br>&gt;Anyway, to use the plugin, you should have a separate project <br>&gt;declaring the plugin in its pom. After that, the project can now <br>&gt;call hello:hello.<br>&gt;<br>&gt;<br>&gt;<br>&gt;Michael Owen wrote:<br>&gt;<br>&gt;&gt;<br>&gt;&gt;It doesn't give errors any more, and creates the files in the <br>&gt;&gt;target directory, however, doesn't install the plugin in the local <br>&gt;&gt;repository and the goals &quot;m2 hello:hello&quot; or &quot;m2 hello&quot; don't work.<br>&gt;&gt;<br>&gt;&gt;Thanks for help btw. :)<br>&gt;&gt;<br>&gt;&gt;Mike<br>&gt;&gt;<br>&gt;&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt;From: Edwin Punzalan <br>&gt;&gt;&amp;lt;[EMAIL PROTECTED]&amp;gt;&lt;br&gt;&amp;gt;Reply-To: &amp;quot;Maven Users <br>&gt;&gt;List&amp;quot; &amp;lt;[email protected]&amp;gt;&lt;br&gt;&amp;gt;To: Maven Users <br>&gt;&gt;List &amp;lt;[email protected]&amp;gt;&lt;br&gt;&amp;gt;Subject: Re: [M2] <br>&gt;&gt;Tutorial example not working for me&lt;br&gt;&amp;gt;Date: Fri, 15 Jul 2005 <br>&gt;&gt;17:44:30 +0800&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;have you tried removing the <br>&gt;&gt;&amp;lt;id&amp;gt; tag from your mojo?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;Michael Owen <br>&gt;&gt;wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;Hi,&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;Firstly, I'm <br>&gt;&gt;using Maven 2 alpha 3.&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;When I try to make to <br>&gt;&gt;make the Marmalade plugin at <br>&gt;&gt;&lt;br&gt;&amp;gt;&amp;gt;http://maven.apache.org/maven2/developers/developing-plugins-with-marmalade.html, <br>&gt;&gt;&lt;br&gt;&amp;gt;&amp;gt;I get the following <br>&gt;&gt;error:&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;java.lang.NullPointerException&lt;br&gt;&amp;gt;&amp;gt; <br>&gt;&gt; at <br>&gt;&gt;&lt;br&gt;&amp;gt;&amp;gt;org.codehaus.marmalade.metamodel.AbstractMarmaladeTagLibrary.createTag(AbstractMarmaladeTagLibrary.java:59)&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;...&lt;br&gt;&amp;gt;&amp;gt;...&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;I <br>&gt;&gt;use the same pox.xml and hello.mmld as in the tutorial, so I <br>&gt;&gt;&lt;br&gt;&amp;gt;&amp;gt;confused why it won't work. Any <br>&gt;&gt;ideas?&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;Thanks,&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;Mike&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;---------------------------------------------------------------------&lt;br&gt;&amp;gt;&amp;gt;To <br>&gt;&gt;unsubscribe, e-mail: <br>&gt;&gt;[EMAIL PROTECTED]&lt;br&gt;&amp;gt;&amp;gt;For additional <br>&gt;&gt;commands, e-mail: <br>&gt;&gt;[EMAIL PROTECTED]&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;---------------------------------------------------------------------&lt;br&gt;&amp;gt;To <br>&gt;&gt;unsubscribe, e-mail: [EMAIL PROTECTED]&lt;br&gt;&amp;gt;For <br>&gt;&gt;additional commands, e-mail: <br>&gt;&gt;[EMAIL PROTECTED]&lt;br&gt;&amp;gt;&lt;br&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;---------------------------------------------------------------------<br>&gt;&gt;To unsubscribe, e-mail: [EMAIL PROTECTED]<br>&gt;&gt;For additional commands, e-mail: [EMAIL PROTECTED]<br>&gt;&gt;<br>&gt;<br>&gt;---------------------------------------------------------------------<br>&gt;To unsubscribe, e-mail: [EMAIL PROTECTED]<br>&gt;For additional commands, e-mail: [EMAIL PROTECTED]<br>&gt;<br>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to