Allow the remote deployer to undeploy deployment plans on JOnAS 5.x

Description

Allow the remote deployer to undeploy deployment plans on JOnAS 5.x

Currently, this does not work since:

  • The deployment plans are by default added as a Maven dependency with extension .pom, JOnAS expects .xml

  • Deployment plans are not in J2EEServer.deployedFiles; it is in the JOnASDeploymentPlan MBean's DeploymentPlans attribute

Example failure stack trace:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 [ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.1.3:deployer-undeploy (verify-deploy) on project deployment: Execution verify-deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.1.3:deployer-undeploy failed: Undeployment error: Cannot find deployable org.codehaus.cargo.container.deployable.File[deployment-0.0.1-SNAPSHOT.pom] in JONAS_BASE -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.1.3:deployer-undeploy (verify-deploy) on project deployment: Execution verify-deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.1.3:deployer-undeploy failed: Undeployment error: Cannot find deployable org.codehaus.cargo.container.deployable.File[deployment-0.0.1-SNAPSHOT.pom] in JONAS_BASE at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 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:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 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.PluginExecutionException: Execution verify-deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.1.3:deployer-undeploy failed: Undeployment error: Cannot find deployable org.codehaus.cargo.container.deployable.File[deployment-0.0.1-SNAPSHOT.pom] in JONAS_BASE at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: org.codehaus.cargo.container.ContainerException: Undeployment error: Cannot find deployable org.codehaus.cargo.container.deployable.File[deployment-0.0.1-SNAPSHOT.pom] in JONAS_BASE at org.codehaus.cargo.container.jonas.internal.AbstractJonasRemoteDeployer.undeploy(AbstractJonasRemoteDeployer.java:420) at org.codehaus.cargo.container.jonas.internal.AbstractJonas5xRemoteDeployer.undeploy(AbstractJonas5xRemoteDeployer.java:229) at org.codehaus.cargo.maven2.DeployerUndeployMojo.performDeployerActionOnSingleDeployable(DeployerUndeployMojo.java:50) at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:191) at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:103) at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:279) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) ... 20 more Caused by: org.codehaus.cargo.container.ContainerException: Cannot find deployable org.codehaus.cargo.container.deployable.File[deployment-0.0.1-SNAPSHOT.pom] in JONAS_BASE at org.codehaus.cargo.container.jonas.internal.AbstractJonas5xRemoteDeployer.getRemoteFileName(AbstractJonas5xRemoteDeployer.java:476) at org.codehaus.cargo.container.jonas.internal.AbstractJonasRemoteDeployer.undeploy(AbstractJonasRemoteDeployer.java:355) ... 26 more

Status

Assignee

Savas Ali Tokmen

Reporter

Savas Ali Tokmen

Components

Fix versions

Priority

Minor