Java EE 6 Development using the Maven Embedded GlassFish Plugin

Today we’re going to take a look at the Maven Embedded GlassFish Plugin and how it allows us quick creation of GlassFish server instances in no time and Java EE 6 application deployment. Figure 1. GlassFish + Maven With a few lines of configuration in your Maven’s pom.xml we’ve got a running GlassFish instance and are able to redeploy our application fast by pressing enter in our console. In the following tutorial we’re going to build a Java EE 6 Web Application with a stateless session bean and a web servlet and finally deploy – and redeploy the application using the Maven GlassFish Plugin. ...

September 20, 2011 · 5 min · 978 words · Micha Kops

Dependency management in Grails 1.2

Sometimes I get the impression that there are many Maven haters in the Groovy/Grails community – now with version 1.2 of the Grails framework they are able to abandon the evil satanic Grails Maven Plugin and embrace the neverending joys of a slim, nice, sexy dependency resolution dsl .. here we go .. lets define some dependencies wheee … Our dependency configuration is defined in grails-app/config/BuildConfig.groovy as a property named grails.project.dependency.resolution: grails.project.dependency.resolution = { // here will be some dependencies } ...

May 23, 2010 · 2 min · 336 words · Micha Kops

A look at Maven 3 alpha

We are all waiting for a stable release of Maven3 with following updates .. faster, more performant .. save us time building our software and some precious memory ;) improved artifact resolution api and plugin api better osgi integration a few bugfixes no mixing of application dependencies and tooling dependencies though it does not matter that much to me: polyglot features .. e.g.: “Writing your pom files in Groovy” version-less parent elements for multi-module or multi-pom projects, no need to define the parent version in every submodule better artifact resolution, which dependency or pom supplied which artifact to the outcome .. got that information from: “Splitter from the world of Java” ...

May 22, 2010 · 2 min · 219 words · Micha Kops

How to add a local lib directory to Maven

Sometimes there is a dependency not available at a remote repository and one is too lazy to set up a local maven repository – that’s when one adds a directory in the project structure and wants maven to find dependencies there. Create a directory called “lib” in the project root Add the following markup to the pom.xml inside the <repositories>-Tag (create if it does not exist): <repository> <id>lib</id> <name>lib</name> <releases> <enabled>true</enabled> <checksumPolicy>ignore</checksumPolicy> </releases> <snapshots> <enabled>false</enabled> </snapshots> <url>file://${project.basedir}/lib</url> </repository> ...

March 18, 2010 · 1 min · 206 words · Micha Kops

Kubernetes Snippets

Rerun existing completed Job kubectl replace deletes the old job, if there is any error, your job definition is lost, don’t forget to save it first! Replace an existing Job with itself kubectl get job JOBNAME -o yaml | kubectl replace --force -f - Sometimes there are errors importing the job template due to auto-generated labels or selectors .. a quick and dirty hack is to filter them out using jq ...

March 1, 2010 · 10 min · 1924 words · Micha Kops