Showing posts with label Dependencies. Show all posts
Showing posts with label Dependencies. Show all posts

Sunday, 26 August 2012

Simple Spring Web MVC Application (using Maven)

Spring Web MVC Application Example
This example is nothing more than the implementation of the Green Beans: Getting Started with Spring MVC example.

It is available from Github in the Simple-Spring-Web-Application directory.

This example can be started with the maven tomcat:run goal.

Then open http://localhost:8282/baremvc/.

For the compare example: http://localhost:8282/baremvc/compare?input1=Pit&input2=pat.

Spring MVC Features Showcase

For a demonstration of the Spring 3+ MVC features, there is a complete project described here.

It can be started with tomcat:run too.


Friday, 27 July 2012

Maven: How to Refresh Dependencies in a Project?

There are situations where a simple mvn clean will not be enough to get rid of corrupted files or dependencies in a maven project. This can happen when a PC crashes during a compilation process or when the Internet connection is lost.

For example, one can encounter the following error message:
Build errors for XXX;
  org.apache.maven.lifecycle.LifecycleExecutionException:
Failed to execute goal on project YYY:
Could not resolve dependencies for project ZZZ:
The following artifacts could not be resolved: 
...
mvn clean will only clean the target (build) directory.

In order to force dependencies updates, one can use:
mvn clean install -U