gradlew cargoRunLocal cmd is failing
hymap opened this issue · 4 comments
My build.gradle file content
//def availablePortFinder = AvailablePortFinder.createPrivate()
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.bmuschko:gradle-tomcat-plugin:2.2.5'
classpath 'com.bmuschko:gradle-cargo-plugin:2.2.3'
}
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'com.bmuschko.tomcat'
apply plugin: 'com.bmuschko.cargo'
apply plugin: 'com.bmuschko.cargo-base'
apply plugin: 'eclipse'
// JDK version source compatibility
sourceCompatibility = 1.8
// project version
version = '1.0'
// War file name
war.baseName = 'cocoaowlCRM'
// Web directory, this overrides the default value "webapp"
//project.webAppDirName = 'WebContent'
repositories {
mavenLocal()
mavenCentral()
}
// Set source directory
sourceSets {
main {
java {
srcDir 'src'
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '3.0'
}
dependencies {
compile 'org.springframework:spring-webmvc:4.3.4.RELEASE'
compile group: 'org.springframework', name: 'spring-web', version: '4.3.4.RELEASE'
compile group: 'org.springframework', name: 'spring-tx', version: '4.3.4.RELEASE'
compile group: 'org.springframework', name: 'spring-context-support', version: '4.3.4.RELEASE'
compile group: 'org.springframework', name: 'spring-expression', version: '4.3.4.RELEASE'
compile group: 'org.springframework', name: 'spring-jms', version: '4.3.4.RELEASE'
compile group: 'org.springframework', name: 'spring-oxm', version: '4.3.4.RELEASE'
compile group: 'javax.servlet.jsp', name: 'jsp-api', version: '2.0'
compile group: 'javax.servlet.jsp.jstl', name: 'javax.servlet.jsp.jstl-api', version: '1.2.1'
compile group: 'org.glassfish.web', name: 'jstl-impl', version: '1.2'
compile 'org.springframework.security:spring-security-web:4.2.0.RELEASE'
compile 'org.springframework.security:spring-security-config:4.2.0.RELEASE'
compile 'org.springframework.security:spring-security-taglibs:4.2.0.RELEASE'
compile group: 'org.springframework.social', name: 'spring-social-facebook', version: '2.0.3.RELEASE'
compile group: 'org.springframework.social', name: 'spring-social-twitter', version: '1.1.2.RELEASE'
compile 'javax.servlet:jstl:1.2'
compile 'org.postgresql:postgresql:9.4-1204-jdbc42'
compile 'net.sf.jasperreports:jasperreports:5.1.0'
compile 'commons-beanutils:commons-beanutils:1.9.2'
compile 'commons-logging:commons-logging:1.2'
compile 'commons-fileupload:commons-fileupload:1.3.2'
compile 'org.apache.commons:commons-pool2:2.4.2'
compile 'org.apache.commons:commons-digester3:3.2'
compile 'org.apache.commons:commons-dbcp2:2.1.1'
compile 'org.apache.commons:commons-io:1.3.2'
compile 'org.apache.commons:commons-collections4:4.1'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'org.aspectj:aspectjrt:1.8.9'
compile 'org.aspectj:aspectjweaver:1.8.9'
compile 'org.attoparser:attoparser:2.0.0.RELEASE'
compile 'dom4j:dom4j:1.6.1'
compile 'ar.com.fdvs:DynamicJasper:5.0.7'
compile 'org.hibernate:ejb3-persistence:1.0.2.GA'
compile 'org.apache.httpcomponents:httpclient:4.5.2'
compile 'org.apache.httpcomponents:httpcore:4.4.4'
compile 'org.im4java:im4java:1.4.0'
compile 'com.lowagie:itext:4.2.2'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.4'
compile 'org.codehaus.jackson:jackson-core-asl:1.9.13'
compile 'com.fasterxml.jackson.core:jackson-core:2.7.4'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.4'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
compile 'org.javassist:javassist:3.20.0-GA'
compile 'net.sourceforge.javacsv:javacsv:2.0'
compile 'org.codehaus.jettison:jettison:1.3.7'
compile 'jgroups:jgroups:2.6.9.GA'
compile 'org.glassfish.web:jstl-impl:1.2'
compile 'javax.transaction:jta:1.1'
compile 'junit:junit:4.12'
compile 'javax.mail:mail:1.4.7'
compile 'ognl:ognl:3.1.7'
compile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.13'
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.52'
compile 'org.slf4j:slf4j-api:1.7.12'
compile group: 'org.apache.tika', name: 'tika-app', version: '1.11'
compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.5.0'
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.5.0'
compile 'org.apache.logging.log4j:log4j-api:2.4.1'
compile 'org.apache.logging.log4j:log4j-core:2.4.1'
compile 'org.tuckey:urlrewritefilter:4.0.3'
compile 'org.apache.velocity:velocity:1.7'
compile 'org.unbescape:unbescape:1.1.1.RELEASE'
compile 'org.apache.velocity:velocity-tools:2.0'
compile 'org.apache.velocity:velocity-tools:2.0'
compile 'org.springframework:spring-websocket:4.3.4.RELEASE'
compile 'org.springframework:spring-orm:4.3.4.RELEASE'
testCompile group: 'junit', name: 'junit', version: '4.+'
//include in compile only, exclude in the war
providedCompile 'javax.servlet:servlet-api:2.5'
compile group: 'org.apache.velocity', name: 'velocity', version: '1.7'
compile group: 'org.apache.velocity', name: 'velocity-tools', version: '2.0'
compile group: 'velocity-tools', name: 'velocity-tools-view', version: '1.4'
compile group: 'net.sourceforge.javacsv', name: 'javacsv', version: '2.0'
compile group: 'velocity-tools', name: 'velocity-tools-generic', version: '1.4'
compile group: 'org.json', name: 'json', version: '20160212'
compile group: 'javax.inject', name: 'javax.inject', version: '1'
compile group: 'org.thymeleaf', name: 'thymeleaf', version: '3.0.0.RELEASE'
compile group: 'javax.transaction', name: 'jta', version: '1.0.1B'
compile group: 'commons-dbcp', name: 'commons-dbcp', version: '1.4'
compile group: 'org.apache.xmlbeans', name: 'xmlbeans', version: '2.6.0'
compile group: 'edu.ucar', name: 'cdm', version: '4.5.5'
compile group: 'io.jsonwebtoken', name: 'jjwt', version: '0.6.0'
compile group: 'com.auth0', name: 'java-jwt', version: '2.1.0'
compile group: 'org.springframework.mobile', name: 'spring-mobile-device', version: '1.1.5.RELEASE'
}
ext.cargoVersion = '1.5.0'
cargo {
//def availablePortFinder = AvailablePortFinder.createPrivate()
containerId = 'tomcat8x'
port = 8080
local {
installer {
installUrl = "https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.2/bin/apache-tomcat-8.5.2.zip"
//downloadDir = file("$buildDir/download")
downloadDir = file("download")
extractDir = file("extract")
}
deployable {
file = file('build/libs/cocoaowlCRM-1.0.war')
context = '/'
}
homeDir= file("extract/apache-tomcat-8.5.2/apache-tomcat-8.5.2")
outputFile = new File('logs/apache-tomcat-8.5.2/server.log')
timeout = 6000000000
}
}
// dependencies to run on tomcat, are mandatory for tomcat plugin
dependencies {
def tomcatVersion = '8.5.2'
//def cargoVersion = '1.5.0'
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}"
tomcat("org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}") {
exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj'
cargo "org.codehaus.cargo:cargo-core-uberjar:${cargoVersion}", "org.codehaus.cargo:cargo-ant:${cargoVersion}"
}
}
task tomcatRunLocal(type: com.bmuschko.gradle.cargo.tasks.local.CargoRunLocal) {
}
// context where tomcat is deployed, by defautl localhost:8080/
//tomcatRun.contextPath = '/'
//tomcatRunWar.contextPath = '/'
ERROR
baylogic@LENOVO /f/peopleCentralBackEnd/sourcecode/20171010/cocoaowl_crm (master
)
$ gradlew cargoRunLocal
:cargoRunLocal
org.codehaus.cargo.container.ContainerException: Failed to create a Tomcat 8.x s
tandalone configuration
:cargoRunLocal FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':cargoRunLocal'.
org.codehaus.cargo.container.ContainerException: Failed to create a Tomcat 8.x
standalone configuration
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
Tomcat installation directory : C:\apache-tomcat-8.5.20
Kindly help me ....
Hyma P
Ran cargoRunLocal command with -s option 👍
$ gradlew cargoRunLocal -s
:cargoRunLocal
org.codehaus.cargo.container.ContainerException: Failed to create a Tomcat 8.x
tandalone configuration
:cargoRunLocal FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':cargoRunLocal'.
org.codehaus.cargo.container.ContainerException: Failed to create a Tomcat 8
standalone configuration
-
Try:
Run with --info or --debug option to get more log output. -
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':cargo
nLocal'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.
ecuteActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.
ecute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskEx
uter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.ex
ute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.exec
e(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExe
ter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecut
.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.exec
e(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecut
.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiring
skWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiring
skWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecuto
orker.processTask(AbstractTaskPlanExecutor.java:74)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecuto
orker.run(AbstractTaskPlanExecutor.java:55)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(Defa
tTaskPlanExecutor.java:32)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(Def
ltTaskGraphExecuter.java:110)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTa
ExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecu
r.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildEx
uter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExe
ter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuild
ecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecu
r.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecu
r.java:30)
at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradle
uncher.java:153)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defa
tBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defa
tBuildOperationExecutor.java:53)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Defau
GradleLauncher.java:150)
at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultG
dleLauncher.java:32)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGra
eLauncher.java:98)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGra
eLauncher.java:92)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defa
tBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defa
tBuildOperationExecutor.java:63)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGrad
Launcher.java:92)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLa
cher.java:83)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildC
troller.run(InProcessBuildActionExecuter.java:94)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(E
cuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuil
ctionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InPro
ssBuildActionExecuter.java:43)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InPro
ssBuildActionExecuter.java:28)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Cont
uousBuildActionExecuter.java:82)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Cont
uousBuildActionExecuter.java:49)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(Execute
ild.java:59)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(Bui
CommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.procee
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execut
WatchForDisconnection.java:49)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.procee
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execu
(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.procee
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemo
execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.procee
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(Fo
ardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(Fo
ardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(F
wardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.procee
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(Lo
ndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.procee
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToCli
t.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(Bui
CommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.procee
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.do
ild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(Bui
CommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.procee
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.HintGCAfterBuild.execute(Hin
CAfterBuild.java:44)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.procee
DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$
run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(Daem
StateCoordinator.java:240)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailure
onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(Stoppabl
xecutorImpl.java:40)
Caused by: : org.codehaus.cargo.container.ContainerException: Failed to create
Tomcat 8.x standalone configuration
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.j
a:116)
at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(B
icAntBuilder.java:78)
at org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(
sicAntBuilder.java:103)
at com.bmuschko.gradle.cargo.tasks.local.LocalCargoContainerTask.runAc
on(LocalCargoContainerTask.groovy:183)
at com.bmuschko.gradle.cargo.tasks.AbstractCargoContainerTask$_start_c
sure2.doCall(AbstractCargoContainerTask.groovy:92)
at com.bmuschko.gradle.cargo.tasks.AbstractCargoContainerTask$_start_c
sure2.doCall(AbstractCargoContainerTask.groovy)
at com.bmuschko.gradle.cargo.util.LoggingHandler.withAntLoggingListene
LoggingHandler.groovy:36)
at com.bmuschko.gradle.cargo.util.LoggingHandler$withAntLoggingListene
call(Unknown Source)
at com.bmuschko.gradle.cargo.tasks.AbstractCargoContainerTask.start(Ab
ractCargoContainerTask.groovy:91)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoSto
$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:133)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoSto
$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:126)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoSto
$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:115)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(Abst
ctTask.java:623)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(Abst
ctTask.java:606)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.
ecuteAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.
ecuteActions(ExecuteActionsTaskExecuter.java:61)
... 68 more
Caused by: org.codehaus.cargo.container.ContainerException: Failed to create a
omcat 8.x standalone configuration
at org.codehaus.cargo.container.spi.configuration.AbstractLocalConfigu
tion.configure(AbstractLocalConfiguration.java:268)
at org.codehaus.cargo.container.spi.configuration.builder.AbstractStan
loneLocalConfigurationWithXMLConfigurationBuilder.configure(AbstractStandalone
calConfigurationWithXMLConfigurationBuilder.java:122)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(Abstr
tLocalContainer.java:198)
at org.codehaus.cargo.ant.CargoTask.executeActions(CargoTask.java:734)
at org.codehaus.cargo.ant.CargoTask.execute(CargoTask.java:576)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.j
a:106)
... 84 more
Caused by: org.codehaus.cargo.container.ContainerException: Invalid configurat
n dir [C:\Users\baylogic\AppData\Local\Temp\cargo\conf]. When using standalone
onfigurations, the configuration dir must point to an empty directory. Note th
everything in that dir will get deleted by Cargo.
at org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLo
lConfiguration.setupConfigurationDir(AbstractStandaloneLocalConfiguration.java
-
at org.codehaus.cargo.container.tomcat.internal.AbstractCatalinaStanda
neLocalConfiguration.doConfigure(AbstractCatalinaStandaloneLocalConfiguration.
va:86)
at org.codehaus.cargo.container.tomcat.Tomcat6xStandaloneLocalConfigur
ion.doConfigure(Tomcat6xStandaloneLocalConfiguration.java:62)
at org.codehaus.cargo.container.tomcat.Tomcat7xStandaloneLocalConfigur
ion.doConfigure(Tomcat7xStandaloneLocalConfiguration.java:73)
at org.codehaus.cargo.container.spi.configuration.AbstractLocalConfigu
tion.configure(AbstractLocalConfiguration.java:263)
... 90 more
BUILD FAILED
Total time: 1 mins 34.37 secs
org.codehaus.cargo.container.ContainerException: Invalid configuration dir [C:\Users\baylogic\AppData\Local\Temp\cargo\conf]. When using standalone configurations, the configuration dir must point to an empty directory. Note that everything in that dir will get deleted by Cargo.
This seems to be the root cause. Try to remove the contents of that directory.
I am going to close this issue as the conversation stopped after my suggestion.