On Maven Model Transforms and C#

November 7, 2008 By shane 0

Maven 3.0 does all project model processing on a canonical data format, consisting of nearly 500 property values. Using a canonical data format makes it easy to do bidirectional transforms between the Maven pom and other model types.

To transform from an XML format to the property format, you can take any stream containing data in XML and pass it the static method ModelMarshaller.marshallXmlToModelProperties. In the case of the Visual Studio’s C# project file, it would look something like: (more…)

Categories: Maven Tags: ,

Book Update to Version 0.19

Once again, this is a small update to the book, but I want to err on the side of transparency.  I’m announcing every version update even if it is small.  I just cut a 0.19 version release, this captures some small changes to the book content driven by the reports from our users on GetSatisfaction.  This update contains a number of changes triggered by Paco Soberón and “Fred”.  Here is a list of updates for the 0.19 release:

(more…)

Categories: Book Tags:

Building Eclipse Plugins with Maven: Tycho

Yesterday’s post was in response to a question from Anders Nawroth of the Neo4J effort, and today’s post is no different.  On Tuesday (or maybe it was Monday), Anders asked the neo4j-users list whether it made sense to build the neo4j eclipse plugin with Maven.

I have looked into building Neoclipse using Maven, but at the moment I’m not convinced there are more advantages then disadvantages in this case.  Building Eclipse plugins and products has quite many quirks. With increasing use of product configuration options, the number of build quirks increases as well. There seems to be no really automated build system for Eclipse plugins/products, even when using maven you have to install and update the dependencies manually (the Eclipse artifacts are not deployed to a maven repository).

Sonatype is busily working to address these gaps, and we already have some solutions you can use to start building your Eclipse plugins in Maven.   Igor Fedorenko has been working on Tycho and Maven to create a system to facilitate OSGi and Eclipse development in Maven, and m2eclipse is currently built using Tycho.   To prove that Tycho is a viable path for build the Neoclipse plugin, I took some time yesterday to generate Maven pom.xml files with Tycho and build an update site for Neoclipse. (more…)

Categories: How-To Tags: , , , , ,

Maven 3.0 Project Model and Mixins

By shane Comments Off

The Apache Maven project model consists of a fairly rich model structure, consisting of 465 possible elements, specifying everything from the plugins Maven uses to build the project to the dependencies it needs for compiling. How Maven processes the model prior to a build can be a little confusing, dealing with the inheritance of parent poms (or the super pom), the applying of profiles, the merging in of dependency management information, to name just a few of the operations.

Back in May, Jason started talking to me about adding in mixin support for the pom, and it became clear that we needed to reconsider the Maven 2.0 design of project builder so that we could support such features. Maven 2.0 took the approach of merging trees of information (XML nodes), a perfectly reasonable approach for single inheritance. For things like mixins and multiple pom inheritance, linearizing the information proves a much simpler approach.  In this post I discuss the ramifications of linearizing POM information to support multiple inheritance for POMs.

(more…)

Categories: Maven Tags: ,