-
-
2. Re: Adding a quickstarts repository
kcbabo Feb 23, 2011 10:06 PM (in response to dward)This is done now.
https://github.com/jboss-switchyard/quickstarts
David - check out the pom.xml for m1app. I added the scanner configuration for Bean component and the build is failing with an NPE. I debugged a bit and it looks like the class lookup is failing, so newInstance() is throwing the NPE.
The config:
<plugin> <groupId>org.switchyard</groupId> <artifactId>switchyard-plugin</artifactId> <version>1.0-SNAPSHOT</version> <configuration> <scannerClassNames> <param>org.switchyard.component.bean.config.model.BeanSwitchYardScanner</param> </scannerClassNames> </configuration> <executions> <execution> <goals> <goal>configurator</goal> </goals> </execution> </executions> </plugin>
Bean component is declared as dependency of the project, so the class is available via some class loader. I tried adding a direct dependency to the plugin declaration itself, but no bueno.
Here's the stack trace:
[ERROR] Failed to execute goal org.switchyard:switchyard-plugin:1.0-SNAPSHOT:configurator (default) on project m1app: null: MojoExecutionException: NullPointerException -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.switchyard:switchyard-plugin:1.0-SNAPSHOT:configurator (default) on project m1app: null at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:203) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188) at org.apache.maven.cli.MavenCli.main(MavenCli.java:134) 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:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException at org.switchyard.tools.maven.plugins.switchyard.ConfiguratorMojo.execute(ConfiguratorMojo.java:156) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195) ... 19 more Caused by: java.lang.NullPointerException at org.switchyard.tools.maven.plugins.switchyard.ConfiguratorMojo.execute(ConfiguratorMojo.java:138) ... 21 more
At this point, I will defer to your Maven class loadering wisdom. ;-)
-
3. Re: Adding a quickstarts repository
kcbabo Feb 24, 2011 10:56 AM (in response to kcbabo)Update : the recent changes to parent pom must have broken and/or fixed things, because I'm able to resolve the bean scanner and transform scanner in m1app now. The next issue I'm running into involves a cast in ConfigurationMojo. The bean and transformer scanners implement Scanner and ConfigurationMojo is expecting SwitchYardScanner.
Caused by: org.apache.maven.plugin.MojoExecutionException: org.switchyard.component.bean.config.model.BeanSwitchYardScanner cannot be cast to org.switchyard.config.model.switchyard.SwitchYardScanner at org.switchyard.tools.maven.plugins.switchyard.ConfiguratorMojo.execute(ConfiguratorMojo.java:156) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195) ... 19 more Caused by: java.lang.ClassCastException: org.switchyard.component.bean.config.model.BeanSwitchYardScanner cannot be cast to org.switchyard.config.model.switchyard.SwitchYardScanner at org.switchyard.tools.maven.plugins.switchyard.ConfiguratorMojo.execute(ConfiguratorMojo.java:138)
Looks like David is aware of this issue and is on top of it, so I'm just posting this as an FYI.