It's a bug in m2, your plugin need to have actually at least one parameter. It's fixed in svn.

Emmanuel

David Le Strat wrote:
This definitely helped thank you. I am obviously going
through the basics here and I appreciate all your
help.

I am now getting a NullPointer exception.  If I run
let's say m2 war:war, everything works fine.  So my
pom.xml must be correct.

Something must be wrong with my mmld.  Am I way off
base here? Any idea?

Here is the script:

<mojo xmlns="marmalade:mojo">
  <metadata>
    <goal>deploy</goal>
    <description>Deploy Plugin.</description>
  </metadata>
  <execute>
    <c:out xmlns:c="marmalade:core">Hello,
World</c:out>
  </execute>
</mojo>

For info, the stack trace I am getting:

java.lang.NullPointerException
        at
org.apache.maven.plugin.DefaultPluginManager.validatePomConfiguration(DefaultPluginManager.java:773)
        at
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:511)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:373)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:169)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:150)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:133)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:103)
        at
org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:261)
        at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:180)
        at
org.apache.maven.cli.MavenCli.main(MavenCli.java:269)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:324)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
        at
org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
        at
org.codehaus.classworlds.Launcher.main(Launcher.java:363)


--- Kenney Westerhof <[EMAIL PROTECTED]> wrote:


On Wed, 29 Jun 2005, David Le Strat wrote:


Thanks for the help. I am making some progress.

I am

now getting: Nonexistent component:


org.codehaus.plexus.component.factory.ComponentFactorymarmalade

It looks like my component cannot be found.  I ran

m2

install and my component is correctly deployed in

my

local repository.

Your plugin is found, but the marmalade factory for
instantiating it
is not (normally Java is used).
The marmalade factory is a part of maven2, so it's
available. However,
you need to define a dependency on it in your pom.

You probably didn't create the project using
archetype?

Here are the dependencies you need to include in the
pom:

 <dependencies>
   <dependency>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven-plugin-api</artifactId>
     <version>2.0-beta-1-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-beta-1-SNAPSHOT</version>
   </dependency>
 </dependencies>

(taken from


maven-archetype/maven-archetypes/maven-archetype-marmalade-mojo/src/main/resources/archetype-resources/pom.xml)

Hope this helps.

-- Kenney


I also checked the content of my plugin.xml and
scorpion:deploy is the correct command name.  I am

not

sure what's going on, any suggestion would be
appreciated.

<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-scorpion-plugin</artifactId>
 <version>1.0</version>
 <goalPrefix>scorpion</goalPrefix>
 <isolatedRealm>false</isolatedRealm>
 <inheritedByDefault>true</inheritedByDefault>
- <mojos>
- <mojo>
 <goal>deploy</goal>
 <requiresProject>true</requiresProject>
 <requiresOnline>false</requiresOnline>
 <inheritedByDefault>true</inheritedByDefault>
 <implementation>/deploy.mmld</implementation>
 <language>marmalade</language>
 <configurator>map-oriented</configurator>
 <composer>map-oriented</composer>


<instantiationStrategy>per-lookup</instantiationStrategy>



<executionStrategy>once-per-session</executionStrategy>

 <parameters />
 </mojo>
 </mojos>
 <dependencies />
 </plugin>

Logs are below for reference:

--------------------------------------

[ERROR] Nonexistent component:


org.codehaus.plexus.component.factory.ComponentFactorymarmalade

[INFO]


----------------------------------------------------------------------------

[ERROR] BUILD ERROR
[INFO]


----------------------------------------------------------------------------

[INFO] Diagnosis: Error looking up plugin:
[INFO]


----------------------------------------------------------------------------

[ERROR] Cause:
org.apache.maven.plugin.MojoExecutionException:

Error

looking up plugin:
       at


org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:382)

       at


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:169)

       at


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:150)

       at


org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:133)

       at


org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:103)

       at


org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:261)

       at


org.apache.maven.DefaultMaven.execute(DefaultMaven.java:180)

       at


org.apache.maven.cli.MavenCli.main(MavenCli.java:269)

       at


sun.reflect.NativeMethodAccessorImpl.invoke0(Native

Method)
       at


sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

       at


sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

       at
java.lang.reflect.Method.invoke(Method.java:324)
       at


org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)

       at


org.codehaus.classworlds.Launcher.launch(Launcher.java:243)

       at


org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)

       at


org.codehaus.classworlds.Launcher.main(Launcher.java:363)

Caused by:


org.codehaus.plexus.component.repository.exception.ComponentLookupException:

Unable to lookup component


'org.apache.maven.plugin.Mojoorg.apache.maven.plugins:maven-scorpion-plugin:1.0:deploy',

it could not be created
       at


org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:311)

       at


org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:416)

       at


org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:495)

       at


org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:373)

       ... 15 more
Caused by:


org.codehaus.plexus.component.factory.ComponentInstantiationException:

Unable to create component as factory 'marmalade'
could not be found
       at


org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1411)

       at


org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93)

=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





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

Reply via email to