Grails 2.3.0에서, 내 플러그인이 의존하는 플러그인은 maven-install을 실행할 때 내 보내지 않습니다. 이는 2.2.3에서 작동 :maven-install을 사용하여 Grails 2.3.0에서 플러그인의 전이 의존성을 어떻게 내 보내야합니까?
$ which grails
/Applications/grails-2.2.4/bin/grails
$ grails create-plugin myplugin
| Created plugin Myplugin
# add spring-security-core
$ cd myplugin; cat grails-app/conf/BuildConfig.groovy
...
plugins {
build(":tomcat:$grailsVersion",
":release:2.2.1",
":rest-client-builder:1.0.3") {
export = false
}
compile ":spring-security-core:1.2.7.3"
}
$ grails compile; grails maven-install
$ cat target/pom.xml|grep spring
<artifactId>spring-security-core</artifactId>
$ cat ~/.m2/repository/org/grails/plugins/myplugin/0.1/myplugin-0.1.pom|grep spring
<artifactId>spring-security-core</artifactId>
하지만 내 application.properties가 목록에 종속성이 없습니다
$ which grails
/Applications/grails-2.3.0/bin/grails
$ grails create-plugin mynewplugin
| Created plugin Mynewplugin
# add spring-security-core
$ cd mynewplugin; cat grails-app/conf/BuildConfig.groovy
...
plugins {
build(":release:3.0.0",
":rest-client-builder:1.0.3") {
export = false
}
compile ":spring-security-core:1.2.7.3"
}
$ grails compile; grails maven-install
$ cat target/pom.xml|grep spring
$ cat ~/.m2/repository/org/grails/plugins/mynewplugin/0.1/mynewplugin-0.1.pom|grep spring
$
2.3.0에서. Grails 2.3.1을 소스에서 빌드하려고했지만 2.3.0과 동일하게 동작했습니다. 목표는 다른 플러그인에 의존하는 플러그인을 가질 수있게하는 것이며, 주요 앱이 명시 적으로 선언하지 않아도 이러한 종속성을 기본 앱에 내 보냅니다. 그게 가능해야하고, 그렇다면 무엇을 놓치고 있습니까? 나는 많은 다른 관련된 stackoverflow 응답과 Grails 메일 링리스트를 읽었지만, 아무것도 이것에 대해 정리하지 않았다.
여기를 참조 버트의 대답 : http://stackoverflow.com/ 그것은 3.0.1 그래서 당신의 BuildConfig.groovy이를 추가하고 다시 실행 받는다는 설치에 고정이 문제를 해결합니다 questions/18995006/how-to-add-plugin-dependencies-to-pom-xml – zoran119
이 의견에서 문제가 해결되었습니다. http://stackoverflow.com/questions/18995006/how-to-add-plugin-dependencies-to-pom-xml#comment28118466_18995834 –