sebastienblanc / geolocation

Geolocation grails plugin
http://www.grails.org/plugin/geolocation
Other
13 stars 8 forks source link

Unable to resolve class com.javadocmd.simplelatlng.LatLng #10

Open zoran119 opened 11 years ago

zoran119 commented 11 years ago

Hi,

I'm getting the following errors when after installing the plugin. Any idea what it could be?

| Error Compilation error: startup failed:
/home/zoran/.grails/2.2.2/projects/play/plugins/geolocation-0.4.1/src/groovy/org/grails/plugin/geolocation/utils/GeoUtils.groovy: 4: unable to resolve class com.javadocmd.simplelatlng.LatLng
 @ line 4, column 1.
   import com.javadocmd.simplelatlng.LatLng;
   ^

/home/zoran/.grails/2.2.2/projects/play/plugins/geolocation-0.4.1/src/groovy/org/grails/plugin/geolocation/utils/GeoUtils.groovy: 9: unable to resolve class com.javadocmd.simplelatlng.LatLng 
 @ line 9, column 2.
        static LatLng  convertGeopositionToLatLng(GeoPosition geoposition){
    ^

/home/zoran/.grails/2.2.2/projects/play/plugins/geolocation-0.4.1/grails-app/services/org/grails/plugin/geolocation/GeolocationService.groovy: 5: unable to resolve class com.javadocmd.simplelatlng.util.LatLngConfig
 @ line 5, column 1.
   import com.javadocmd.simplelatlng.util.LatLngConfig;
   ^

/home/zoran/.grails/2.2.2/projects/play/plugins/geolocation-0.4.1/grails-app/services/org/grails/plugin/geolocation/GeolocationService.groovy: 6: unable to resolve class com.javadocmd.simplelatlng.util.LengthUnit
 @ line 6, column 1.
   import com.javadocmd.simplelatlng.util.LengthUnit;
   ^

/home/zoran/.grails/2.2.2/projects/play/plugins/geolocation-0.4.1/grails-app/services/org/grails/plugin/geolocation/GeolocationService.groovy: 4: unable to resolve class com.javadocmd.simplelatlng.LatLngTool
 @ line 4, column 1.
   import com.javadocmd.simplelatlng.LatLngTool;
   ^

/home/zoran/.grails/2.2.2/projects/play/plugins/geolocation-0.4.1/grails-app/services/org/grails/plugin/geolocation/GeolocationService.groovy: 20: unable to resolve class com.javadocmd.simplelatlng.util.LengthUnit 
 @ line 20, column 2.
        private LengthUnit getLengthUnit(){
    ^

6 errors
gauravchauhan commented 11 years ago

I am not sure if this plugin has been tested on 2.2.2. It works on 1.3.7 and 2.0.0 for me. Sorry for not being of any help here.

zoran119 commented 11 years ago

I did some more research and it turns out that the plugin works if I specify legacyResolve = true in my BuildConfig.groovy. The user guide says that maybe the plugin dependencies should be declared with a different scope... more info at http://grails.org/doc/2.2.1/guide/upgradingFromPreviousVersionsOfGrails.html (under 'Dependency resolution' heading).

I added runtime 'com.javadocmd:simplelatlng:1.0.0' as a dependency in my project (in addition to installing the plugin). Also seems to work...

aldrinm commented 10 years ago

I guess this plugin should be republished as a Maven artifact with the dependencies in the POM?

grodriguezg commented 10 years ago

zoran119 your comment solved my problem........thx