You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Winterflood, Jonathan" <jo...@capgemini.com> on 2009/02/04 12:36:39 UTC

Custom plugin ClassCastException: BasicComponentConfigurator

Hi list,

 

The project I'm working on uses a custom made plugin to download and run
specific versions of artefacts, using their POMs to get their
dependencies.

 

In-house, this works fine, and for our user on the clients machines
(SunOs 5.9, not that it should matter?), also.

However, a different user on a different client's machine (SunOs 5.10,
in theory same mvn and java; also tried a machine with SunOs 5.8) fails
with

java.lang.ClassCastException:
org.codehaus.plexus.component.configurator.BasicComponentConfigurator
        at
org.codehaus.plexus.personality.plexus.lifecycle.phase.AutoConfigurePhas
e.execute(AutoConfigurePhase.java:34)
        at
org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLif
ecycleHandler.java:101)
        at
org.codehaus.plexus.component.manager.AbstractComponentManager.startComp
onentLifecycle(AbstractComponentManager.java:105)
        at
org.codehaus.plexus.component.manager.AbstractComponentManager.createCom
ponentInstance(AbstractComponentManager.java:95)
        at
org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.g
etComponent(ClassicSingletonComponentManager.java:92)
        at
org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer
.java:331)
        at
org.codehaus.plexus.DefaultPlexusContainer.registerComponentDiscoveryLis
teners(DefaultPlexusContainer.java:693)
        at
org.codehaus.plexus.DefaultPlexusContainer.start(DefaultPlexusContainer.
java:777)
        at
org.codehaus.plexus.DefaultPlexusContainer.createChildContainer(DefaultP
lexusContainer.java:270)
        at
org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginMana
ger.java:291)
        at
org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(Defau
ltPluginManager.java:207)
        at
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginM
anager.java:171)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(Default
LifecycleExecutor.java:1257)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(De
faultLifecycleExecutor.java:1522)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAgg
regationNeeds(DefaultLifecycleExecutor.java:386)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:138)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.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)

 

running mvn with -X yields: (diff-style)

 

 + Error stacktraces are turned on.

 Maven version: 2.0.7

 Java version: 1.5.0_07

-OS name: "sunos" version: "5.9" arch: "sparc"

-[DEBUG] Building Maven user-level plugin registry from:
'/home/********************/.m2/plugin-registry.xml'

+OS name: "sunos" version: "5.10" arch: "sparc"

+[DEBUG] Building Maven user-level plugin registry from:
'/home/**********************/.m2/plugin-registry.xml'

 [DEBUG] Building Maven global-level plugin registry from:
'/home/*****************/maven/maven-2.0.7/conf/plugin-registry.xml'

 [INFO] Scanning for projects...

 [INFO] Searching repository for plugin with prefix: 'sih-tools'.

 [DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins

 [DEBUG] Loading plugin prefixes from group: org.codehaus.mojo

 [DEBUG] Retrieving parent-POM: fr.ifremer.sih:sih-parent::1.1 for
project: fr.ifremer.plugins:maven-sih-tools-plugin:maven-plugin:1.1 from
the repository.

 [DEBUG] Retrieving parent-POM: fr.ifremer:common::1.0.0 for project:
fr.ifremer.sih:sih-parent:pom:1.1 from the repository.

 [DEBUG] Adding managed dependencies for
fr.ifremer.plugins:maven-sih-tools-plugin

 [DEBUG]   antlr:antlr:jar:2.7.2:compile

 [DEBUG]   asm:asm:jar:2.2.3:compile

 [...]

 [DEBUG]   jregex:jregex:jar:1.2_01

 [DEBUG]   taglibs:standard:jar:1.0.6

-[INFO]
------------------------------------------------------------------------
----

-[INFO] Building sih-tools-runtime

-[INFO]    task-segment: [sih-tools:reception]

-[INFO]
------------------------------------------------------------------------
----

-[...]

+[INFO]
------------------------------------------------------------------------

+[ERROR] FATAL ERROR

+[INFO]
------------------------------------------------------------------------

+[INFO]
org.codehaus.plexus.component.configurator.BasicComponentConfigurator

+[INFO]
------------------------------------------------------------------------

+[DEBUG] Trace

+java.lang.ClassCastException: [...]

 

 

AFAICT, the plugin artefact is the same for both environments. (cmp on
the pom and jar in the local repositories says so)

The effective-poms are the same, to the exception of the build folders,
and the version of the help-plugin used.

 

Googleing only found things relative to ant tasks in the pom, which is
not the case here (slightly compressed):

 

<?xml version="1.0" encoding="UTF-8"?>

<project [...]>

  <modelVersion>4.0.0</modelVersion>

  <groupId>fr.ifremer.sih</groupId>

  <artifactId>sih-tools-runtime</artifactId>

  <version>1.1</version>

  <packaging>pom</packaging>

  <name>sih-tools-runtime</name>

 

  <repositories> <repository>

      <id>ifremer</id> 

      <name>IFREMER</name> 

      <url>*************</url> 

  </repository> </repositories>

 

  <pluginRepositories> <pluginRepository>

      <id>ifremer</id> 

      <name>IFREMER</name> 

      <url>*************</url> 

   </pluginRepository> </pluginRepositories>

 

  <build> <plugins> <plugin>

        <groupId>fr.ifremer.plugins</groupId>

        <artifactId>maven-sih-tools-plugin</artifactId>

        <version>1.1</version>

        <configuration />

   </plugin> </plugins> </build>

</project>

 

 

I'm at loss as where to look for this problem, and the exception is
rather unhelpful...

 

Any suggestions welcome

Thanks in advance,

 

Jonathan Winterflood

Capgemini Ouest - Brest







This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message 
in error, please notify the sender immediately and delete all copies of this message.