2014-12-31 4 views
0

나는 gradle을 처음 접했고 플러그인 작동 방식을 이해하지 못했습니다.gradle cargo plugin offline

maven 저장소를 사용하지 않고 cargo plugin을 사용하려하지만 jar 파일을 http://mvnrepository.com/artifact/cargo/cargo/0.6에서 다운로드하고 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 

은 누군가가 나에게 올바른 방법이 플러그인으로 구성 도와 드릴까요 실행

? 감사 Gradle을-화물 플러그인-0.6.1.jarLIB 다음 build.gradle 스크립트가 화물을 플러그인을 적용 폴더 아래에 배치된다고 가정

답변

0

:

buildscript { 
    dependencies { 
     classpath fileTree('lib') 
    } 
} 

apply plugin: 'java' 
apply plugin: 'cargo' 

cargo { 
    containerId = 'tomcat6x' 
} 
+0

하셨습니까을 ' t 작업, 같은 오류가 발생했습니다 – carlitos081

+0

'("$ {rootProject.projectDir}/libs")'는 (으)로 평가됩니까? 위에서 언급 한 jar 파일이 lib 디렉토리에 있는지 확인 하시겠습니까? – Opal

+0

libs는 rootProject에 있기 때문에. 어쨌든'fileTree ('libs')도 시도해 봤지만 여전히 같은 오류가 있습니다 – carlitos081

관련 문제