You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Owen <mi...@hotmail.com> on 2005/07/15 11:37:59 UTC
[M2] Tutorial example not working for me
Hi,
Firstly, I'm using Maven 2 alpha 3.
When I try to make to make the Marmalade plugin at
http://maven.apache.org/maven2/developers/developing-plugins-with-marmalade.html,
I get the following error:
java.lang.NullPointerException
at
org.codehaus.marmalade.metamodel.AbstractMarmaladeTagLibrary.createTag(AbstractMarmaladeTagLibrary.java:59)
...
...
I use the same pox.xml and hello.mmld as in the tutorial, so I confused why
it won't work. Any ideas?
Thanks,
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] Tutorial example not working for me
Posted by Kenney Westerhof <fo...@neonics.com>.
On Fri, 15 Jul 2005, Michael Owen wrote:
See this thread:
http://mail-archives.apache.org/mod_mbox/maven-users/200507.mbox/%3cdaguri$ac3$1@sea.gmane.org%3e
-- Kenney
> 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>>From: Edwin Punzalan
> <epunzalan@exist.com><br>>Reply-To: "Maven Users List"
> <users@maven.apache.org><br>>To: Maven Users List
> <users@maven.apache.org><br>>Subject: Re: [M2] Tutorial example not
> working for me<br>>Date: Fri, 15 Jul 2005 17:59:13
> +0800<br>><br>>Did you check the repository?<br>><br>>Anyway, to
> use the plugin, you should have a separate project <br>>declaring the
> plugin in its pom. After that, the project can now <br>>call
> hello:hello.<br>><br>><br>><br>>Michael Owen
> wrote:<br>><br>>><br>>>It doesn't give errors any more, and
> creates the files in the <br>>>target directory, however, doesn't
> install the plugin in the local <br>>>repository and the goals
> "m2 hello:hello" or "m2 hello" don't
> work.<br>>><br>>>Thanks for help btw.
> :)<br>>><br>>>Mike<br>>><br>>><br><br><br>&gt;From:
> Edwin Punzalan
> <br>>>&lt;epunzalan@exist.com&gt;<br>&gt;Reply-To:
> &quot;Maven Users <br>>>List&quot;
> &lt;users@maven.apache.org&gt;<br>&gt;To: Maven Users
> <br>>>List
> &lt;users@maven.apache.org&gt;<br>&gt;Subject: Re: [M2]
> <br>>>Tutorial example not working for me<br>&gt;Date: Fri,
> 15 Jul 2005 <br>>>17:44:30
> +0800<br>&gt;<br>&gt;have you tried removing the
> <br>>>&lt;id&gt; tag from your
> mojo?<br>&gt;<br>&gt;Michael Owen
> <br>>>wrote:<br>&gt;<br>&gt;&gt;Hi,<br>&gt;&gt;<br>&gt;&gt;Firstly,
> I'm <br>>>using Maven 2 alpha
> 3.<br>&gt;&gt;<br>&gt;&gt;When I try to make to
> <br>>>make the Marmalade plugin at
> <br>>><br>&gt;&gt;http://maven.apache.org/maven2/developers/developing-plugins-with-marmalade.html,
> <br>>><br>&gt;&gt;I get the following
> <br>>>error:<br>&gt;&gt;<br>&gt;&gt;java.lang.NullPointerException<br>&gt;&gt;
> <br>>> at
> <br>>><br>&gt;&gt;org.codehaus.marmalade.metamodel.AbstractMarmaladeTagLibrary.createTag(AbstractMarmaladeTagLibrary.java:59)<br>&gt;&gt;<br>&gt;&gt;...<br>&gt;&gt;...<br>&gt;&gt;<br>&gt;&gt;I
> <br>>>use the same pox.xml and hello.mmld as in the tutorial, so I
> <br>>><br>&gt;&gt;confused why it won't work. Any
> <br>>>ideas?<br>&gt;&gt;<br>&gt;&gt;Thanks,<br>&gt;&gt;<br>&gt;&gt;Mike<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;---------------------------------------------------------------------<br>&gt;&gt;To
> <br>>>unsubscribe, e-mail:
> <br>>>users-unsubscribe@maven.apache.org<br>&gt;&gt;For
> additional <br>>>commands, e-mail:
> <br>>>users-help@maven.apache.org<br>&gt;&gt;<br>&gt;<br>&gt;---------------------------------------------------------------------<br>&gt;To
> <br>>>unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org<br>&gt;For
> <br>>>additional commands, e-mail:
> <br>>>users-help@maven.apache.org<br>&gt;<br><br>>><br>>><br>>><br>>>---------------------------------------------------------------------<br>>>To
> unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>>>For
> additional commands, e-mail:
> users-help@maven.apache.org<br>>><br>><br>>---------------------------------------------------------------------<br>>To
> unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>>For
> additional commands, e-mail: users-help@maven.apache.org<br>><br>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] Tutorial example not working for me
Posted by Michael Owen <mi...@hotmail.com>.
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>>From: Edwin Punzalan
<epunzalan@exist.com><br>>Reply-To: "Maven Users List"
<users@maven.apache.org><br>>To: Maven Users List
<users@maven.apache.org><br>>Subject: Re: [M2] Tutorial example not
working for me<br>>Date: Fri, 15 Jul 2005 17:59:13
+0800<br>><br>>Did you check the repository?<br>><br>>Anyway, to
use the plugin, you should have a separate project <br>>declaring the
plugin in its pom. After that, the project can now <br>>call
hello:hello.<br>><br>><br>><br>>Michael Owen
wrote:<br>><br>>><br>>>It doesn't give errors any more, and
creates the files in the <br>>>target directory, however, doesn't
install the plugin in the local <br>>>repository and the goals
"m2 hello:hello" or "m2 hello" don't
work.<br>>><br>>>Thanks for help btw.
:)<br>>><br>>>Mike<br>>><br>>><br><br><br>&gt;From:
Edwin Punzalan
<br>>>&lt;epunzalan@exist.com&gt;<br>&gt;Reply-To:
&quot;Maven Users <br>>>List&quot;
&lt;users@maven.apache.org&gt;<br>&gt;To: Maven Users
<br>>>List
&lt;users@maven.apache.org&gt;<br>&gt;Subject: Re: [M2]
<br>>>Tutorial example not working for me<br>&gt;Date: Fri,
15 Jul 2005 <br>>>17:44:30
+0800<br>&gt;<br>&gt;have you tried removing the
<br>>>&lt;id&gt; tag from your
mojo?<br>&gt;<br>&gt;Michael Owen
<br>>>wrote:<br>&gt;<br>&gt;&gt;Hi,<br>&gt;&gt;<br>&gt;&gt;Firstly,
I'm <br>>>using Maven 2 alpha
3.<br>&gt;&gt;<br>&gt;&gt;When I try to make to
<br>>>make the Marmalade plugin at
<br>>><br>&gt;&gt;http://maven.apache.org/maven2/developers/developing-plugins-with-marmalade.html,
<br>>><br>&gt;&gt;I get the following
<br>>>error:<br>&gt;&gt;<br>&gt;&gt;java.lang.NullPointerException<br>&gt;&gt;
<br>>> at
<br>>><br>&gt;&gt;org.codehaus.marmalade.metamodel.AbstractMarmaladeTagLibrary.createTag(AbstractMarmaladeTagLibrary.java:59)<br>&gt;&gt;<br>&gt;&gt;...<br>&gt;&gt;...<br>&gt;&gt;<br>&gt;&gt;I
<br>>>use the same pox.xml and hello.mmld as in the tutorial, so I
<br>>><br>&gt;&gt;confused why it won't work. Any
<br>>>ideas?<br>&gt;&gt;<br>&gt;&gt;Thanks,<br>&gt;&gt;<br>&gt;&gt;Mike<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;---------------------------------------------------------------------<br>&gt;&gt;To
<br>>>unsubscribe, e-mail:
<br>>>users-unsubscribe@maven.apache.org<br>&gt;&gt;For
additional <br>>>commands, e-mail:
<br>>>users-help@maven.apache.org<br>&gt;&gt;<br>&gt;<br>&gt;---------------------------------------------------------------------<br>&gt;To
<br>>>unsubscribe, e-mail:
users-unsubscribe@maven.apache.org<br>&gt;For
<br>>>additional commands, e-mail:
<br>>>users-help@maven.apache.org<br>&gt;<br><br>>><br>>><br>>><br>>>---------------------------------------------------------------------<br>>>To
unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>>>For
additional commands, e-mail:
users-help@maven.apache.org<br>>><br>><br>>---------------------------------------------------------------------<br>>To
unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>>For
additional commands, e-mail: users-help@maven.apache.org<br>><br>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] Tutorial example not working for me
Posted by Edwin Punzalan <ep...@exist.com>.
Did you check the repository?
Anyway, to use the plugin, you should have a separate project declaring
the plugin in its pom. After that, the project can now call hello:hello.
Michael Owen wrote:
>
> It doesn't give errors any more, and creates the files in the target
> directory, however, doesn't install the plugin in the local repository
> and the goals "m2 hello:hello" or "m2 hello" don't work.
>
> Thanks for help btw. :)
>
> Mike
>
> <br><br><br>>From: Edwin Punzalan
> <epunzalan@exist.com><br>>Reply-To: "Maven Users
> List" <users@maven.apache.org><br>>To: Maven Users List
> <users@maven.apache.org><br>>Subject: Re: [M2] Tutorial
> example not working for me<br>>Date: Fri, 15 Jul 2005 17:44:30
> +0800<br>><br>>have you tried removing the <id> tag from
> your mojo?<br>><br>>Michael Owen
> wrote:<br>><br>>>Hi,<br>>><br>>>Firstly, I'm
> using Maven 2 alpha 3.<br>>><br>>>When I try to make to
> make the Marmalade plugin at
> <br>>>http://maven.apache.org/maven2/developers/developing-plugins-with-marmalade.html,
> <br>>>I get the following
> error:<br>>><br>>>java.lang.NullPointerException<br>>>
> at
> <br>>>org.codehaus.marmalade.metamodel.AbstractMarmaladeTagLibrary.createTag(AbstractMarmaladeTagLibrary.java:59)<br>>><br>>>...<br>>>...<br>>><br>>>I
> use the same pox.xml and hello.mmld as in the tutorial, so I
> <br>>>confused why it won't work. Any
> ideas?<br>>><br>>>Thanks,<br>>><br>>>Mike<br>>><br>>><br>>><br>>>---------------------------------------------------------------------<br>>>To
> unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>>>For
> additional commands, e-mail:
> users-help@maven.apache.org<br>>><br>><br>>---------------------------------------------------------------------<br>>To
> unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>>For
> additional commands, e-mail: users-help@maven.apache.org<br>><br>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] Tutorial example not working for me
Posted by Michael Owen <mi...@hotmail.com>.
It doesn't give errors any more, and creates the files in the target
directory, however, doesn't install the plugin in the local repository and
the goals "m2 hello:hello" or "m2 hello" don't work.
Thanks for help btw. :)
Mike
<br><br><br>>From: Edwin Punzalan
<epunzalan@exist.com><br>>Reply-To: "Maven Users List"
<users@maven.apache.org><br>>To: Maven Users List
<users@maven.apache.org><br>>Subject: Re: [M2] Tutorial example not
working for me<br>>Date: Fri, 15 Jul 2005 17:44:30
+0800<br>><br>>have you tried removing the <id> tag from your
mojo?<br>><br>>Michael Owen
wrote:<br>><br>>>Hi,<br>>><br>>>Firstly, I'm using
Maven 2 alpha 3.<br>>><br>>>When I try to make to make the
Marmalade plugin at
<br>>>http://maven.apache.org/maven2/developers/developing-plugins-with-marmalade.html,
<br>>>I get the following
error:<br>>><br>>>java.lang.NullPointerException<br>>>
at
<br>>>org.codehaus.marmalade.metamodel.AbstractMarmaladeTagLibrary.createTag(AbstractMarmaladeTagLibrary.java:59)<br>>><br>>>...<br>>>...<br>>><br>>>I
use the same pox.xml and hello.mmld as in the tutorial, so I
<br>>>confused why it won't work. Any
ideas?<br>>><br>>>Thanks,<br>>><br>>>Mike<br>>><br>>><br>>><br>>>---------------------------------------------------------------------<br>>>To
unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>>>For
additional commands, e-mail:
users-help@maven.apache.org<br>>><br>><br>>---------------------------------------------------------------------<br>>To
unsubscribe, e-mail: users-unsubscribe@maven.apache.org<br>>For
additional commands, e-mail: users-help@maven.apache.org<br>><br>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] Tutorial example not working for me
Posted by Edwin Punzalan <ep...@exist.com>.
have you tried removing the <id> tag from your mojo?
Michael Owen wrote:
> Hi,
>
> Firstly, I'm using Maven 2 alpha 3.
>
> When I try to make to make the Marmalade plugin at
> http://maven.apache.org/maven2/developers/developing-plugins-with-marmalade.html,
> I get the following error:
>
> java.lang.NullPointerException
> at
> org.codehaus.marmalade.metamodel.AbstractMarmaladeTagLibrary.createTag(AbstractMarmaladeTagLibrary.java:59)
>
> ...
> ...
>
> I use the same pox.xml and hello.mmld as in the tutorial, so I
> confused why it won't work. Any ideas?
>
> Thanks,
>
> Mike
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org