77369

Resolving transitive dependency

Question:

I have a simplified <strong>war</strong> project as below:

<ul><li>my war project depends on project B</li> <li>project B has direct runtime dependency on google.guava library</li> </ul>

Now I have problem with resolving the dependency on the guava library

<ol><li>when I do <em>mvn package</em>, the guava library <strong>is not</strong> included in the WEB-INF/lib directory</li> <li>when I do <em>mvn dependency:copy-dependencies</em>, the guava library <strong>is</strong> included in the dependency directory</li> <li>when I do <em>mvn dependency:tree</em> I can't see the guava library within the tree</li> </ol>

Does anyone know why the guava library is not packaged within the war file as expected? What is difference between copying dependencies and packaging them in war?. Any ideas?

Answer1:

The Maven 3 do the trick. I've used Maven 2.2 until now.

Recommend

  • pre-typedef'ing a variadic-function-pointer argument
  • Class 'Illuminate\\Foundation\\Application' not found Laravel
  • Visual Studio 2017 extension - VSToolsPath not working
  • Issue with TFS build definition and WCF service in a Web Site “Project”
  • how can i Restrict map to show only the selected country?
  • Why do I get a “SSL error: called a function you should not call” with Django
  • g++ undefined reference to library symbols [duplicate]
  • OpenLayers - add click event on ol.Overlay
  • Excel - Array formula as name range not working
  • Setting properties in triggered build
  • Java - How to separate a list based on a property of it's elements
  • Add basemap to SpatialPointDataFrames using R
  • sys.path including py.test rootdir to make tests import relative to project root
  • guava: Transform a list to a map with the index as the key
  • how to get the sub project path in sbt multi project build
  • How to/Should I unit test EventBus events with Mockito?
  • Retrieve a thumbnail of a video
  • Database Deployment - An error occurred during deployment plan generation. Deployment cannot continu
  • ERROR in Metadata version mismatch for module
  • error C2099: initializer is not a constant
  • maven compile fails because i have a non-maven jar
  • Install ActiveMq in Apache Karaf 4.0.0.M2
  • How to define log4j2 path by application.properties?
  • Maven use Encrypted passwords in POM
  • Guava how to copy all files from one directory to another
  • how to set variables in a php include file?
  • Function calls are not supported. Consider replacing the function or lambda with a reference to an e
  • Spring boot 2.0.0.M4 required a bean named 'entityManagerFactory' that could not be found
  • Read text file that is not in the main package in a runnable jar
  • Roxygen error “Skipping invalid path”
  • Eloquent paginate function in Slim 3 project using twig
  • Spark fat jar to run multiple versions on YARN
  • Does CUDA 5 support STL or THRUST inside the device code?
  • Join two tables and save into third-sql
  • How to model a transition system with SPIN
  • ORA-29908: missing primary invocation for ancillary operator
  • Why winpcap requires both .lib and .dll to run?
  • -fvisibility=hidden not passed by compiler for Debug builds
  • reshape alternating columns in less time and using less memory
  • Converting MP3 duration time