1

使用grails GWT 插件时,我无法刷新我的依赖项。

我插入

compile ":gwt:0.8"

进入我的 BuildConfig.groovy 并运行:grails refresh-dependencies。我的 Grails 版本是 2.3M1。

该过程因以下错误而停止。我该如何解决?

| Loading Grails 2.3.0.M1
| Configuring classpath.
| Environment set to development.....
Gwt version 2.5.0 requested, downloading required dependencies
| Error Error loading event script from file [/Users/mg/Documents/Grails/GGTS-3.3M1-  JUNO-4.2.2/testg23/target/work/plugins/gwt-0.8/scripts/_Events.groovy] No such property: resolveEngine for class: org.codehaus.groovy.grails.resolve.maven.aether.AetherDependencyManager (Use --stacktrace to see the full trace)
| Compiling 17 source files.
| Error Compilation error: startup failed:
Compile error during compilation with javac.
/Users/mg/Documents/Grails/GGTS-3.3M1-JUNO-4.2.2/testg23/target/work/plugins/gwt-0.8/src/java/grails/plugins/gwt/client/GwtActionService.java:3: error: package com.google.gwt.user.client.rpc does not exist
import com.google.gwt.user.client.rpc.RemoteService;

/Users/mg/Documents/Grails/GGTS-3.3M1-JUNO-4.2.2/testg23/target/work/plugins/gwt-0.8/src/java/grails/plugins/gwt/client/GwtActionService.java:12: error: cannot find symbol
public interface GwtActionService extends RemoteService {

symbol: class RemoteService
/Users/mg/Documents/Grails/GGTS-3.3M1-JUNO-4.2.2/testg23/target/work/plugins/gwt-0.8/src/java/grails/plugins/gwt/client/GwtActionServiceAsync.java:3: error: package com.google.gwt.user.client.rpc does not exist
import com.google.gwt.user.client.rpc.AsyncCallback;

/Users/mg/Documents/Grails/GGTS-3.3M1-JUNO-4.2.2/testg23/target/work/plugins/gwt-  0.8/src/java/grails/plugins/gwt/client/GwtActionServiceAsync.java:11: error: cannot find symbol
void execute(Action action, AsyncCallback callback);

symbol: class AsyncCallback
location: interface GwtActionServiceAsync
Note: /Users/mg/Documents/Grails/GGTS-3.3M1-JUNO-4.2.2/testg23/target/work/plugins/gwt-0.8/src/java/org/codehaus/groovy/grails/plugins/gwt/XMLJUnitResultFormatter.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
1 error
4

2 回答 2

1

我成功安装了 gwt 插件。脚步:

  • 安装 Grails 2.3.0.M1,创建GRAILS_HOME.
  • 安装的 GWT SDK
  • GWT_HOME创建了指向 gwt 文件夹的env var 。
  • 创建了一个新项目
  • 更改了 BuildConfig.groovy,添加了依赖项compile ":gwt:0.8"
  • 运行了命令grails compile --refresh-dependencies
于 2013-05-21T01:43:28.523 回答
0

默认依赖解析引擎在 Grails 2.3.M1中更改为Aether (此后)。由于这是一个里程碑版本,最初可能会有一些小问题。如果您想回退到mavenivy作为依赖解析器,请使用

grails.project.dependency.resolver = "maven" // or ivy

查看Grails 2.3 中的新增功能。

于 2013-05-20T19:44:20.670 回答