2017-12-18 10 views
0

우리는 플러그인 및 Gradle을을 codenarc 사용하고 난 의존성에서 이상한 물건을 참조하십시오 codenark의Codenarc 이상한 의존성

codenarc - The CodeNarc libraries to be used for this project. 
\--- org.codenarc:CodeNarc:0.25.2 
+--- junit:junit:4.8.1 -> 4.12 
| \--- org.hamcrest:hamcrest-core:1.3 
+--- org.codehaus.groovy:groovy-xml:2.1.8 -> 2.6.0-alpha-1 
| \--- org.codehaus.groovy:groovy:2.6.0-alpha-1 
+--- org.codehaus.groovy:groovy:2.1.8 -> 2.6.0-alpha-1 
+--- org.codehaus.groovy:groovy-ant:2.1.8 -> 2.6.0-alpha-1 
| +--- org.codehaus.groovy:groovy:2.6.0-alpha-1 
| +--- org.codehaus.groovy:groovy-groovydoc:2.6.0-alpha-1 -> 2.4.9 
| | +--- org.codehaus.groovy:groovy-templates:2.4.9 
| | | +--- org.codehaus.groovy:groovy:2.4.9 -> 2.6.0-alpha-1 
| | | \--- org.codehaus.groovy:groovy-xml:2.4.9 -> 2.6.0-alpha-1 (*) 
| | \--- org.codehaus.groovy:groovy:2.4.9 -> 2.6.0-alpha-1 
| +--- org.apache.ant:ant-junit:1.9.9 
| \--- org.apache.ant:ant-antlr:1.9.9 
\--- org.gmetrics:GMetrics:0.7 
     +--- org.codehaus.groovy:groovy:[2.1.0,) -> 2.6.0-alpha-1 
     +--- org.codehaus.groovy:groovy-xml:[2.1.0,) -> 2.6.0-alpha-1 (*) 
     \--- org.codehaus.groovy:groovy-ant:[2.1.0,) -> 2.6.0-alpha-1 (*) 

버전 0.25.2입니다와 치에가 끝내 2.1.8에 따라 다르지만 무슨 일을 - 2.6.0-alpha-1에 링크 된 이유는 무엇입니까? Groovy 2.1.8 버전을 사용하기 위해 codenark를 어떻게 말할 수 있습니까?

도움 주셔서 감사합니다.

답변

2

출력에서 ​​볼 수 있듯이 범인은 GMetrics입니다.
CodeNarc 0.25.2는 Groovy 2.1.0 이상인 GMetrics 0.7에 따라 다르며 가장 최신 버전 인 2.6.0-alpha-1을 사용합니다.
기본 버전 충돌 해결 전략은 충돌시 최신 버전을 사용하며 2.6.0-alpha-1입니다.

lib가 동적 범위로 게시하는 데 오류가 있습니다 (제 의견으로는).
GMetrics도 분명히 이것을 오류로 간주하고 특정 Groovy 버전에 의존하는 1.0에서이 종속성을 수정했습니다.
CodeNarc 1.0은 GMetrics 1.0에 따라 다릅니다.

가능한 경우 가장 쉽게 할 수있는 방법은 CodeNarc 1.0에 의존하는 것이며 문제는 사라질 것입니다.

또는 Groovy 버전을 자신의 종속성에서 force true으로 선언하면 사용자가 정의한 버전이 강제로 적용됩니다.

또는 선택한 버전에 영향을 미치도록 종속성 분석을 구성 할 수 있습니다.