0 Replies Latest reply on Mar 30, 2010 8:38 AM by dendroid66

    Deployment order, cargo plugin for Maven2, JBOSS container

    dendroid66

      Hello,

      I'm trying to do my integration tests by using cargo plugin for Maven2.

       

      The problem that the JBOSS 4.2 defined as a container doesn't deploy the modules (EJB) in order they were defined in the pom.xml though the cargo has  successfully copied all the modules to the "deploy" directory.

       

      Because of the dependency in the modules one must be deployed before other.

       

      My question is: How is it possible to tune cargo plugin or JBOSS configuration to follow the order defined in the module's pom.xml?

       

      I have already tried to put <pingUrl> to insure that a particular EJB has been deployed, but it was not working.

      Another trick:

      <configuration>
      <configuration>
      <deployables>
      <deployable>
      <groupId>mexi</groupId>
      <artifactId>com.mexi.ldap</artifactId>
      <type>ejb</type>
      <properties>
      <ejb>01</ejb>
      </properties>
      </deployable>

       

      also was not working giving an error:

       

      [INFO] Trace
      Invalid property [ejb] for deployable type [ejb]
      at org.codehaus.cargo.maven2.configuration.Deployable.callMethodForProperty(Deployable.java:279)
      at org.codehaus.cargo.maven2.configuration.Deployable.setPropertiesOnDeployable(Deployable.java:172)
      at org.codehaus.cargo.maven2.configuration.Deployable.createDeployable(Deployable.java:140)
      at org.codehaus.cargo.maven2.configuration.Configuration.addStaticDeployables(Configuration.java:272)
      at org.codehaus.cargo.maven2.configuration.Configuration.createConfiguration(Configuration.java:204)
      at org.codehaus.cargo.maven2.AbstractCargoMojo.createConfiguration(AbstractCargoMojo.java:304)
      at org.codehaus.cargo.maven2.AbstractCargoMojo.createNewContainer(AbstractCargoMojo.java:458)
      at org.codehaus.cargo.maven2.AbstractCargoMojo.createContainer(AbstractCargoMojo.java:398)
      at org.codehaus.cargo.maven2.ContainerStartMojo.doExecute(ContainerStartMojo.java:52)
      at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:255)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
      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.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: java.lang.NoSuchMethodException: org.codehaus.cargo.container.deployable.EJB.setEjb(java.lang.String)
      at java.lang.Class.getMethod(Class.java:1605)
      at org.codehaus.cargo.maven2.configuration.Deployable.callMethodForProperty(Deployable.java:273)
      ... 28 more
      --- Nested Exception ---
      java.lang.NoSuchMethodException: org.codehaus.cargo.container.deployable.EJB.setEjb(java.lang.String)
      at java.lang.Class.getMethod(Class.java:1605)
      at org.codehaus.cargo.maven2.configuration.Deployable.callMethodForProperty(Deployable.java:273)
      at org.codehaus.cargo.maven2.configuration.Deployable.setPropertiesOnDeployable(Deployable.java:172)
      at org.codehaus.cargo.maven2.configuration.Deployable.createDeployable(Deployable.java:140)
      at org.codehaus.cargo.maven2.configuration.Configuration.addStaticDeployables(Configuration.java:272)
      at org.codehaus.cargo.maven2.configuration.Configuration.createConfiguration(Configuration.java:204)
      at org.codehaus.cargo.maven2.AbstractCargoMojo.createConfiguration(AbstractCargoMojo.java:304)
      at org.codehaus.cargo.maven2.AbstractCargoMojo.createNewContainer(AbstractCargoMojo.java:458)
      at org.codehaus.cargo.maven2.AbstractCargoMojo.createContainer(AbstractCargoMojo.java:398)
      at org.codehaus.cargo.maven2.ContainerStartMojo.doExecute(ContainerStartMojo.java:52)
      at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:255)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
      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.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)

       

       

      Thank you in advance.