WebJars and JSF

WebJars, for those that haven’t heard, is a project that takes popular client-side web libraries and packages them in JARs to make their use in Java-/JVM-based web apps simpler. The web site notes that you can easily see which libraries a project is using simply by looking at its dependencies, and that transitive dependencies automatically appear. It’s a pretty compelling project, but, for some reason, it doesn’.....

Read More ›

A Quick-start for Scala and Gradle

For those interested, here’s a quick and simple project to get you started using Gradle and Scala together: build.gradle apply plugin: 'scala' repositories{ mavenCentral() mavenLocal() } dependencies{ compile 'org.slf4j:slf4j-api:1.7.5' compile "org.scala-lang:scala-library:2.10.1" testCompile "junit:junit:4.11" } task run(type: JavaExec, dependsOn: classes) { main = 'Main' classpath sourceSets.main.runtimeClasspath classpath configurations.runtime } src/main/scala/Main.scala object Main extends App.....

Read More ›

Gradle, 'provided' scope, and Java EE 7

Maven has a dependency scope, provided, that indicates that the dependency should not be in the archive. Gradle does not provide such a scope out of the box, but it’s easy enough to add. The following Gradle build demonstrates a very bare-bones Java EE 7 web application setup: build.gradle apply plugin: 'war' repositories { mavenCentral() mavenLocal() } configurations { provided } sourceSets { main { compileClasspath += configurations.provided } } dependencies { provided 'javax:javaee-api:7.0' }...

Read More ›

A Simple OAuth2 Client and Server Example: Part II

In the last post, we took a look at the server side of our OAuth2 system. In this post, we’ll take a quick look at the unit tests that will act as TheUser. Let’s get right to the code: @RunAsClient public class AuthTest extends Arquillian { @ArquillianResource private URL url; private Client client = JerseyClientBuilder.newClient(); @Deployment public static WebArchive createDeployment() { WebArchive archive = ShrinkWrap.create(WebArchive.class) .addPackages(true, "com.steeplesoft.oauth2") .addAsWebInfResource.....

Read More ›

Setting Up Droidium for Android Testing

Many know Arquillian as a great integration, functional, acceptance testing platform. Until recently, I thought of it solely as a great Java EE tool, but an Arquillian extension, known as Droidium, allows you to use Arquillian to help drive your Android testing. I spent some time tonight trying to get it set up for Cub Tracker and thought I’d share what (little) I have so far. Rather than use Ant as the Android.....

Read More ›

A Simple OAuth2 Client and Server Example: Part I

When implementing web site security, OAuth2 almost always comes up. We’ve had requests to implement OAuth2 in the GlassFish REST interface, and, it turns out, I have a similar need on a personal project. Looking at the spec, though, OAuth2 can be pretty daunting. Fortunately, you don’t need to understand it all, and Apache has a project, Oltu (nee Amber) that handles most of the implementation. Before we get too excited.....

Read More ›

What's the Deal With Containerless Frameworks?

I’ve been spending some time with the Play Framework recently, and one of my first questions was, "Can I deploy this to an app server?", to which the answer is "No. Play is its own container". That (to be honest) somewhat disappointing answer reminded me of some discussions I recenlty saw but mostly ignored about "containerless frameworks". I’m afraid I’m going to have to let my dumb hang out.....

Read More ›

Backing Up Your Data with Duplicity

For those wanting to backup their data, there are a myriad of commercial products, ranging from economical to absurdly expensive, from basic to extremely flexible and robust. Depending on your needs, though, you need not spend any money at all to get a pretty poiwerful backup system. In this entry, I’ll show how I backup my workstation using duplicity. Installing duplicity should be as simple as telling yum or apt to install the.....

Read More ›

JavaFX and AsciiDoctor: a Quick and Dirty Hack

You may or may not have noticed ([1], [2]), but I’ve been spending a lot of time with AsciiDoc lately. While it might simply be a case of noticing what you’re thinking about, it seems the tool has been gaining more and more momentum. From AsciiDoctor to Awestruct, to Jason Porter’s Maven plugin, it seems to be everywhere. At any rate, in need of a break, I wondered if.....

Read More ›

Syncing Playlists with Android Devices

While I love my Android devices, one thing that has always bugged me is syncing music with them. Sure, there are some apps that claim to be able to do it, but I’ve never found one that will do what it says and be a decent music player at the same time (perhaps someone out there can point me to a good one). For the most part, then, I’ve settled on.....

Read More ›