maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <hermod.opstv...@dnbnor.no>
Subject RE: Embedder error when executing MOJO
Date Wed, 05 Jul 2006 12:00:00 GMT
Hi

I wondering if this has something to do with me trying to run Maven 2.1-SNAPSHOT version plugins
under Maven 2.0.4. Is this not possible, and if not : is there a way to build Maven 2.1-SNAPSHOT?

Hermod

-----Original Message-----
From: hermod.opstvedt@dnbnor.no [mailto:hermod.opstvedt@dnbnor.no]
Sent: Wednesday, July 05, 2006 12:04 PM
To: dev@maven.apache.org
Subject: RE: Embedder error when executing MOJO


Hi

I have been messing around with this and have discovered something odd: If I add a main method
to my mojo, which again calls execute(), and run it as a regular java class with, it runs
fine. It is only when I try to run it as a mojo through mvn .... that it fails.

Hermod

-----Original Message-----
From: hermod.opstvedt@dnbnor.no [mailto:hermod.opstvedt@dnbnor.no]
Sent: Wednesday, July 05, 2006 10:27 AM
To: dev@maven.apache.org
Subject: Embedder error when executing MOJO


Hi

I have a mojo that calls the MavenExecutionRequest, and asks it to run archetype:create. When
I try to run it, the Embedder complains with the errormessage and stacktrace below. In short,
it complains that there is no field ErrorDiagnostics in DefaultMaven. Why is the Embedder
trying to access the non exsitant field? Has there been a code change that relies on that
field now beeing present in DefaultMaven?

Hermod


Embedded error: Cannot lookup required component.
Component composition failed. No field of type: 'class org.apache.maven.usabilit
y.diagnostics.ErrorDiagnostics' exists in class 'org.apache.maven.DefaultMaven'.
 Component: role: 'org.apache.maven.Maven', implementation: 'org.apache.maven.De
faultMaven'
org.apache.maven.lifecycle.LifecycleExecutionException: Embedder
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:559)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:488)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:458)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:306)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:219)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Embedder
        at no.dnbnor.it01.maven.ProjectCreator.execute(ProjectCreator.java:53)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:412)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:534)
        ... 16 more
Caused by: org.apache.maven.embedder.MavenEmbedderException: Cannot lookup requi
red component.
        at org.apache.maven.embedder.MavenEmbedder.start(MavenEmbedder.java:650)

        at org.apache.maven.embedder.MavenEmbedder.start(MavenEmbedder.java:550)

        at no.dnbnor.it01.maven.ProjectCreator.execute(ProjectCreator.java:51)
        ... 18 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupExc
eption: Unable to lookup component 'org.apache.maven.Maven', it could not be sta
rted
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:339)
        at org.codehaus.plexus.embed.Embedder.lookup(Embedder.java:78)
        at org.apache.maven.embedder.MavenEmbedder.start(MavenEmbedder.java:599)

        ... 20 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLifecycle
Exception: Error starting component
        at org.codehaus.plexus.component.manager.AbstractComponentManager.startC
omponentLifecycle(AbstractComponentManager.java:109)
        at org.codehaus.plexus.component.manager.AbstractComponentManager.create
ComponentInstance(AbstractComponentManager.java:95)
        at org.codehaus.plexus.component.manager.ClassicSingletonComponentManage
r.getComponent(ClassicSingletonComponentManager.java:92)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:331)
        ... 22 more
Caused by: org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecution
Exception: Error composing component
        at org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPha
se.execute(CompositionPhase.java:33)
        at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(Abstract
LifecycleHandler.java:101)
        at org.codehaus.plexus.component.manager.AbstractComponentManager.startC
omponentLifecycle(AbstractComponentManager.java:105)
        ... 25 more
Caused by: org.codehaus.plexus.component.composition.CompositionException: Compo
nent composition failed. No field of type: 'class org.apache.maven.usability.dia
gnostics.ErrorDiagnostics' exists in class 'org.apache.maven.DefaultMaven'. Comp
onent: role: 'org.apache.maven.Maven', implementation: 'org.apache.maven.Default
Maven'
        at org.codehaus.plexus.component.composition.FieldComponentComposer.getF
ieldByType(FieldComponentComposer.java:305)
        at org.codehaus.plexus.component.composition.FieldComponentComposer.find
MatchingField(FieldComponentComposer.java:204)
        at org.codehaus.plexus.component.composition.FieldComponentComposer.asse
mbleComponent(FieldComponentComposer.java:62)
        at org.codehaus.plexus.component.composition.DefaultComponentComposerMan
ager.assembleComponent(DefaultComponentComposerManager.java:68)
        at org.codehaus.plexus.DefaultPlexusContainer.composeComponent(DefaultPl
exusContainer.java:1486)
        at org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPha
se.execute(CompositionPhase.java:29)
        ... 27 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Wed Jul 05 10:19:39 CEST 2006
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message