Nov 25th, 2009, 02:54 AM
Add maven "system" type dependencies
I'm developing a addon for Roo. Is there any way to add a maven "system" type dependency to the resulting project pom ?
In the Roo source code, the Dependency class has a "type" field indeed but for a maven system dependency the "systemPath" attribute is also needed. The MavenProjectMetadataProvider class also contains no hint of whether one could add/update a "system" type dependency.
Nov 25th, 2009, 04:40 PM
As you noticed the current abstraction over the maven pom file does not allow you to define system properties. This is mostly due to the fact that we have not seen the need for it. Now, you have two options here:
1. You open a feature improvement request for it in our Jira, and ideally attach a patch for the functionality you need.
2. If you need to do get it done faster you can always parse the pom.xml file yourself and manage it manually that way.
Obviously, option 2 is a little more involved on your side as you need to deal with XML parsing in Java but my guess is that you are doing that already somewhere in your addon . There are lots of examples in the different Roo addons on how we handle XML.
Nov 25th, 2009, 05:31 PM
Would you mind sharing which dependency/dependencies require a "system" type? There might be another way to tackle it that we could suggest.
Nov 25th, 2009, 06:08 PM
Sure, I need system type dependencies to be able to use GWT in a generated project. The current maven GWT plugin from mojo that I am using only supports GWT 1.6.4, but even if it would suport 1.7.1 there is pretty current practice amongst GWT devs to download the needed distro, unzip it and use it locally. Not everyone loves Maven :-D
And btw, Ben, after you sent me the direct message on Twitter I fired you 2 emails explaining what I am doing (basically I am writing a GWT addon) but they may have arrived into your trash / spam box. Should I resend ? :-)
Thanks a lot guys
Nov 27th, 2009, 06:48 PM
For the benefits of others following this thread, Dorel and I have taken this to direct email re a GWT add-on story around Roo.