Tuesday, January 8, 2008

ITMill Toolkit 5 & Maven2

Using ITMill Toolkit 5 & Maven2 together is a matter of minutes.

You do not know or use Maven2 ? And you are developing a Java Web (or not) Project ? What a shame ! You should.
Maven2 allow you to manage your project dependencies, build, and reporting in an easy and cool way. I will not spend too much time detailing Maven2 use here, check http://maven.apache.org/ if you want to know more.

As ITMill Toolkit (gosh, I need an acronym for that ^^), from the developer point of view, is a totally classic web application, nothing special is required to unleash the power of Maven2 on it.

Before anything else, download ITMill jar file . The jar is inside all this stuff, as this is a demo application, in WEB-INF/lib .
Install it in your local Maven2 repository:
mvn install:install-file
-Dfile=
-DgroupId=itmill
-DartifactId=
itmill-toolkit
-Dversion=5.0.0
-Dpackaging=jar
-DgeneratePom=true
Then, create a Maven web project, using the archetype:
mvn archetype:create
-DarchetypeGroupId=org.apache.maven.archetype
-DarchetypeArtifactId=maven-archetype-webapp
-DarchetypeVersion=1.0-SNAPSHOT
-DgroupId=your.company
-DartifactId=project-name
-Dversion=1.0
-Dpackaging=war
Open the project in your favorite IDE (I'm a huge supporter of NetBean6, but I'm sure using Eclipse change nothing).
Edit you project pom.xml . Add the ITMill dependency:
<project>
..
<dependencies>
..
<dependency>
<groupid>itmill</groupid>
<artifactid>itmill-toolkit</artifactid>
<version>5.0.0</version>
</dependency>
</dependencies>
</project>
And there, everything is done.

Just set up a main ITMill class, update your web.xml to add a servlet & servlet mapping for it, and your Maven2 / ITMill project is fully operational.

No comments: