CloudBees-community/tomcat7-clickstack — pull request #12 by cyrille-leclerc (2013-04-30 12:37:44+00:00)
Title: Silently overwrite duplicated war file entries.

If wrongly used, [Ant ](http://ant.apache.org/manual/Tasks/zip.html) task adds in war files duplicates of the same entry (same file name). In such case, the deployment procedure should overwrite the entry.

**Jenkins Exception Message**

```
[cloudbees-deployer] Deploying as (jenkins) to the johndoe account
[cloudbees-deployer] Deploying myapp
[cloudbees-deployer] Resolved from workspace as /scratch/jenkins/workspace/.../myapp.war
[cloudbees-deployer] Deploying via API server at https://api.cloudbees.com/api

com.cloudbees.plugins.deployer.exceptions.DeployException: remote file operation failed: /scratch/jenkins/workspace/.../myapp.war at hudson.remoting.Channel@44f3e798:s-de0b915d
at com.cloudbees.plugins.deployer.engines.Engine.process(Engine.java:162)
at com.cloudbees.plugins.deployer.engines.Engine.perform(Engine.java:96)
at com.cloudbees.plugins.deployer.DeployPublisher.perform(DeployPublisher.java:95)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:728)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:703)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:650)
at hudson.model.Run.execute(Run.java:1530)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: hudson.util.IOException2: remote file operation failed: /scratch/jenkins/workspace/.../myapp.war at hudson.remoting.Channel@44f3e798:s-de0b915d
at hudson.FilePath.act(FilePath.java:877)
at hudson.FilePath.act(FilePath.java:863)
at com.cloudbees.plugins.deployer.engines.Engine.process(Engine.java:156)
... 11 more
Caused by: hudson.remoting.ProxyException: hudson.util.IOException2: Server.InternalError - java.lang.Exception: Failed to start application - null
at com.cloudbees.plugins.deployer.impl.run.RunEngineImpl$DeployFileCallable.invoke(RunEngineImpl.java:331)
at com.cloudbees.plugins.deployer.impl.run.RunEngineImpl$DeployFileCallable.invoke(RunEngineImpl.java:267)
at com.cloudbees.plugins.deployer.engines.Engine$FingerprintingWrapper.invoke(Engine.java:248)
at com.cloudbees.plugins.deployer.engines.Engine$FingerprintingWrapper.invoke(Engine.java:236)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2275)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: hudson.remoting.ProxyException: com.cloudbees.api.BeesClientException: Server.InternalError - java.lang.Exception: Failed to start application - null
at com.cloudbees.api.BeesClient.readResponse(BeesClient.java:1042)
at com.cloudbees.api.BeesClient.applicationDeployArchive(BeesClient.java:578)
at com.cloudbees.plugins.deployer.impl.run.RunEngineImpl$DeployFileCallable.invoke(RunEngineImpl.java:323)
... 13 more
Build step 'Deploy applications' marked build as failure
Sending e-mails to: john.doe@example.com
Finished: FAILURE
```

**Genapp exception**

```
** {{timeout,["Creating application skeleton at /var/genapp/apps/ca1323ce\n",
"Installing tomcat7\n","Installing server config\n",
"Copying application files to /var/genapp/apps/ca1323ce/server/webapps/ROOT\n",
"replace /var/genapp/apps/ca1323ce/server/webapps/ROOT/WEB-INF/lib/antlr-2.7.6.jar? [y]es, [n]o, [A]ll, [N]one, [r]ename: "]},
[{genapp_cmd,run,4},
{genapp_deploy,plugin_setup,2},
{genapp_deploy,plugins_setup,2},
{genapp_deploy,apply_stages,2},
{genapp_deploy,handle_task,1},
{e2_task,dispatch_handle_task,1},
{e2_service,dispatch_info,2},
{gen_server,handle_msg,5}]}
```