smartiniongithub / grails-angularjs-resources Goto Github PK
View Code? Open in Web Editor NEWGrails AngularJS Plugin
License: Apache License 2.0
Grails AngularJS Plugin
License: Apache License 2.0
I followed the installation instructions (added runtime ":angularjs-resource:1.2.5" to BuildConfig.groovy) but get the following errors. What am I doing wrong here?
| Loading Grails 2.2.4
| Configuring classpath
:: problems summary ::
:::: WARNINGS
module not found: org.grails.plugins#angularjs-resource;1.2.5
==== grailsPlugins: tried
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/src/jaketest/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/database-migration-1.3.2/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/webxml-1.4.1/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/tomcat-2.2.4/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/jquery-1.8.3/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/cache-1.0.1/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/resources-1.2/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/hibernate-2.2.4/lib/angularjs-resource-1.2.5.zip
==== grailsHome: tried
/home/jake/.gvm/grails/2.2.4/lib/org.grails.plugins/angularjs-resource/ivy-1.2.5.xml
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/home/jake/.gvm/grails/2.2.4/lib/org.grails.plugins/angularjs-resource/jars/angularjs-resource-1.2.5.zip
/home/jake/.gvm/grails/2.2.4/lib/org.grails.plugins/angularjs-resource/bundles/angularjs-resource-1.2.5.zip
==== grailsHome: tried
/home/jake/.gvm/grails/2.2.4/src/libs/angularjs-resource-1.2.5.xml
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/home/jake/.gvm/grails/2.2.4/src/libs/angularjs-resource-1.2.5.zip
==== grailsHome: tried
/home/jake/.gvm/grails/2.2.4/dist/angularjs-resource-1.2.5.xml
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/home/jake/.gvm/grails/2.2.4/dist/angularjs-resource-1.2.5.zip
==== grailsHome: tried
/home/jake/.grails/2.2.4/cached-installed-plugins/angularjs-resource-1.2.5.xml
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/home/jake/.grails/2.2.4/cached-installed-plugins/angularjs-resource-1.2.5.zip
==== grailsHome: tried
/home/jake/.gvm/grails/2.2.4/plugins/angularjs-resource-1.2.5.pom
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/home/jake/.gvm/grails/2.2.4/plugins/angularjs-resource-1.2.5.zip
==== grailsCentral: tried
http://grails.org/plugins/grails-angularjs-resource/tags/RELEASE_1.2.5/angularjs-resource-1.2.5.pom
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
http://grails.org/plugins/grails-angularjs-resource/tags/RELEASE_1.2.5/grails-angularjs-resource-1.2.5.zip
==== localMavenResolver: tried
/home/jake/.m2/repository/org/grails/plugins/angularjs-resource/1.2.5/angularjs-resource-1.2.5.pom
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/home/jake/.m2/repository/org/grails/plugins/angularjs-resource/1.2.5/angularjs-resource-1.2.5.zip
==== mavenCentral: tried
http://repo1.maven.org/maven2/org/grails/plugins/angularjs-resource/1.2.5/angularjs-resource-1.2.5.pom
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
http://repo1.maven.org/maven2/org/grails/plugins/angularjs-resource/1.2.5/angularjs-resource-1.2.5.zip
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#angularjs-resource;1.2.5: not found
::::::::::::::::::::::::::::::::::::::::::::::
:: problems summary ::
:::: WARNINGS
module not found: org.grails.plugins#angularjs-resource;1.2.5
==== grailsPlugins: tried
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/src/jaketest/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/database-migration-1.3.2/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/webxml-1.4.1/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/tomcat-2.2.4/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/jquery-1.8.3/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/cache-1.0.1/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/resources-1.2/lib/angularjs-resource-1.2.5.zip
/home/jake/.grails/2.2.4/projects/jaketest/plugins/hibernate-2.2.4/lib/angularjs-resource-1.2.5.zip
==== grailsHome: tried
/home/jake/.gvm/grails/2.2.4/lib/org.grails.plugins/angularjs-resource/ivy-1.2.5.xml
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/home/jake/.gvm/grails/2.2.4/lib/org.grails.plugins/angularjs-resource/jars/angularjs-resource-1.2.5.zip
/home/jake/.gvm/grails/2.2.4/lib/org.grails.plugins/angularjs-resource/bundles/angularjs-resource-1.2.5.zip
==== grailsHome: tried
/home/jake/.gvm/grails/2.2.4/src/libs/angularjs-resource-1.2.5.xml
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/home/jake/.gvm/grails/2.2.4/src/libs/angularjs-resource-1.2.5.zip
==== grailsHome: tried
/home/jake/.gvm/grails/2.2.4/dist/angularjs-resource-1.2.5.xml
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/home/jake/.gvm/grails/2.2.4/dist/angularjs-resource-1.2.5.zip
==== grailsHome: tried
/home/jake/.grails/2.2.4/cached-installed-plugins/angularjs-resource-1.2.5.xml
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/home/jake/.grails/2.2.4/cached-installed-plugins/angularjs-resource-1.2.5.zip
==== grailsHome: tried
/home/jake/.gvm/grails/2.2.4/plugins/angularjs-resource-1.2.5.pom
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/home/jake/.gvm/grails/2.2.4/plugins/angularjs-resource-1.2.5.zip
==== grailsCentral: tried
http://grails.org/plugins/grails-angularjs-resource/tags/RELEASE_1.2.5/angularjs-resource-1.2.5.pom
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
http://grails.org/plugins/grails-angularjs-resource/tags/RELEASE_1.2.5/grails-angularjs-resource-1.2.5.zip
==== localMavenResolver: tried
/home/jake/.m2/repository/org/grails/plugins/angularjs-resource/1.2.5/angularjs-resource-1.2.5.pom
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
/home/jake/.m2/repository/org/grails/plugins/angularjs-resource/1.2.5/angularjs-resource-1.2.5.zip
==== mavenCentral: tried
http://repo1.maven.org/maven2/org/grails/plugins/angularjs-resource/1.2.5/angularjs-resource-1.2.5.pom
-- artifact org.grails.plugins#angularjs-resource;1.2.5!angularjs-resource.zip:
http://repo1.maven.org/maven2/org/grails/plugins/angularjs-resource/1.2.5/angularjs-resource-1.2.5.zip
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#angularjs-resource;1.2.5: not found
::::::::::::::::::::::::::::::::::::::::::::::
| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:angularjs-resource:1.2.5
IDEA hook: Grails not found!
| Error java.lang.NullPointerException
| Error at org.jetbrains.groovy.grails.rt.Agent$2.run(Agent.java:135)
| Error at java.lang.Thread.run(Thread.java:679)
In the plugin, release 1.2.5 there is a small problem (in my usage of resources plugin, or in resources plugin ?) when Developer Tools try to download *.min.js.map files, it seems that first is get from a wrong url so it's not downloaded, but others are requested from the right url ... so only the first is missing.
See here for more info:
http://grails.1312388.n4.nabble.com/Resource-plugin-can-I-bundle-js-map-files-tp4652612.html
Hi hava am trying to use your plugin, using grails 2.4, after i added the runtime dependency i get the following error:
Grails-AngularJs/target/work/plugins/resources-1.2.7/src/groovy/org/grails/plugin/resource/ResourceProcessor.groovy: 6: unable to resolve class org.codehaus.groovy.grails.plugins.PluginManagerHolder
@ line 6, column 1.
import org.codehaus.groovy.grails.plugins.PluginManagerHolder
^
any ideas ?
Thanks
Chris G
Hey, are you going to upgrade to 1.0.4 anytime soon?
Still angulajs-resources depends on resources-1.1.6?
I've upgraded resources plugin to version 1.2 but angular does not work.
It works if I use resources plugin 1.1.6.
AngularJS minified files (and only them) already have inside the line defining source mappings, like this:
//# sourceMappingURL=angular.min.js.map
at the and of the file.
To remove the error, I could remove that line in any minified js file but this is error prone, and due to licensing terms I don't think it's a great choice.
So, try from the Grails side (in the plugin) if there is something to do.
To test, run the plugin test webapp and open the Firefox Console.
That in the subject is the error I have when using the plugin.
I've put runtime ":angularjs-resources:1.0.8" in the Buildconfig file.....and then?
What I have to do to use angular?
I've to put something like <r:require modules="angular"/> in the gsp page?
Here is the error poping in the console when I launch the server:
[localhost-startStop-1] ERROR resource.ResourceProcessor - Unable to load resources
java.lang.NullPointerException: Cannot get property 'pluginDir' on null object
at AngularjsResources.getResources(AngularjsResources.groovy:23)
at AngularjsResources$_run_closure1_closure4.doCall(AngularjsResources.groovy:11)
at org.grails.plugin.resource.module.ModulesBuilder.invokeMethod(ModulesBuilder.groovy:46)
at AngularjsResources$_run_closure1.doCall(AngularjsResources.groovy:8)
at org.grails.plugin.resource.ResourceProcessor$_loadModules_closure18.doCall(ResourceProcessor.groovy:848)
at org.grails.plugin.resource.ResourceProcessor.loadModules(ResourceProcessor.groovy:842)
at org.grails.plugin.resource.ResourceProcessor.reloadAll(ResourceProcessor.groovy:1135)
at ResourcesGrailsPlugin$_closure3.doCall(ResourcesGrailsPlugin.groovy:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Hi there,
Environment
When running an application using the plugin, as described in the docs, the angular js files are being minified while running in a dev environment, complicating debugging.
It appears that the issue is here: https://github.com/musketyr/grails-angularjs-resources/blob/master/grails-app/conf/AngularjsResourcesPluginResources.groovy#L13
More specifically, it looks like:
nominify: !dev
should be "
nominify: dev
Cheers,
-Dave
Hi Sandro,
thanks for providing the grails-angularjs-resources plugin. I've tried to use it but it didn't work in my case. I've created an example project of the name 'ginkgo' where I play around with some anuglarjs features. One example contains a basic grid and when I try to run it I get some errors in the JavaScript Console of Chrome - as you can see it here:
When I define the following line in my gsp than everything works fine:
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.11/angular.js"></script>
You can take a look at the gsp here:
https://github.com/m-schneider/ginkgo/blob/master/grails-app/views/basicgrid/index.gsp
Any idea?
Cheers,
-markus
Hello
Since Angular released version 1.0.0 is it possible to update this plugin to use latest version of Angular JS framework ?
Before targeting Grails-2.3.x I think it's safer to target 2.2.x, currently more stable and used. And use its Grails Resources Plugin 1.2.x .
Grails-2.3.x will be targeted later.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.