Maven and Spring missing library

http://stackoverflow.com/questions/1023456/maven-and-spring

The referenced jars aren’t available on the Maven2 central repository, so unless you have an additional repository declaration in your POM or an active profile in your settings, Maven will not know where to obtain the artifacts from.

There are a few public repositories like here and here hosting these artifacts. To use these repositories you could add the relevant repository declaration to your POM or settings. See here for an example configuration.

Alternatively if you don’t trust the repositories you could manually download the jars and put them into your local Maven repository, though you’d need to be careful to replicate the structure Maven expects, and you may well encounter the same problem for different jars.

Another alternative is to use a Maven repository manager like Nexus or Artifactory, to manage Maven’s interactions with external repositories, though that is almost certainly too much information if you’re just starting out.

For general help/information on Maven, check out the Maven book.

Maven Repository

Introduction

DailyDev.org Maven Repository is mapped to SVN Repository of one project hosted on Google Code.
It’s URL is http://maven.dailydev.org/repository/public 

Repository Configuration

To make DailyDev Maven Repository accessible from your Maven build you have to add it’s configuration into your project’s POM file  or into yoursettings.xml . Depending on the reason why you want to configure the repository you can add it as a component repository or as a plugin repository.

As component repository

If you want to depend on components deployed in the repository add following snippet of XML as of child repositories element of your POM orsettings.xml file.

<repository>
<id>dailydev-maven-repository</id>
<name>DailyDev.org Maven Repository</name>
<url>http://maven.dailydev.org/repository/public</url&gt;
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
As plugin repository

If you want to use plugins deployed in the repository add following snippets of XML as child of pluginRepositories element of your POM orsettings.xml file.

<pluginRepository>
<id>dailydev-maven-repository</id>
<name>DailyDev.org Maven Repository</name>
<url>http://maven.dailydev.org/repository/public</url&gt;
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</pluginRepository>

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment