Build failure while downloading Archiva Jars with maven - maven

I would like to download Archiva Rest API jars with maven 3 so I can make some Rest API and I always have a build failure. Here is my POM :
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva</artifactId>
<version>1.4-M3</version>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-rest-api</artifactId>
<version>1.4-M3</version>
</dependency>
I always have this error :
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Remote Deployment 1.0
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/kohsuke/access-modifier-checker/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/kohsuke/access-modifier-checker/maven-metadata.xml (335 B at 1.6 KB/
sec)
Downloading: http://repo.maven.apache.org/maven2/org/kohsuke/stapler/stapler/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/kohsuke/stapler/stapler/maven-metadata.xml (333 B at 5.1 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/archiva/archiva/1.4-M3/archiva-1.4-M3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.820s
[INFO] Finished at: Wed Nov 07 15:38:03 CET 2012
[INFO] Final Memory: 25M/310M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project remote-deployment-new: Could not resolve dependencies for project com.ebiznext
.plugins:remote-deployment-new:hpi:1.0: Could not find artifact org.apache.archiva:archiva:jar:1.4-M3 in central (http:/
/repo.maven.apache.org/maven2) -> [Help 1]
....
How can I resolve that ?
[EDIT] In fact, I am working on a Jenkins plugin where I want this plugin to download some jars in Archiva. For that, I will do some Rest services. This is why I need these dependencies. To make Rest call, on a archiva instances, we must add the archiva-rest-api dependency and a lot more. The thing is it does not download them (archiva-rest-api, jackson, apache cxf). Here is my POM :
<dependencies>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle-jaxrs</artifactId>
<version>2.6.3</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-rest-api</artifactId>
<version>1.4-M4</version>
</dependency> -->
</dependencies>
<!-- get every artifact through repo.jenkins-ci.org, which proxies all the artifacts that we need -->
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>

Your error is including the first dependency - org.apache.archiva:archiva contains no JAR artifact and Maven is complaining when it can't find it (see the directory listing in Maven central).
Try removing this dependency and trying again.

Maybe have a look here some dependencies are detailed http://archiva.apache.org/docs/1.4-M3/adminguide/webservices/rest.html

Related

Maven - command line to update dependency by groupId

I would like to update dependencies just of the "groupA". How can I do this using command line?
<dependency>
<groupId>group-A</groupId>
<artifactId>artifact-1</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>group-A</groupId>
<artifactId>artifact-2</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>group-B</groupId>
<artifactId>artifact-1</artifactId>
<version>1.0.0</version>
</dependency>
The versions plugin has a goal "use-latest-versions" that seems to do what you need.
Assume you have something like:
<dependencies>
<dependency>
<groupId>group-B</groupId>
<artifactId>artifact-1</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.9</version>
</dependency>
</dependencies>
Then running: mvn versions:use-latest-versions -D"includes=org.apache.commons:*:*:*:*"
would update those two dependencies in that group:
[INFO] --- versions-maven-plugin:2.7:use-latest-versions (default-cli) # artifact-id ---
[INFO] Major version changes allowed
[INFO] Updated org.apache.commons:commons-lang3:jar:3.1 to version 3.9
[INFO] artifact org.apache.commons:commons-compress: checking for updates from central
[INFO] Updated org.apache.commons:commons-compress:jar:1.9 to version 1.18
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
Assuming you just want the latest version that can be found in a repository.
The versions plugin has some other things to offer as well. For dependency work the dependency plugin is also often handy.

Maven could not resolve dependencies spark

I try to build a simple java program: JavaWordCount for spark-1.1.0.
I get this error: Building JavaWordCount 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.279 s
[INFO] Finished at: 2014-10-23T11:28:30-04:00
[INFO] Final Memory: 9M/156M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project JavaWordCount: Could not resolve dependencies for project spark.examples:JavaWordCount:jar:1.0-SNAPSHOT: Failure to find org.apache.spark:spark-assembly_2.10:jar:1.1.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Here are my dependencies from pom.xml
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-assembly_2.10</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-examples_2.10</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.1.0</version>
</dependency>
It includes spark assembly.
Any ideas would be really appreciated.
Thank you!
The problem is that the dependency:
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-assembly_2.10</artifactId>
<version>1.1.0</version>
</dependency>
is not a jar its a pom file only which means you can't define it like this. You can see it in the error message:
Failure to find org.apache.spark:spark-assembly_2.10:jar:1.1.0
which shows that Maven will try to download a jar file. The means you have to define it like this:
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-assembly_2.10</artifactId>
<version>1.1.0</version>
<type>pom</type>
</dependency>
But i'm not sure if this will solve all problems. You should take a deep look into the documentation if this is the right path.
Update:
You can also use that as BOM via:
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-assembly_2.10</artifactId>
<version>1.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>

How to get snapshot from Sonatype

I'm trying to get the snapshot release for atmosphere that is available for org.atmosphere and can't seem to get it...
<repositories>
<!-- Added to get the Atmosphere 1.1.0-SNAPSHOT, can be removed when 1.1.0 is released -->
<repository>
<id>oss.sonatype.org-snapshot</id>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
There are no atmosphere versions that appear to be picked up by adding the new repository.
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>1.1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
I'm told by the primary atmosphere developer that this should work
Works fine for me. What error are you getting?
pom.xml
<?xml version="1.0"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>example</artifactId>
<version>1.0</version>
<repositories>
<!-- Added to get the Atmosphere 1.1.0-SNAPSHOT, can be removed when 1.1.0 is released -->
<repository>
<id>oss.sonatype.org-snapshot</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>1.1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
Update
$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building example 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) # example ---
[INFO] org.example:example:jar:1.0
[INFO] \- org.atmosphere:atmosphere-runtime:jar:1.1.0-SNAPSHOT:compile
[INFO] +- org.atmosphere:atmosphere-compat-jbossweb:jar:1.1.0-SNAPSHOT:compile
[INFO] +- org.atmosphere:atmosphere-compat-tomcat:jar:1.1.0-SNAPSHOT:compile
[INFO] +- org.atmosphere:atmosphere-compat-tomcat7:jar:1.1.0-SNAPSHOT:compile
[INFO] \- eu.infomas:annotation-detector:jar:3.0.1:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.044s
[INFO] Finished at: Mon Apr 29 21:46:45 IST 2013
[INFO] Final Memory: 9M/301M
[INFO] ------------------------------------------------------------------------
Remove content of $HOME/.m2/repository/org/atmosphere/cpr and try again :)

junit and hamcrest declaration

I am using junit at 4.10 and declared hamcrest-core at 1.3 and hamcrest-library at 1.3. My question is are hamcrest-library and hamcrest-core embedded in junit 4.10. what about junit 4.11?
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
If you browse to search.maven.org you can search for artifacts and see their dependencies. If you are using Eclipse wit the Maven plugin, you can also click Dependency Hierarchy in the POM editor.
Looking on the Maven website you can see that JUnit 4.11 depends on Hamcrest 1.3:
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
</dependencies>
Hamcrest library you have to add yourself.
JUnit 4.10 & JUnit 4.11 (as depicted below):
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
... ship with the hamcrest-core 1.1 and 1.3 respectively. You can see this for yourself by leveraging the dependency plugin's tree goal (running mvn dependency:tree):
$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building testng 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) # testng ---
[INFO] testng:testng:jar:1.0-SNAPSHOT
[INFO] \- junit:junit:jar:4.10:test
[INFO] \- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.483s
[INFO] Finished at: Fri Mar 29 12:07:22 MDT 2013
[INFO] Final Memory: 5M/81M
[INFO] ------------------------------------------------------------------------
As silly as this sounds, you need to include the appropriate hamcrest-library artefact to take advantage of the Hamcrest Matchers. Hopefully this helps...

How to figure out the jars that the dependencies in the maven's pom.xml depend on?

I am very interested in how I can find out what are the jars that the dependences in the maven's pom.xml depend on.
I am used to doing the adding of libraries (jars) myself in my web application project. I came across this need when I was trying to configure the spring 3.0 samples. I really dislike that everything has to go through maven with spring 3.0.x. At this point it seems that I cannot dig deeper in the maven's dependency maze and learning it looks like a must. But I would really appreciate if someone can tell me a way I can find out this info.
For example, for the following pom.xml, I would like to know what the dependency with artifactId spring-context depends on. (I can see that it depends on commons-logging, since the creator of the sample excludes it - wanted to use slf4j instead of commons-logging.). I would like to find out the rest of the dependences for the dependency with artifactId spring-context, and the same for the rest of the dependences! How can I do this?
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.samples</groupId>
<artifactId>mvc-ajax</artifactId>
<name>mvc-ajax</name>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<properties>
<org.springframework.version>3.0.5.RELEASE</org.springframework.version>
<org.slf4j.version>1.6.1</org.slf4j.version>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework.version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${org.slf4j.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${org.slf4j.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>runtime</scope>
</dependency>
<!-- JSR 303 with Hibernate Validator -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.1.0.Final</version>
</dependency>
<!-- Joda Time -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>1.6.2</version>
<scope>runtime</scope>
</dependency>
<!-- Jackson JSON Mapper -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.6.4</version>
</dependency>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${org.springframework.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<!-- For Hibernate Validator -->
<repository>
<id>org.jboss.repository.release</id>
<name>JBoss Maven Release Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
<snapshots><enabled>false</enabled></snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>install</id>
<phase>install</phase>
<goals>
<goal>sources</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Kind Regards,
Despot
EDIT (some follow up on the answer given by Sean):
1) Download maven (I downloaded version 2.2.1) and follow the installation instructions given there.
2) Than open command prompt and go to the directory of the pom.xml
3) Do the "mvn dependency:tree" command as advised. (I tried using -DoutputFile="somePath" or -Dinclude=spring-context -> it wasn't writing in the file presented in the path and it was selecting all the dependancies instead of spring-context - no matter the general command will suffice). Wait for a while for the system to download all needed info and in the end you will get something like this:
[INFO] [dependency:tree {execution: default-cli}]
[INFO] org.springframework.samples:mvc-ajax:war:1.0.0-SNAPSHOT
[INFO] +- org.springframework:spring-context:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.springframework:spring-beans:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-core:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-expression:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-context-support:jar:3.0.5.RELEASE:
compile
[INFO] | \- org.springframework:spring-web:jar:3.0.5.RELEASE:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.6.1:runtime
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.1:runtime
[INFO] +- log4j:log4j:jar:1.2.16:runtime
[INFO] +- javax.validation:validation-api:jar:1.0.0.GA:compile
[INFO] +- org.hibernate:hibernate-validator:jar:4.1.0.Final:compile
[INFO] +- joda-time:joda-time:jar:1.6.2:runtime
[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.6.4:compile
[INFO] | \- org.codehaus.jackson:jackson-core-asl:jar:1.6.4:compile
[INFO] +- javax.servlet:servlet-api:jar:2.5:provided
[INFO] +- javax.servlet.jsp:jsp-api:jar:2.1:provided
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- junit:junit:jar:4.7:test
[INFO] \- org.springframework:spring-test:jar:3.0.5.RELEASE:test
[INFO] ---------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ---------------------------------------------------------------
[INFO] Total time: 1 minute 8 seconds
[INFO] Finished at: Tue Jan 04 16:53:45 CET 2011
[INFO] Final Memory: 12M/25M
[INFO] ---------------------------------------------------------------
You can download the jars using Jarvana (just type jarvana + the name of the jar) or you can use the svn checkout command.
The hibernate-validator:jar:4.1.0.Final in Jarvana returns an error (there is no 4.1.0 Final version -> only 4.0.2 Final
Also org.codehaus.jackson-mapper-asl 1.6.4 could not be found - only 1.6.2 (same goes to the jackson-core-asl). I am presuming that the same would happen if you used maven to build your project.
After I included all the needed jars, I started the server in debug mode and this happened:
TIME org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\somePath\mvc-ajax3.0\WEB-INF\lib\jsp-api-2.1.jar) - jar not loaded.
See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/jsp/JspPage.class
TIME org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\somePath\mvc-ajax3.0\WEB-INF\lib\servlet-api-2.5.jar) - jar not loaded.
See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
This means (I think) that those jars are found twice. Deleting them done the job for me. Seams like the pom.xml is not valid for this sample.
It took too much time for me to download the jars manually and to "fight" all the project configuration, so I guess is best to learn some Maven if you are trying to start with Spring 3.0.
Execute mvn dependency:tree and it will list all the project's dependencies.
Reference:
dependency:tree mojo
Resolving conflicts using the Dependency Tree
Filtering the Dependency Tree
You didn't mention what IDE you are using. If you are using Eclipse then install the M2Eclipse plugin for Maven. Once installed it has an excellent Maven pom.xml editor that can show you many things...including an interactive, recursive, dependency tree.
You can see some videos on this feature here:
http://m2eclipse.sonatype.org/overview-of-the-m2eclipse-pom-editor.html

Resources