첫 번째로, 불쌍한 나의 영어에 대한 미안하지만, 나는 프랑스 다.Grails & gradle : plugin management
저는 gradles로 grails 프로젝트를 만들고 나머지 플러그인을 사용하고 싶습니다. 여기
import org.grails.gradle.plugin.GrailsTask
version = '1.0'
grailsVersion = '2.2.1'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'grails'
buildscript {
repositories {
mavenCentral()
mavenRepo name: "grails", url: 'http://repo.grails.org/grails/repo'
}
dependencies {
classpath "org.grails:grails-gradle-plugin:1.1.1-SNAPSHOT"
}
}
repositories {
mavenCentral()
mavenRepo name: 'grails', url: 'http://repo.grails.org/grails/repo'
mavenRepo name: 'nexus', url: 'http://nexusurl.fr'
mavenRepo url: 'http://repo.grails.org/grails/plugins'
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'http://url') {
authentication(userName: 'log', password: 'pass')
}
pom.version = '0.0.0'
pom.artifactId = 'yo'
pom.groupId = 'com.something'
pom.packaging = 'war'
}
}
}
dependencies {
['dependencies', 'resources', 'core', 'plugin-domain-class', 'plugin-tomcat', 'plugin-services'].each { plugin ->
compile "org.grails:grails-$plugin:2.2.1"
}
compile 'repo.grails.org:grails-plugins-rest:0.7'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.9'
compile 'org.codehaus.jackson:jackson-core-asl:1.9.9'
compile 'com.googlecode.json-simple:json-simple:1.1'
bootstrap 'org.codehaus.groovy:groovy-all:1.8.6'
}
GRAILS_TASK_PREFIX = 'grails-'
if (name.startsWith(GRAILS_TASK_PREFIX)) {
project.task(name, type: GrailsTask) {
command "${name - GRAILS_TASK_PREFIX}"
}
}
나머지 플러그인 : 여기
내 build.gradle의 conf 파일입니다 이전
http://grails.org/plugin/rest
,이 플러그인은 아주 간단했다 얻을 :
grails install-plugin rest
느릅 나무가 추가 application.properties 파일에 다음 줄을 입력하십시오.
plugins.rest=0.7
이 플러그인을 내 buildFile에 추가하는 방법을 모르겠다.
내 Grails 애플리케이션을 실행하지만 런타임에 오류가 발생 될 수있다 :
compile 'repo.grails.org:grails-plugins-rest:0.7'
:
Error |
2013-06-11 14:20:41,916 [http-bio-8080-exec-8] ERROR errors.GrailsExceptionResolver - MissingMethodException occurred when processing request: [POST] /dwgui/signIn/login - parameters:
username: demo-user
password: ***
No signature of method: com.ftprod.dwgui.security.AuthenticationService.withHttp() is applicable for argument types: (java.util.LinkedHashMap, com.ftprod.dwgui.security.AuthenticationService$_testSign
In_closure1) values: [[uri:http://data.iraiser.eu], com.f[email protected]2786aa0f]. Stacktrace follows:
Message: No signature of method: com.ftprod.dwgui.security.AuthenticationService.withHttp() is applicable for argument types: (java.util.LinkedHashMap, com.ftprod.dwgui.security.AuthenticationService$
_testSignIn_closure1) values: [[uri:http://data.iraiser.eu], com.f[email protected]2786aa0f]
Line | Method
->> 28 | testSignIn in com.ftprod.dwgui.security.AuthenticationService
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 14 | login in com.ftprod.dwgui.security.SignInController
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run . . . in java.lang.Thread
내 build.gradle의 종속 범위에이 라인을 추가하는 것은 나에게 Gradle을 빌드하는 동안 오류를 줄
오류 :
* What went wrong:
Execution failed for task ':grails-run-app'.
> Could not find repo.grails.org:grails-plugins-rest:0.7.
Required by:
:dwgui:1.0
나는 명확하게 마지막 오류를 이해합니다.
그래서 여기 내 질문이 있습니다 : 어떻게 grails usle grale 빌드를 위해 나머지 플러그인을 추가합니까?
이것은 내 BuildConfig.groovy 파일에 적용되었지만이 파일을 신경 쓰지 않는 gradle을 사용하고 있습니다 – Snite
gradle을 실행하면 어떻게됩니까? 'grails run-app' 만? –
"compile"을 사용하고 있는지 확인하십시오 : rest : 0.7 "', not compile 'repo.grails.org : grails-plugins-rest : 0.7'' –