gpt4 book ai didi

java - 无法使用Grago的Cargo插件在本地部署

转载 作者:行者123 更新时间:2023-12-03 06:10:34 25 4
gpt4 key购买 nike

我在使用Grago的Cargo插件部署Java应用程序时遇到问题。

我尝试将commons-discovery和commons-logging添加为依赖项,但效果不佳。

:build
:copyWarToTomcat
:removeSymLinks
:removeExplodedWar UP-TO-DATE
:cargoRunLocal FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cargoRunLocal'.
> Could not create type cargo due to java.lang.NoClassDefFoundError: org/apache/commons/discovery/resource/ClassLoaders

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':cargoRunLocal'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)

BUILD FAILED

这是我build.gradle中的 cargo 依赖关系:
dependencies {
classpath 'com.bmuschko:gradle-cargo-plugin:2.1.1'
}

这是我添加了Cargo配置的localDeploy.gradle:
apply plugin: 'com.bmuschko.cargo'

cargo {
containerId = 'tomcat7x'

local {
installer {
installUrl = 'https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.67/bin/apache-tomcat-7.0.67.zip'
downloadDir = file("$buildDir/download")
extractDir = file("$buildDir/extract")
}
}
}

最佳答案

似乎常见的搜索jar文件未正确加载。

我想您应该在org.gradle.debug=true中启用gradle.properties并尝试对其进行调试-
设置为true时,Gradle将在启用远程调试的情况下运行构建,侦听端口5005。请注意,这等效于将-Xrunjdwp:transport = dt_socket,server = y,suspend = y,address = 5005添加到JVM命令。行,并将挂起虚拟机,直到连接了调试器。

关于java - 无法使用Grago的Cargo插件在本地部署,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35063189/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com