2013-08-02 3 views
3

나는 아주 간단한 gradle 프로젝트가 있습니다. 나는 지금 막 나침반을 달리기 위하여 시도하고있다. 그러나 gradle installCompass을 실행하려고하면 빌드가 실패합니다. 나는 사용하고있는 빌드 스크립트를 포함시켰다. 프로젝트에이 스크립트와 단일 scss 파일 만 있습니다.간단한 gradle 빌드 나침반 실패

build.gradle

apply plugin: 'compass' 

buildscript { 
    repositories { 
     mavenLocal() 
     mavenCentral() 
     maven { url 'http://dl.bintray.com/robfletcher/gradle-plugins' } 
    } 
    dependencies { 
     classpath 'org.jruby:jruby-complete:1.7.3' 
     classpath 'org.gradle.plugins:gradle-compass:1.0.7' 
    } 
} 
compass { 
    cssDir = file('public/styles') 
    sassDir = file('scss') 
} 

내가

A problem occurred configuring root project 'GradleStyleGuide'. 
> Could not resolve all dependencies for configuration ':classpath'. 
    > Could not find org.jruby:jruby-complete:1.7.3.. 
    Required by: 
     :GradleStyleGuide:unspecified 

를 얻을 오류가 종속성 검사의 결과

다음
compass 
\--- org.jruby:jruby-complete:1.7.3 FAILED 

내가 빌드에서 실행할 때 발생하는 것입니다 명령 행.

Gradle 1.6 
------------------------------------------------------------ 

Gradle build time: Tuesday, May 7, 2013 9:12:14 AM UTC 
Groovy: 1.8.6 
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012 
Ivy: 2.2.0 
JVM: 1.7.0_17 (Oracle Corporation 23.7-b01) 
OS: Windows 7 6.1 amd64 

C:\Users\me>cd \code\GradleStyleGuide 

C:\code\GradleStyleGuide>gradle installCompass 
Download http://repo1.maven.org/maven2/org/jruby/jruby-complete/1.7.3/jruby-complete-1.7.3.pom 
Download http://repo1.maven.org/maven2/org/jruby/shared/1.7.3/shared-1.7.3.pom 
Download http://dl.bintray.com/robfletcher/gradle-plugins/org/gradle/plugins/gradle-compass/1.0.7/gradle-compass-1.0.7.pom 
Download http://repo1.maven.org/maven2/org/jruby/jruby-complete/1.7.3/jruby-complete-1.7.3.jar 
Download http://dl.bintray.com/robfletcher/gradle-plugins/org/gradle/plugins/gradle-compass/1.0.7/gradle-compass-1.0.7.jar 
:installCompass FAILED 

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':installCompass'. 
> Could not resolve all dependencies for configuration ':compass'. 
    > Could not find org.jruby:jruby-complete:1.7.3. 
    Required by: 
     :GradleStyleGuide:unspecified 

* 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: 10.014 secs 
+0

mavenLocal'없이 시도()', 그냥 확인하기 위해'--refresh-dependencies' 던져. –

+0

mavenLocal()을 제거하고 새로 고침을 시도했지만 그 작업이 없기 때문에 도움이되지 않았습니다. – zmanc

답변

1

mavenCentral의 래퍼 작업과 저장소를 추가 한 후 buildscript 외부에서이 작업을 수행 할 수있었습니다.

buildscript { 
    repositories { 
     mavenCentral() 
     maven { url 'http://dl.bintray.com/robfletcher/gradle-plugins' } 
    } 
    dependencies { 
     classpath 'org.gradle.plugins:gradle-compass:1.0.7' 
    } 
} 

repositories { 
    mavenCentral() 
} 

apply plugin: 'compass' 

task wrapper(type: Wrapper) { 
    gradleVersion = "1.6" 
} 

compass { 
    cssDir = file('public/styles') 
    sassDir = file('sass') 
} 
+0

이 나침반을 여러 폴더에 사용할 수 있습니까? http://stackoverflow.com/q/33285167/2072569 (어쩌면 당신은 50 명의 담당자에게 이것을 안다) – Roel

1

내가 해결할 수 jruby-complete 잘 (빌드 스크립트를 사용). 문제가 환경과 관련 될 가능성이 있습니다 (예 : Gradle 용으로 구성된 프록시 설정 없음). --info으로 실행하고 로그 출력을 확인하는 것이 좋습니다.

+0

집에서이 문제를 겪고 있었고 지금은 직장에서 일하고 있습니다. 내가 gradle을 설치하는 데 문제가있을 수 있습니까? 초기 게시물에 더 많은 정보를 추가했습니다. jruby를 다운로드하는 것을 볼 수 있지만 의존성을 해결할 수 없다는 내용입니다. – zmanc

+0

말하기 어렵다. 가장 좋은 기회는 로그를 검사하는 것입니다. –

+0

빌드 스크립트 클래스 경로를 확인할 때 실제로 실패하지 않습니다. 'installCompass' 태스크가'compass' 설정을 해결하려 할 때 실패합니다. 'compass' 플러그인을 올바르게 설정하지 않았을 수 있습니까? (나는이 플러그인에 익숙하지 않다.) –

관련 문제