我是gradle的新手,我不明白这个插件是如何工作的。
我尝试在不使用maven存储库的情况下使用cargo插件,但从http://mvnrepository.com/artifact/cargo/cargo/0.6下载jar文件并将其放入我的lib文件夹中。
我的构建文件是:
apply plugin: 'war'
apply plugin: 'cargo'
configurations {
weblogic
}
def Properties tomcatDeployProps = new Properties()
tomcatDeployProps.load( new FileInputStream(project.file("src/conf/tomcat-deploy.properties")))
buildscript {
repositories {
flatDir dirs: "${rootProject.projectDir}/libs"
}
dependencies {
classpath 'org.gradle.api.plugins:cargo:0.6'
}
}
dependencies {
cargo 'cargo:cargo:0.6'
}这是一个多项目配置,并且此build.gradle位于一个子项目中。
当我跑的时候
$ gradle tasks
* Config properties
> environment : tst
> dbPropsFile : C:\developer\projects\FINEOS\fineos8.1\branches\dev\ServiceMonitor\conf\tst-db.properties
> deployPropsFile : C:\developer\projects\FINEOS\fineos8.1\branches\dev\ServiceMonitor\conf\tst-deploy.properties
> casetypePropsFile : C:\developer\projects\FINEOS\fineos8.1\branches\dev\ServiceMonitor\conf\etc\bo-mappings\tst-casetype.properties
> tasktypePropsFile : C:\developer\projects\FINEOS\fineos8.1\branches\dev\ServiceMonitor\conf\etc\bo-mappings\tst-tasktype.properties
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\developer\projects\FINEOS\fineos8.1\branches\dev\ServiceMonitor\ecrm-webapp\build.gradle' line: 3
* What went wrong:
A problem occurred evaluating project ':ecrm-webapp'.
> Failed to apply plugin [id 'cargo']
> Plugin with id 'cargo' not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.091 secs有没有人能帮我正确配置这个插件?谢谢
发布于 2014-12-31 22:06:21
假设gradle- cargo -plugin-0.6.1.jar放在lib文件夹下,下面的build.gradle脚本应用cargo插件:
buildscript {
dependencies {
classpath fileTree('lib')
}
}
apply plugin: 'java'
apply plugin: 'cargo'
cargo {
containerId = 'tomcat6x'
}https://stackoverflow.com/questions/27720810
复制相似问题