3 Replies Latest reply on Feb 24, 2011 10:56 AM by kcbabo

    Adding a quickstarts repository

    kcbabo

      Barring vehement objections from anyone, I plan on adding a quickstarts repository to the switchyard account on GitHub.  As you might expect, the purpose of this repository is to hold our quickstarts/examples.  The very first quickstart will be the m1app, but feel free to suggest more as you see fit.  For the time being, we will have them all inside the root of the repository.  As we add more, we will most likely split them up into sub-modules based on the test type. 

       

      I have started on the m1app here:

      https://github.com/kcbabo/quickstarts

       

      Once I get to a point where it's actually running the M1 scenario, I will move it into the main upstream.  My feeling is that the initial one I move to upstream will still have band-aids and bubble gum in place to make it run (as we put the finishing touches on M1).  That is OK and actually a good thing, because we can remove the ugly stuff as we complete the remaining pieces.

        • 1. Adding a quickstarts repository
          dward

          +1

          • 2. Re: Adding a quickstarts repository
            kcbabo

            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

              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.