GWT SuperDevMode with Maven

GWT had for some time now an alternative to ‘classic’ dev-mode which is called a super-dev-mode. It differs significantly to the classic one in the sense that is much closer to the ‘real’ java script debugging in the browser without native hooks to the IDE like classic dev-mode does. This has many advantages and a […]

Maven Dependencies gone wild

Transient dependencies can be a bit pain when they start creeping around. Sometimes it’s hard to debug these things even though we have some nice tools at hand like dependency:tree and even eclipse has nice tree traversing tools. But, sometimes we need bigger guns. This nice plugin for maven will do it’s best to break […]

Performance logging with aspects

Aspect weaving is very neat way of doing things without cluttering your code. Today I’m looking into easy ways to monitor/profile performance of parts of my code. To do this I would like to be able to easily do something like this: public void work() {     StopWatch time = new StopWatch();     […]

Determine and specify OS-specific targets in ANT scripts

When building cross-platform (different OS) sometimes we need to perform tasks that differ across OS families. This is rather simple to do with Ant-scripting. This is a skeleton structure for checking conditional-statements first and executing tasks. <target name="start">     <!– do some initial stuff here if any… –> </target> <!– Main task stuff here […]

Very simple web-server

I’m playing with some JavaScript frameworks and some new editors. Brackets (adobe) is open source one, built particularly for developing web stuff. It has built-in server for live preview and it works really good. This, assuming that some simple mostly fast static content preview is desired. As soon as you save your file it updated the […]

Ansi color codes

I don’t like to remember things so here comes a short list of Ansi color codes that can be used in your bash: # ANSI color codes RS="[33[0m]" # reset HC="[33[1m]" # hicolor UL="[33[4m]" # underline INV="[33[7m]" # inverse background and foreground FBLK="[33[30m]" # foreground black FRED="[33[31m]" # foreground red FGRN="[33[32m]" # foreground green FYEL="[33[33m]" […]

Alternative to Windows console

This is probably the most annoying thing with Windows – awful console (prompt). I do have Windows on one of my computers that I do developing stuff, and I just can not work with standard console. I used to like Cygwin, but there is something putting me off with it. I don’t like how it […]

Configure compiler errors for specific src folders

It has been very annoying not being able to configure exclusions for compiler warnings in eclipse. In many projects, there are auto-generated files that do not comply to any coding standards and our ‘Problems’ perspective is bloated with warnings that are not interesting at all. Worst is that developers stop looking at compile warnings as […]

How to simultaneously fetch multiple bags with hibernate

JPA specification allows up to two simultaneous eager fetches. But sometimes when we really need to this – we are stuck. One way to achieve this is to use hibernate extensions. We could do something like this: @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "keys") @Fetch(value = FetchMode.SUBSELECT)private List<T> keys; Second line instruct hibernate […]

How to make your own maven archetype

This topic is well described on maven homepage but if you are impatient or just need a quick start, here we go. There are a zillion different archetypes out there but somehow it more often than seldom that there is no particular type that suits exactly our needs. That’s where we simply create our own. It […]