Hi Mark,

The problem is not with the multiple nested <configuration> tags. The inner nested <configuration> tag rightly maps to a Configuration class in the Mojo, the problem is with assigning one of the fields in the Configuration POJO of type java.lang.Class which should pick value from 'implementation', it fails to load the class.

Thanks for the note though!

Cheers,

Rahul


----- Original Message ----- From: "Mark Struberg" <[EMAIL PROTECTED]>
To: "Maven Developers List" <dev@maven.apache.org>
Sent: Tuesday, January 03, 2006 11:45 PM
Subject: Re: Mapping complex object in Mojo Configuration


Maybe it is a really complex problem, but
maybe there is only a problem with the 2 nested
<configuration> entries?

    <plugin>
       <groupId>org.codehaus.cargo</groupId>
       <artifactId>cargo-maven2-plugin</artifactId>
-->        <configuration>
            <wait>true</wait>
-->             <configuration>

<implementation>com.effacy.sample.EffacyTomcatConfiguration</implementation>

<dir>${project.build.directory}/tomcat5x/container</dir>
               <type>standalone</type>
            </configuration>
       </configuration>
    </plugin>

May u please check if it works when u change the 2nd
<configuration> tag in <tomcatconf> for example?

txs in advance and best regards,
struberg


org.codehaus.cargo:cargo-maven2-plugin. Reason:
Unable to parse the
created DOM for plugin configuration


--- Brett Porter <[EMAIL PROTECTED]> schrieb:

Good point. It's probably looking in the plexus
classloader.

I'd need to investigate further how to get the
correct classloader. If
you'd like to do so yourself, the class to change is

plexus/plexus-containers/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/basic/ClassConverter.java

Cheers,
Brett

Rinku wrote:
> Hi ,
>
> I did relevant updates to m2 sources on local and
updated m2 install for
> plexus-container-default verison
1.0-alpha-10-SNAPSHOT. But still
> running into a ClassNotFound error. Looks like its
coming from
> Classworld libs.
>
> I have posted the stacktrace at:
> http://www.rafb.net/paste/results/tke4hi45.html
>
> Could this be a Realm related issue with
Classworlds (sorry, not very
> well-versed with Classworlds). I am sure that
implementation class I am
> specifying is available via dependencies in
project's pom.xml. Am I
> missing something here or could this be a bug?
>
> Cheers for any help!
>
> Rahul
>
>
> ----- Original Message ----- From: "Brett Porter"
<[EMAIL PROTECTED]>
> To: "Maven Developers List" <dev@maven.apache.org>
> Sent: Tuesday, January 03, 2006 10:46 AM
> Subject: Re: Mapping complex object in Mojo
Configuration
>
>
>> There is no plexus converter for String -> Class.
We should probably
>> have one, so I'll add it now.
>>
>> You'll need to use a String and do the forName
yourself in the mean time.
>>
>> - Brett
>>
>> Rahul Thakur wrote:
>>> Hi,
>>>
>>> I am following the mini guide to set up a
complex mapping for a Mojo.
>>>

http://maven.apache.org/guides/mini/guide-configuring-plugins.html
>>>
>>> The POJO that models the complex type for Mojo
configuration has a field
>>> 'implementation' of type java.lang.Class.
>>>
>>> When I run the Mojo, I get an error:
>>> Cause: Cannot assign configuration entry
'implementation' to 'class
>>> java.lang.Class' from
'com.effacy.sample.EffacyTomcatConfiguration',
>>> which is of type class java.lang.String
>>>
>>> The Plugin configuration for my Mojo is as
follows:
>>>     <plugin>
>>>        <groupId>org.codehaus.cargo</groupId>
>>>
<artifactId>cargo-maven2-plugin</artifactId>
>>>        <configuration>
>>>             <wait>true</wait>
>>>             <configuration>
>>>
>>>

<implementation>com.effacy.sample.EffacyTomcatConfiguration</implementation>
>>>
>>>
>>>

<dir>${project.build.directory}/tomcat5x/container</dir>
>>>                <type>standalone</type>
>>>             </configuration>
>>>        </configuration>
>>>     </plugin>
>>>
>>> I am not sure what's wrong here?? I am
reproducing the stacktrace below
>>> and would appreciate any pointers.
>>>
>>> Thanks in advance,
>>>
>>> Rahul
>>>
>>> <snip>
>>> Cause: Cannot assign configuration entry
'implementation' to 'class
>>> java.lang.Class' from
'com.effacy.sample.EffacyTomcatConfiguration',
>>> which is of type class java.lang.String
>>> [INFO]
>>>

----------------------------------------------------------------------------
>>>
>>>
>>> [INFO] Trace
>>>

org.apache.maven.lifecycle.LifecycleExecutionException:
Error
>>> configuring:
org.codehaus.cargo:cargo-maven2-plugin. Reason:
Unable to
>>> parse the created DOM for plugin configuration
>>>        at
>>>

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>>>
>>>
>>>        at
>>>

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
>>>
>>>
>>>        at
>>>

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
>>>
>>>
>>>        at
>>>

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>>>
>>>
>>>        at
>>>

org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>>>
>>>
>>>        at
>>>

org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>>>
>>>
>>>        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:249)
>>>        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:589)
>>>        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.PluginConfigurationException:
Error
>>> configuring:
org.codehaus.cargo:cargo-maven2-plugin. Reason:
Unable to
>>> parse the created DOM for plugin configuration
>>>        at
>>>

org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1056)
>>>
>>>
>>>        at
>>>

org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:596)
>>>
>>>
>>>        at

=== message truncated ===







___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

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