8

grails spring-security-uiプラグインをgrails 3にアップグレードしようとしています。ドキュメントで述べたように、すべての依存関係をbuild.gradleにコピーしました。grails 2プラグインをgrailsにエクスポートする際にエラーが発生しました。3

ファイルは次のようになります。

buildscript { 
    ext { 
     grailsVersion = project.grailsVersion 
    } 
    repositories { 
     mavenLocal() 
     maven { url 'https://repo.grails.org/grails/core' } 
    } 
    dependencies { 
     classpath "org.grails:grails-gradle-plugin:$grailsVersion" 
    } 
} 

plugins { 
    id "io.spring.dependency-management" version "0.5.2.RELEASE" 
    id "com.jfrog.bintray" version "1.2" 
} 

version "0.1-SNAPSHOT" 
group "org.grails.plugins" 

apply plugin: 'maven-publish' 
apply plugin: 'eclipse' 
apply plugin: 'idea' 
apply plugin: "spring-boot" 
apply plugin: "org.grails.grails-plugin" 
apply plugin: "org.grails.grails-gsp" 
// Used for publishing to central repository, remove if not needed 
apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/grailsCentralPublishing.gradle' 
apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/bintrayPublishing.gradle' 

ext { 
    grailsVersion = project.grailsVersion 
    gradleWrapperVersion = project.gradleWrapperVersion 
} 

sourceCompatibility = 1.7 
targetCompatibility = 1.7 

repositories { 
    mavenLocal() 
    mavenCentral() 
    maven { url "https://repo.grails.org/grails/core" } 
} 

dependencyManagement { 
    imports { 
    mavenBom "org.grails:grails-bom:$grailsVersion" 
    } 
    applyMavenExclusions false 
} 

dependencies { 
    provided 'org.springframework.boot:spring-boot-starter-logging' 
    provided "org.springframework.boot:spring-boot-starter-actuator" 
    provided "org.springframework.boot:spring-boot-autoconfigure" 
    provided "org.springframework.boot:spring-boot-starter-tomcat" 

    provided "org.grails:grails-web-boot" 
    provided "org.grails:grails-dependencies" 
    provided 'javax.servlet:javax.servlet-api:3.1.0' 

    compile ':spring-security-core:2.0-RC3' 
    compile ':mail:1.0.5' 
    compile ':jquery:1.11.1' 
    compile ':jquery-ui:1.10.3' 
    compile ':famfamfam:1.0.1' 

    compile ':spring-security-acl:2.0-RC1', { 
     export = false 
    } 

    compile ":hibernate:3.6.10.14", { 
     export = false 
    } 

    build ':release:3.0.1', ':rest-client-builder:2.0.1', { 
     export = false 
    } 

    testCompile "org.grails:grails-plugin-testing" 

    console "org.grails:grails-console" 
} 

task wrapper(type: Wrapper) { 
    gradleVersion = gradleWrapperVersion 
} 

私は私がプラグインを書くためのドキュメントを介して行っている。この

| Error Error initializing classpath: No such property: export for class: org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency_Decorated (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.) 
groovy.lang.MissingPropertyException: No such property: export for class: org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency_Decorated 
    at org.gradle.api.internal.plugins.ExtraPropertiesDynamicObjectAdapter.setProperty(ExtraPropertiesDynamicObjectAdapter.java:46) 
    at org.gradle.api.internal.CompositeDynamicObject.setProperty(CompositeDynamicObject.java:119) 
    at org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency_Decorated.setProperty(Unknown Source) 
    at build_3l359y3diorgc61r1z5bdizfw$_run_closure4_closure8.doCall(/mnt/data/Work/Tutorials/Practice/grails/grails-spring-security-ui-master/build.gradle:70) 
    at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67) 
    at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:130) 
    at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:91) 
    at org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.create(DefaultDependencyHandler.java:70) 
    at org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.doAdd(DefaultDependencyHandler.java:83) 
    at org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.methodMissing(DefaultDependencyHandler.java:117) 
    at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:225) 
    at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:129) 
    at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:163) 
    at org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated.invokeMethod(Unknown Source) 
    at build_3l359y3diorgc61r1z5bdizfw$_run_closure4.doCall(/mnt/data/Work/Tutorials/Practice/grails/grails-spring-security-ui-master/build.gradle:69) 
    at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67) 
    at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:130) 
    at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:91) 
    at org.gradle.api.internal.project.AbstractProject.dependencies(AbstractProject.java:831) 
    at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:225) 
    at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:129) 
    at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147) 
    at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79) 
    at build_3l359y3diorgc61r1z5bdizfw.run(/mnt/data/Work/Tutorials/Practice/grails/grails-spring-security-ui-master/build.gradle:53) 
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52) 
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:154) 
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39) 
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26) 
    at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34) 
    at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:59) 
    at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:492) 
    at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:86) 
    at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42) 
    at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35) 
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:129) 
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106) 
    at org.gradle.initialization.DefaultGradleLauncher.getBuildAnalysis(DefaultGradleLauncher.java:97) 
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.configure(InProcessBuildActionExecuter.java:84) 
    at org.gradle.tooling.internal.provider.ClientProvidedBuildAction.run(ClientProvidedBuildAction.java:43) 
    at org.gradle.tooling.internal.provider.ClientProvidedBuildAction.run(ClientProvidedBuildAction.java:31) 
    at org.gradle.tooling.internal.provider.ConfiguringBuildAction.run(ConfiguringBuildAction.java:119) 
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36) 
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) 
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:48) 
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) 
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) 
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) 
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) 
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) 
    at org.gradle.util.Swapper.swap(Swapper.java:38) 
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) 
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
    at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47) 
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60) 
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:71) 
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
    at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41) 
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) 
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246) 
    at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64) 
| Error Error initializing classpath: No such property: export for class: org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency_Decorated 

のようなエラーが出るのプラグインをインストールしてみてください。輸出は非常に有効なエントリです。なぜ私はこのようなエラーを起こすのですか?

答えて

3

解決方法1: 使用providedではなくcompile 'something', { export = false}として:

configurations { 
    provided 
} 
sourceSets { 
    main { 
      compileClasspath += configurations.provided 
    } 
} 
dependencies { 
    provided ':spring-security-acl:2.0-RC1' 
} 

注:私はこれをテストしていないが、それは動作するはずです。

解決方法2:

関連の問題は、Grailsの3.0.4で修正された/解決されています。バージョン3.0.4にエクスポートしてみてください。

例:

  1. No such property: developmentModeActive for class issue when run schema-export
  2. https://github.com/grails/grails-core/issues/9099
関連する問題