Wojciech Owczarczyk
Wojciech Owczarczyk

Reputation: 5735

Create web application framework with Maven

we are trying to develop a web application framework and build implementatins on top of it. This framwork will be versioned in SVN, live its own life in parallel to those implementations. It will have lots of spring config files, security config and so on. We would like to use those in those implementations.

What structure should such an project have? Keep everything together? Link particular folers (implementations) in "svn: externals"? We would like to use Maven, and create an archetype for those implementations, but is it possible to update the archetype after it has been changed in implementation applications?

Regards,

Upvotes: 0

Views: 482

Answers (2)

cretzel
cretzel

Reputation: 20164

I'd suggest you create your framework project as a simple jar project to include in your implementation, which would be war projects. For the Spring config files you have three options then:

  1. Package them into your framework jar. This would make it hard for the implementations to customize it. I would not recommend it, unless your configuration is definitively fixed.

  2. Use svn: externals. I have not much experience with that, but I think dependencies between svn repositories would be hard to manage.

  3. Maintain these configuration files per implementation. So, an archetype would help to get started with an initial configuration. Then maintain these configuration files as your framework evolves. This is what we do most of the time. The good thing about Spring configuration is that it often rarely needs to be touched once you are confident with it.

Upvotes: 0

ant
ant

Reputation: 22948

This is a good example :

http://www.sonatype.com/books/mvnex-book/reference/web.html

Also this book is very useful resource when starting with maven

I found this also :

http://www.avajava.com/tutorials/lessons/how-do-i-create-a-web-application-project-using-maven.html

Upvotes: 2

Related Questions