Skip to content

Category Archives: Maven/Ivy

Generating XML Schema and Classes using JaxB and Maven pom

Xml Binding via JaxB is a standard way to work with Xml objects in Java 6 and beyond. While there are ant tools and cmd line utilities to automate this, externalizing the automation in a dedicated maven module, along with nice wrapper methods for a fluent api would be nice. Below are the steps to [...]

Maven settings.xml for corporate proxy with custom user-Agent

In some corporate enviroments, it’s just not enough to add a simple proxy setting in maven settings.xml. For instance, some prozy servers reject any HTTP request that’s coming from a non IE browser. Foruntately, Maven has a way to fake a user-agent and this might be a way to circumvent your corporate server settings Of [...]

Ivy file for a JEE6 / Seam 3-beta / Primefaces project

Most examples online use Maven for build files. I’m sure some of you are still on ant or Ivy. Here’s an ivy file for a starter JEE6 project with Seam-3-beta (at this time of writing), Primefaces, Prettyfaces and other misc jars (testng) that you might need. <?xml version="1.0" encoding="ISO-8859-1"?> <ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"> <configurations> <conf [...]

Upgrading to Hsqldb 2rc8, part 1, Maven Integration

At my current client engagement, we make full use of hsqldb both in our unit tests and for local development. It’s a great tool, and the changes made since the last release 4 long years ago will make it an even better tool. My project has hundreds of tests making use of hsqldb, and getting [...]

Maven Jetty Plugin

It’s a common occurrence in the Java consulting world, as ridiculous as it is, I see it all the time. I do into a new development shop to help build a large webapp. Since it’s a large webapp, someone has decided they needed to buy licenses for Web* app server. And since they’re using the [...]

SVN Log History By User to HTML

Most SVN users who use the command line client understand how to create a log in XML format: svn log –xml -v svn://some/url > svnlog.xml But this dumps the whole log, and I really just want to see a specific user. Plus, I hate XML and definitely do not want to read it. Here is [...]

Transitive dependencies in Maven 2 Pom with JBoss, Seam, Richfaces

If you use Maven for builing Hibernate/Spring or JBoss Seam based projects and you refer to an external Maven2 repository like JBoss, you will sure run into the most hated feature of Maven2 — Transitive Dependencies. Lets say you refer to Seam jars via an external pom, it not only gets Seam but also all [...]

Groovy Ant Script- First Blush

Most every Java developer these days has written an ant script. Some of us have had the great fortune of writing a lot of ant scripts. And as cool as it is, it gets extremely tedious writing XML. Enter Groovy‘s AntBuilder. I’ve been writing some groovy scripts lately and have wanted to take a look [...]