There are a lot of resources around for maven. Then why this blog item? Well actually because I want to capture what I do, if someone can use it along the way it would be nice. Therefore this blog item is here. This item describes the merging of my student sample application into a maven project.
Choose an archetype - These are a sort of project templates that come with maven and can be made company specific. In my case I want to create a web application, there is a mini guideline for webapplications
Create java folder under main and test folder under src
Copy sources into the java folder and resources into the resources folder
Run mvn compile, a lot of libraries are downloaded, and see the compile hopelessly fail. The failing compile is as expected since we need the dependencies during compilation.
Find and configure the dependencies. We list all dependencies; compile time, test time and runtime.
Install sun files - there is a problem with the license from sun. Therefore they cannot be added to the repository. You need to do this manually. There is a very short item about installing these jars on this page (www.jugpadova.it) In short : download the classes from the sun site and issue the following command
Now we have a war file that we can deploy, I did not test it yet. I do have some more issues to figure out. While creating the war file, all libraries are copied to web-inf/lib, also all dependencies. Therefore I now have spring.jar and all components jars like spring-core, spring-aop, etc as well. So double jars, to much memory, etc.
Lets move on and try to get the maven site up and running.
First try, just generate the site. This gives you the skeleton of the website, but almost no reports yet. You can have a look at your dependencies, nice.
I must add versioning and maybe some other parts as well, but for now it is enough. In the near future I want to do more with the libraries, I do not want double spring jars etc, and I want to keep foolowing the reports. These reports are not working correct at the moment en they must be improved.
Today I upgraded the acegi library to version 1.0.0 RC1. It was a quick process, but you do need to make a few changes. The complete package structure is changed, JdbcDaoImpl class has been moved and some other changes as well. Have a look at the release notes in the downloaded acegi package. There was a nice addentum on the spring forum that you need to change the inclusion of the taglibrary as well.