New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation error with Grails 2.2.x #46
Comments
Which version of the plugin are you using? Can I see |
same problem here, thanks for your solution @BGordts @alvarosanchez, here is my BuildConfig, I am using Grails 2.2.5 repositories {
inherits true // Whether to inherit repository definitions from plugins
grailsPlugins()
grailsHome()
grailsCentral()
mavenLocal()
mavenCentral()
mavenRepo "http://repo.spring.io/milestone/"
mavenRepo "https://oss.sonatype.org/content/repositories/snapshots"
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
runtime 'mysql:mysql-connector-java:5.1.22'
}
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":database-migration:1.3.8"
runtime ":jquery:1.8.3"
runtime ":resources:1.2.6"
compile ':lesscss-resources:1.3.0.3'
compile ':cache:1.1.1'
compile ':kickstart-with-bootstrap:0.8.9'
// 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"
compile ":spring-security-core:2.0-RC2"
compile ":spring-security-rest:1.3.1", {
excludes: 'spring-security-core'
}
build ":tomcat:$grailsVersion"
compile ":gson:1.1.4"
}
} |
I added pac4j-core as a dependency as below and this error goes way. It doesn't look like this was being pulled from the repo.
|
Sorry @alvarosanchez for not replying, didn't notice the comments that were posted here... |
I suspect this is something happening in Grails 2.2 but not in 2.3. Will take a look at it. |
Same with grails 2.3.6 and plugin version 1.3.3: I guess the right pac4j version to use is 1.5.0, right? For others that run into the same trouble: make sure you add the dependency in the "dependencies { }" clause, not in the "plugins { ... }" section |
From version |
Hello Álvaro, I just recently completed an upgrade to Grails Spring Security plugin version 2.0, and then added your REST API plugin. Unfortunately, I'm running into the same error discussed at the beginning of this issue: Fatal error during compilation org.apache.tools.ant.BuildException: java.lang.NoClassDefFoundError: org/pac4j/core/client/BaseClient I have tried with and without the pac4 dependency explicitly defined, and I also tried to exclude "spring-security-core" from the compile ":spring-security-rest:1.3.4" plugin statement. I have not added any other repositories except for "repo.spring.io/milestone/". In addition, I've removed my org.grails.plugins folder under .grails and .m2. I'm running Grails 2.3.4. This is the relevant part of my BuildConfig plugin closure:
I assume it must be something simple I'm overlooking, but I can't seem to figure it out. Any ideas? By the way, the plugin looks fantastic, and fills a need I have perfectly. Thanks. EDIT -- I added the sonatype maven repo and explicitly added the pac4j-core:1.5.0 dependency and everything seems to be in order now. |
@jtduffy I didn't see you already did what I commented. Glad it worked out but as @alvarosanchez mentioned, explicit dependency is not required post |
1.4.0.M1 should fix this issue. Can you please try? |
Can't compile this plugin. First had the other pac4j problem (#14), but now I get this error:
| Compiling 212 source files.
| Error Fatal error during compilation org.apache.tools.ant.BuildException: java
.lang.NoClassDefFoundError: org/pac4j/core/client/BaseClient (Use --stacktrace t
o see the full trace)
Using grails 2.2.3. Tried cleaning .grails folder. Started with empty project.
Adding compile 'org.pac4j:pac4j-core:1.5.0-SNAPSHOT' in the buildconfig dependency block resolves the problem.
The text was updated successfully, but these errors were encountered: