I recently acquired a copy of Instant Vert.x
(Kindle version here) by Simone Scarduzio. It’s a short book (54 pages), so here’s my
short-ish review. :)
Your first question might be, "What is Vert.x"? From its web site,
Vert.x is a lightweight, high performance application platform for the JVM that’s designed for modern mobile, web, and enterprise applications.
http://vertx.io/
While that description says it.....
Several weeks ago, I posted blurb about a JavaFX project I had cobbled together, DoctorFX.
It is an effort to build a semi-graphical editor for Asciidoc, but it is, currently,
very basic. I had some spare time last week, so I decided to add some features to it. As I thought about what needed to
be added and what that would require, I thought that, perhaps, an architectural change was warranted. With some time.....
Java Champion and JUG leader Antonio Goncalves recently released his third book on Java EE, Beginning Java EE 7. Just from the title and the table of contents, it’s clear that Antonio set a very ambitious goal for this book, and I think he delivered what he promised.
Java EE is, of course, a large, diverse set of technologies, so the book itself, to do the platform justice, must also be pretty wide.....
In a recent post, I showed how to attach a debugger to tests run from the command line via Gradle. While it worked, it turns out that it’s a bit over kill. Try this instead:
$ gradle -Dtest.debug test
:compileJava
:processResources UP-TO-DATE
:classes
:compileTestJava
:processTestResources
:testClasses
:test
Listening for transport dt_socket at address: 5005
Attach your debugger to port 5005, and off you go. No need to modify your build. Kudos.....
Using Maven, to run a single test (class), you would issue mvn -Dtest=MyTest. Gradle has similar functionality (gradle -Dtest.single=MyTest), though it seems to be much more powerful. You can get all the details here...
I’ve recently been migrating all of my personal projects to Gradle. Since I use Arquillian, that means migrating that part of the build as well. However, being still fairly new to Gradle, how to handle that integration wasn’t immediately obvious. Thanks to Benjamin Muschko and Aslak Knutsen, I’ve finally gotten a working setup.
While there is a Gradle plugin, as I understand things, it only supports the container lifecycle.....
Maven offers a nice script to allow for attaching a debugger to your build, mvnDebug. Gradle does not. Again, though, Gradle makes it pretty easy to add this to your build.
Let’s say you want to debug your tests:
build.gradle
test {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-Xdebug',
'-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009'
}
}
From the command line, issue gradle -DDEBUG=true test:
$ gradle -DDEBUG=true test
:compileJava.....
I’m not a real big fan of using standard out as a debugging strategy (I prefer an IDE and break points, for what it’s worth), but there are times when it’s either necessary or just convenient. The standard Gradle configuration, though, makes this a bit more difficult than it probably should be. Fortunately, Gradle also makes it easy to change:
build.gradle
test {
testLogging.showStandardStreams = true
}
If you’.....
Sometimes, such as when building command line Java apps, it would be nice to bundle all of the app’s dependencies in a single jar so that the user need not collect and manage these. With Gradle, that can be easily accomplished with the following lines:
build.gradle
jar {
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
configurations.runtime.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
When you run gradle assemble, you should find.....
At the Lee House, we have an email problem: there’s just too much of it. Over the years of signing up for contests, coupons, and other things, we seem to have amassed a giant number of subscriptions to various lists, which gives us a lot of (usually) junk email. The simple solution, of course, is just to unsubscribe, but some of those are actually occasionally useful. Throw in a pinch of proscratination and.....