Introduction

This is a temporary page about the maven2ization, in attempt to describe the impact on the springrich project if this would be accepted.

Get started

Before the discussion of the sensitive issues, please take a look at the development setup at the left and try a mvn install and mvn site .

Be ready to read up about maven2 if you want to understand how it works. http://maven.apache.org

Modules and the parent project

I've split spring-richclient up in several modules, following best practices of the spring framework, maven2, ...

Each module is a separate project, generates a single jar/war and has one pom.xml. The POM's hold the maven configuration.

Everything starts with the parent project's POM: /pom.xml . That defines the version of every depency, general properties, ... All others inherit directly or indirectly from it.

The parent project also contains the main site in /src/site .

Take a look at architecture.html how the modules are defined. Input on the defined modules is very welcome. Modules can be added (and removed) on demand relatively easily!

Spring rich modules

For now everything of springrich (except the sandbox and resources) resides in support. This way code can be easily moved to core, binding and form without having to fix dependency order.

All resources are currently in a module resources, to generate a separate jar, but I believe they should be part of the other modules in time... Others can not aggree on this, we should discuss it later.

Petclinic modules

Here I 'd had my fun :) I 've split it up, take a look at ../user/petclinicSample.html

The main motivation for this is one project generated only one jar . That's a very good practice, as it forces you to think out your dependencies, which avoids some class-path problems with end-users.

Directory structure

This is probably the most sensitive issue of all. I intentionally did not respect the old directory structure of

src
resources
test
sandbox

Sandbox has been moved to it's own module. Resources from /resources too, but only because they need to generate a separate jar. The resources from /src (mostly some xml files) have been relocated.

This is the new directory structure proposal. I can change it if required, though I'd rather not (read on).

src/main/java
src/main/resources
src/test/java
src/test/resources
src/site

Why?

  • It's the default directory structure for maven 2 projects. Maven is a project for projects, they have been thinking about this longer then us.
  • resources and java source should be separated: hello.java can be a resource (very rare) and package.html probably isn't a resource.
  • tests can also have resources

    Why not something like src/java and test/java? I believe maven 2 didn't do that due to integration testing sources, generated source directory, site sources, ...