Atomic Expressive java library 0.9.2 release

 |  Author: nick

Atomic Leopard announce the release of the latest version of the Expressive java library – version 0.9.2

The Expressive library has been updated, focusing on enabling more expressive and succinct code.

The focus in this release has been offering out-of-the-box transformers which cover the majority of real world use cases. As well as a small reorganisation to minimise the library touchpoints users have to learn to levarage the majority of it.

In light of this, the ETransformers class has been introduced, which provides static factory methods for create ETransformers which can do the following:

  • Extracting javabean properies – ETransformer.toProperty()
  • Performing a Map lookup – ETransformers.usingLookup()
  • Creating a lookup map based on a javabean property – ETransformers.toKeyBeanLookup()
  • Creating a lookup map based on a javabean property where the key is not unique – ETransformers.toBeanLookup()
  • Transforming a collection using a specified transformer - ETransformers.transformAllUsing()

In addition, some changes have been made to the Expressive class itself to help reduce the number of unchecked generic warnings produced by 1.6 and 1.7 java compiles under fair usage. Several list() overloads have been renamed to flatten().

Atomic JQuery Logging plugin 0.9.4 release

 |  Author: nick

Atomic Leopard announce the release of the latest version of the jquery-atomic-logging.js javascript library – version 0.9.4.

There have been several long outstanding fixes due, primarily for IE8 and IE9. In addition, the logging framework dynamically detects changes to the logging available, in particular to support firebug lite being loaded in after page load.

You can acquire the source or minified versions from svn.

There are no changes to the API itself, once you’ve included the file you can start logging using the following:

$.debug("My debug message");
$.info("Some object: %o", $("#id"));
$.warn("Pay attention!");
$.error("Not good");

Each log level also has a variant available on a selected object:

$("#id").debug("Debugged");
$("#id").info("Informative");
$("#id").warn("Warning!");
$("#id").error("Errored");

This plugin depends on jQuery, 1.4.2 up.

Adding tools.jar to your maven pom

 |  Author: nick

Every now and then you need to add tools.jar to your classpath in your pom. Obtaining system dependencies in poms is a little annoying, because the artifacts are dependent on the environment, which means that the project becomes less portable.

Recently I had the need to add tools.jar for the first time in a mac environment, which is even more annoying because it doesn’t even exist.
The same set of files are stored in classes.jar on mac OSX. To resolve this, i have added the following profiles to my pom.

...
<profiles>
	<profile>
		<id>windows</id>
		<activation>
			<os><family>Windows</family></os>
		</activation>
		<properties>
			<toolsjar>${java.home}/../lib/tools.jar</toolsjar>
		</properties>
	</profile>
	<profile>
		<id>osx</id>
		<activation>
			<os><family>mac</family></os>
		</activation>
		<properties>
			<toolsjar>${java.home}/../Classes/classes.jar</toolsjar>
		</properties>
	</profile>
</profiles>
...

In short, for those of you not familiar with maven profiles – based on the condition in the activation element, a different profile is activated. In this case, the profile only sets the toolsjar property.