title: Understanding Maven Dependency tree output
body: <p>I am trying to compile a Spring application in which the <code>ApplicationConfig</code> file has <code>@EnableAspectJAutoProxy anotation</code> I am facing this error when trying to run the project:</p>
  
  <pre><code>Failed to instantiate [org.springframework.aop.aspectj.annotation.
   AnnotationAwareAspectJAutoProxyCreator]:
   Constructor threw exception; nested exception is    
   java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around
  </code></pre>
  
  <p>I have to say when I remove the above annotation the project is running successfully.</p>
  
  <p>Having read on Internet I thought maybe it's because of incompatible versions for of libraries and jar files.</p>
  
  <p>When I run <code>mvn dependency:tree</code> the output is as below:</p>
  
  <pre><code>[INFO]    task-segment: [dependency:tree]
  [INFO] ------------------------------------------------------------------------
  [INFO] [dependency:tree {execution: default-cli}]
  [INFO] groupId:myProject:jar:1.0-SNAPSHOT
  [INFO] +- junit:junit:jar:4.11:compile
  [INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:compile
  [INFO] +- org.springframework:spring-webmvc:jar:4.3.0.RELEASE:compile
  [INFO] |  +- org.springframework:spring-aop:jar:4.2.6.RELEASE:compile (version m
  anaged from 4.3.0.RELEASE)
  [INFO] |  |  \- aopalliance:aopalliance:jar:1.0:compile
  [INFO] |  +- org.springframework:spring-beans:jar:4.2.6.RELEASE:compile
  [INFO] |  +- org.springframework:spring-context:jar:4.2.6.RELEASE:compile (versi
  on managed from 4.3.0.RELEASE)
  [INFO] |  +- org.springframework:spring-core:jar:4.2.6.RELEASE:compile
  [INFO] |  +- org.springframework:spring-expression:jar:4.2.6.RELEASE:compile
  [INFO] |  \- org.springframework:spring-web:jar:4.2.6.RELEASE:compile (version m
  anaged from 4.3.0.RELEASE)
  [INFO] +- org.aspectj:aspectjweaver:jar:1.8.9:compile
  [INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
  [INFO] \- org.aspectj:aspectjrt:jar:1.8.9:compile
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESSFUL
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 3 seconds
  </code></pre>
  
  <p>and this is the content of the <code>pom.xml</code> file :</p>
  
  <pre><code> &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.11&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;4.3.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
          &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;
          &lt;version&gt;1.8.9&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
          &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
          &lt;version&gt;1.8.9&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p><strong>Question</strong>: I don't understand this output is saying that everything is fine or there might be some incompatibility in my project, and if there are how to solve them?</p>