We're updating the issue view to help you get more done. 

deployer not recognized in child pom if container defined in parent pom

Description

If container defined in a parent pom and deployer in a child pom then deployer is not recognized by cargo-maven2-plugin.

Workaround: move the container definition to each child pom.

Detailed description:
I have a container defined in a root pom:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <configuration> <container> <containerId>tomcat6x</containerId> <type>remote</type> </container> <configuration> <type>runtime</type> <properties> <cargo.tomcat.manager.url>${tomcatManagerUrl}</cargo.tomcat.manager.url> <cargo.remote.username>xxx</cargo.remote.username> <cargo.remote.password>xxxx</cargo.remote.password> </properties> </configuration> </configuration> </plugin>

And the deployer in several child poms:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <configuration> <deployer> <type>remote</type> <deployables> <deployable> <groupId>${project.groupId}</groupId> <artifactId>${project.artifactId}</artifactId> <type>war</type> <properties> <context>/</context> </properties> </deployable> </deployables> </deployer> </configuration> </plugin>

When I try to build with the following maven command:
mvn -DskipTests=true -P staging cargo:deployer-redeploy

I get the following error:

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 40 41 42 43 44 45 46 47 48 org.codehaus.cargo.container.ContainerException: There's no registered deployer matching your container's type of [remote] at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:157) at org.codehaus.cargo.maven2.AbstractDeployerMojo.createDeployer(AbstractDeployerMojo.java:69) at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:45) at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:255) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) 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 hudson.maven.agent.Main.launch(Main.java:165) at hudson.maven.MavenBuilder.call(MavenBuilder.java:159) at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:696) at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:640) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)

Status

Assignee

Savas Ali Tokmen

Reporter

S. Ali Tokmen

Components

Fix versions

Affects versions

1.0.1

Priority

Major