simplicityitself / grails-gwt

New Grails GWT Plugin
Other
23 stars 18 forks source link

Source dependencies + Install fix #17

Closed pedjak closed 11 years ago

pedjak commented 11 years ago

Hi,

there is an issue with downloading validation-api source dependencies at least on grails 2.2.x (I have not checked under other 2.x versions). The jar is not fetched at all using the current resolving mechanism and think the problem is connected with GRAILS-6147 issue. However, I think I have managed to fix it - I use now m:classifier attribute to specify classifier and an additional line is needed in BuildConfig under grails.project.dependency.resolution:

dependencyManager.ivySettings.defaultCacheIvyPattern = "[organisation]/module/ivy-revision.xml"

besides this, this branch contains another fix, for the effect I got once: _Install script failed at updatingClasspath. Therefore, I have wrapped it in a try-catch block. Updating the classpath directly during the installation is only important if you triggered this by compile task or some other depending on it. Otherwise, it could be avoided as well. Meantime I refresh first my dependencies via grails refresh-dependencies before starting any compilation - it is somehow safer.

confile commented 11 years ago

@pedjak I also get an error while refreshing dependencies: Do you have any idea how to fix it?

| 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
pedjak commented 11 years ago

grails 2.3 will switch to a fully different dependency engine (AetherDependencyManager) and the plugin depends at the moment on Ivy. So - do not use grails 2.3 at the moment.