Monday, July 11, 2011

Metawidget 1.20 to 1.25 Migration Guide

The next release of Metawidget (v1.25) contains some breaking changes. We apologise for the disruption and provide this Migration Guide to help in moving from v1.20 to v1.25. All of the existing documentation and examples have already been migrated, as a reference point.

Refactor dependencies for JSF, JSP, Spring and Struts annotations

This change only affects those projects using fine-grained Maven dependencies such as:

<dependency>
   <groupId>org.metawidget.modules</groupId>
   <artifactId>metawidget-annotation</artifactId>
   <version>1.25</version>
</dependency>
<dependency>
   <groupId>org.metawidget.modules</groupId>
   <artifactId>metawidget-beanvalidation</artifactId>
   <version>1.25</version>
</dependency>

Projects using metawidget-all.jar are not affected.

We have refactored the annotation-based Inspectors from the metawidget-faces, metawidget-jsp, metawidget-spring and metawidget-struts modules into corresponding metawidget-facesannotation, metawidget-jspannotation, metawidget-springannotation and metawidget-strutsannotation modules respectively. You will need to update your pom.xml to add in these new dependencies.

This was done for two reasons:

  1. Most importantly, application environments where the Web tier is separated from the business tier may need the annotations to be deployed on the back-end and the UI widgets deployed on the front-end. Some frameworks and application servers have classpath issues if the two are not deployed separately.
  2. Build environments like m2eclipse do not properly support mixing JDK 1.4 and Java 5 targets in the same source tree, so separating them removes a hack we were using (Metawidget tries to target JDK 1.4 wherever possible).
Similarly, we have separated the Java 6-specific metawidget-grouplayout from the JDK 1.4-compatible metawidget-swing.

Again, we apologise for the disruption. Feedback welcome!

0 comments: