Wednesday, October 20, 2010

News flash from SpringOne2GX

0 comments
This is very interesting development. https://greenhouse.springsource.org/ (get source at http://git.springsource.org/greenhouse)

A way to use Spring when building social/mobile apps. Including OAuth, integration with Twitter/LinkedIn/etc.
There is SpringMobile and SpringSocial projects.
Very very interesting. Including Grails/Spring Data support for NoSql datastores - very inventing of them to
revitalize Spring Framework in post JEE world.

Tuesday, March 2, 2010

Compiling Hibernate 3.5.x

0 comments
Few days ago I wanted to build Hibernate new 3.5.x trunk to see the documentation and basically eyeball differences from prior versions. I found this page (http://www.hibernate.org/422.html) and followed the set-up steps. This is where the pain started.

First off, build failed with an maven enforcer plugin error. I am running on jdk 1.6, specifically "1.6.0_17". Enforcer has a configuration that stops build when building with 1.6 jdk i.e. [1.5,1.6) - require at least 1.5 exclusive of 1.6.
Ended up changing that to [1.5,1.7)

Secondly, I am working on a Mac and hibernate builds documentation with po2xml that is not available on mac out of the box. Need to use ports (fink, macports, etc). I had an Ubuntu VM - so instead of messing around with ports I just moved to vm.

Thirdly, build was doing some very strange things - i.e. jar artifacts were not getting published to local .m2/repository. For some reason they were renamed to $artifact.jdocbook-style. This was totally bewildering result. I spent a bit of time trying to look at the debug log from Maven - but that provided no immediate results. A hint came from :

<requireMavenVersion>
<version>(2.0.7,)</version>
</requireMavenVersion>


I was using Maven 2.2.1. So I thought - would it help to downgrade to 2.0.11 and see if that helps? Well - yes it did help.
After repointing M2_HOME to location of 2.0.11 - build worked fine.

The moral of the story - to build hibernate you MUST use Maven 2.0.11 until something funky is fixed in maven jdocbook plugin.

Saturday, February 6, 2010

Common local repository location for spring-build ivy artifacts

0 comments
SpringFramework in version 3 came out with a common ant + ivy build system across most of the projects.
One thing that was driving me insane is that this build would pull artifacts into a project specific repository directory during ivy resolution vs. a common directory (like maven). As I was playing with the different projects and different versions of those projects disk usage was going through the roof.

The only way that I found to have a common location is to provide a -D flag to ant:

export ANT_OPTS="-Divy.cache.dir=$HOME/.spring-build-ivy-cache"


Single location, minimize disk usage. But there is always a but in there somewhere. dm-server code base for one makes some assumptions about where that repository is located, i.e. "../ivy-cache/repository/[artifact]". I ended up creating a symbolik link for those situations. Not the best solutions but freed about 1G of space on my machine.

Friday, January 22, 2010

WebFlow on dmServer

0 comments
It should be easy to use webflow on dmServer right? Well, not if you depend on maven to copy dependencies.
Just ran into few issues and wanted to share:

1. Bundle-Import both org.springframework.webflow and org.springframework.binding (too many packages to import individually)
WebFlow xml config will try to add a ConversionService from binding to your app context and if you don't have binding packages imported - BOOM...
2. Don't forget el libraries
WebFlow libd (library) has an optional dependency on org.jboss.el:com.springsource.org.jboss.el:2.0.0.GA and does not even lists ognl. org.springframework.binding imports javax.el, org.jboss.el and ognl as optional so resolution does not fail until you try to create an app context and webflow can't find any el parser to use and throws up.

That is it for now.