Spring Security Acl with Mongodb data store is now released
Posted on 7:44 AM under acl gradle mongodb spring security 5 comments
I just released the first public version of Spring Security Acl with Mongodb as the data store at https://bitbucket.org/tinhtruong/spring-security-acl-mongodb. Inspired from Spring implementation based on JDBC, I leverage the power of the Spring Data Mongodb to implement the retrieve strategy for ACL stuff. The implementation is based on Spring Security 3.1.0.RELEASE (the latest version at this time).
It is released under Apache 2.0 license, so you can use it in your commercial projects.
I use Gradle as the build system. So if you want to build from the source, make sure you have an up-and-running Gradle 1.0. To create a jar:
gradle jar
Feedback are welcome!
In my previous post, I successfully managed to put all the output of Maven (and Eclipse) into RAM to reduce the disk write. In today post, I will do the same thing but with Gradle. Here is my build.gradle
apply plugin: "java"
apply plugin: "war"
apply plugin: "eclipse"
sourceCompatibility = 1.6
targetCompatibility = 1.6
group = "me.tinhtruong"
version = "1.0"
repositories {
mavenCentral()
}
dependencies {
compile "com.icegreen:greenmail:1.3.1b"
compile "jstl:jstl:1.2"
providedCompile "javax.servlet:servlet-api:2.5"
}
// Change the buildDir of the current project to /tmp/ (which is mounted on RAM using tmpfs)
buildDir = new File("/tmp/gradle/" + project.name);
// First, create a linked resource pointing to our Gradle buildDir, then hook into the .classpath file generation of Gradle to change the output of Eclipse to that linked resource.
eclipse {
project {
linkedResource name: 'build', type:'2', location: buildDir.absolutePath
}
classpath {
file {
whenMerged { classpath ->
classpath.entries.each { entry ->
if (entry.kind == 'output') {
entry.path = 'build/eclipse-output';
}
}
}
}
}
}
How to install Gradle templates plugin globally
Posted on 10:15 PM under gradle 2 comments
- Create a file called templates.gradle in the ~/.gradle/init.d/ folder (actually you can name it whatever you want as long as it has the extension .gradle)
- Edit that file and paste this little code snippet:
gradle.beforeProject { prj ->
prj.apply from: 'http://launchpad.net/gradle-templates/trunk/latest/+download/apply.groovy'
}
Now, you can create a project structure event without a build.gradle with the command:
gradle createJavaProjectHappy coding!