I'm running Grails 2.1.0 and I can't install the webflow plugin:
$ grails install-plugin webflow
| Plugin installed.
$ grails
| Configuring classpath
:: problems summary ::
:::: WARNINGS
module not found: org.springframework.webflow#org.springframework.webflow;2.0.8.RELEASE
...
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.springframework.webflow#org.springframework.webflow;2.0.8.RELEASE: not found
:: org.springframework.webflow#org.springframework.binding;2.0.8.RELEASE: not found
:: org.springframework.webflow#org.springframework.js;2.0.8.RELEASE: not found
::::::::::::::::::::::::::::::::::::::::::::::
Does anyone have any ideas?
Thanks
install-plugin is deprecated in grails 2.0. Edit plugins section from BuildConfig.groovy file:
plugins{
...
compile ":webflow:2.0.0"
}
And happy webflow coding. By the way, if you want understand more deeply grails webflow I recomend you to read http://livesnippets.cloudfoundry.com/docs/
Related
I am trying to upgrade a project to grails version 2.4.4 but it keep failing with the following error message:
:: problems summary ::
:::: WARNINGS
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: cglib#cglib;2.2.2: configuration not found in cglib#cglib;2.2.2: 'compile'. It was required from org.grails#grails-plugin-testing;2.4.4 runtime
::::::::::::::::::::::::::::::::::::::::::::::
Error |
Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- cglib:cglib:2.2.2
(Use --stacktrace to see the full trace)
Error |
Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- cglib:cglib:2.2.2
|Run 'grails dependency-report' for further information.
This s kind of weird since the library is available. I can see it under grails-2.4.4\lib\cglib\cglib\jars and in my home directory under .grails\ivy-cache\cglib\cglib\jars
My GRAILS_HOME is set correctly and for what I can see all looks fine but when I do a refresh dependencies it keeps throwing this error.
In upgrading from Grails 2.1 to 2.4.4 I found I had that same issue. The resolution was to explicitly set:
grails.project.dependency.resolver = "maven"
in BuildConfig.groovy. Then I was able to move on to the next issue in the upgrade ... ;-)
When I try to debug my code it shows the below error in GGTS, how can I resolve it?
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#code-coverage;1.1.7: not found
:: org.grails.plugins#tomcat;1.3.1: not found
:: org.grails.plugins#hibernate;1.3.1: not found
::::::::::::::::::::::::::::::::::::::::::::::
| Error Failed to resolve dependencies
(Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:code-coverage:1.1.7
- org.grails.plugins:tomcat:1.3.1
- org.grails.plugins:hibernate:1.3.1
Did you just upgrade your grails version?
Grails changed a bit how it handles tomcat and hibernate versions.
In your BuildConfig.groovy, replace your tomcat line by build ":tomcat:7.0.47"; and your hibernate line by runtime ":hibernate:3.6.10.6" // or ":hibernate4:4.1.11.6"
When I need searchable 0.6.5 plugin for grails 2.2.3, I modifed BuildConfigh.groovy as following:
dependencies {
compile ":searchable:0.6.5"
}
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.8.3"
runtime ":resources:1.2"
test(":spock:0.7") {
exclude "spock-grails-support"}
// Uncomment these (or add new ones) to enable additional resources capabilities
//runtime ":zipped-resources:1.0"
//runtime ":cached-resources:1.0"
//runtime ":yui-minify-resources:0.1.5"
build ":tomcat:$grailsVersion"
runtime ":database-migration:1.3.2"
compile ':cache:1.0.1'
compile ":searchable:0.6.5"
}
After saving the file, I refresh dependency in order to install the plugin, but I got the message below:
Loading Grails 2.2.3
| Configuring classpath
| Downloading: searchable-0.6.5.pom.sha1
:: problems summary ::
:::: ERRORS
grailsCentral: bad organisation found in http://grails.org/plugins/grails-searchable/tags/RELEASE_0_6_5/searchable-0.6.5.pom: expected='' found='org.grails.plugins'
| Downloading: searchable-0.6.5.pom.sha1
:: problems summary ::
:::: ERRORS
grailsCentral: bad organisation found in http://grails.org/plugins/grails-searchable/tags/RELEASE_0_6_5/searchable-0.6.5.pom: expected='' found='org.grails.plugins'
| Downloading: searchable-0.6.5.pom.sha1
:: problems summary ::
:::: ERRORS
grailsCentral: bad organisation found in http://grails.org/plugins/grails-searchable/tags/RELEASE_0_6_5/searchable-0.6.5.pom: expected='' found='org.grails.plugins'
| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- :searchable:0.6.5
Process was killed
I thought it could be my internet problem, but I checked the internet connection is OK. Did you encounter problem like this? Could anyone help me solve install searchable 0.6.5 problem? Many thanks.
You can't use version 0.6.5 with 2.2.3 - see the notes at the plugin page: http://grails.org/plugin/searchable
Use version 0.6.4. The only difference is a trivial fix to get the plugin working in 2.3.
I have a app developed in grails 1.3.x and I upgraded to 2.0.4, There was an dependency error in the spring security plugin, so i did grails install-plugin spring-security-core, It installed 1.2.7.3 version. Then I ran the grails application, I got the below error.
Compilation error: startup failed:
Compile error during compilation with javac.
C:\Users\Vinay.hs\.grails\2.0.4\projects\steer\plugins\spring-security-core-1.2.7.3\src\java\org\codehaus\groovy\grails\plugins\springs
ecurity\AjaxAwareAuthenticationFailureHandler.java:48: cannot find symbol
symbol : method saveException(javax.servlet.http.HttpServletRequest,org.springframework.security.core.AuthenticationException)
location: class org.codehaus.groovy.grails.plugins.springsecurity.AjaxAwareAuthenticationFailureHandler
saveException(request, exception);
^
Then I added compile ':spring-security-core:1.2.7.3'. I got a different error as below
:::: WARNINGS
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: #spring-security-core;1.2.7.3: java.text.ParseException: inconsistent module descriptor file found in 'http://plugin
s.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spring-security-core-1.2.7.3.pom': bad organisation: expected='' found='o
rg.grails.plugins';
::::::::::::::::::::::::::::::::::::::::::::::
:::: ERRORS
grailsCentral: bad organisation found in http://plugins.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spr
ing-security-core-1.2.7.3.pom: expected='' found='org.grails.plugins'
I referred this jira issue, According to that we have to change the dependency to runtime, but it it was giving me the below error
inconsistent module descriptor file found in 'http://plugins.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spring-security-core-1.2.7.3.pom': bad organisation: expected='' found='org.grails.plugins';
So, How to resolve this issue.
Looks like you put the dependency in the BuildConfig.groovy dependencies section but it should be in the plugins section:
plugins {
runtime ":hibernate:$grailsVersion"
build ":tomcat:$grailsVersion"
...
compile ':spring-security-core:1.2.7.3'
}
I'm trying to use the grails-gradle plugin with grails version 2.0. Here is my build script:
buildscript {
repositories {
mavenRepo url: "http://repo.grails.org/grails/core/"
}
dependencies {
classpath "org.grails:grails-gradle-plugin:1.1.1-SNAPSHOT",
"org.grails:grails-bootstrap:2.0.0"
}
grailsVersion="2.0.0"
}
apply plugin: "grails"
repositories {
mavenCentral()
mavenRepo url: "http://repo.grails.org/grails/core/"
}
dependencies {
compile "org.grails:grails:2.0.0",
"org.grails:grails-core:2.0.0",
"org.grails:grails-crud:2.0.0",
"org.grails:grails-datastore-core:1.0.2.RELEASE",
"org.grails:grails-datastore-gorm:1.0.2.RELEASE",
"org.grails:grails-hibernate:2.0.0",
"org.grails:grails-logging:2.0.0"
}
The dependencies at the bottom of the script are different than the original "1.3.4" located here. When I use this script to create a grails project with gradle grails-init it works correctly, creating the project. When I try to use gradle grails-run-app I receive the following errors:
~>gradle grails-run-app
:grails-run-app
| Configuring classpath
| Error log4j:WARN No appenders could be found for logger (org.springframework.core.io.support.PathMatchingResourcePatternResolver).
| Error log4j:WARN Please initialize the log4j system properly.
| Error log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
| Compiling 38 source files
| Compiling 8 source files.....
| Error Error: The following plugins failed to load due to missing dependencies: [hibernate]
- Plugin: hibernate
- Dependencies:
! dataSource (Required: 2.0 > *, Found: Not Installed) [INVALID]
- i18n (Required: 2.0 > *, Found: 2.0.0)
- core (Required: 2.0 > *, Found: 2.0.0)
- domainClass (Required: 2.0 > *, Found: 2.0.0)
I'm assuming that this means I'm missing a dependency, but I have no idea what dependency. It looks like hibernate is the culprit, but I have included the grails hibernate jar above. The list of jars between the two versions of grails are different, so I'm not sure which should be included (or maybe there isn't one and this will not work). The list of dependencies can be see here.
Any help resolving these errors would be much appreciated.
Using:
gradle 1.0, milestone-7 & grails 2.0.0
NOTE: the dependency "org.grails:grails-gradle-plugin:1.1.1-SNAPSHOT" is a local copy of the tip revision from github.
Thanks a lot. This is a very helpful thread, to answer your question, you need to add "org.grails:grails-plugin-datasource:2.0.1" on compile, it solved the problem on my machine.
Looks like you're missing a few dependencies... Check Gradle / Grails application for a complete example of how to do this.
Hope this helps!