Apache Tomcat Maven Plugin
  1. Apache Tomcat Maven Plugin
  2. MTOMCAT-206

Runtime dependencies within multi module projects are not loaded.


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: commons-lib
    • Labels:


      I am not sure if this counts as a duplicate of MTOMCAT-46, there are some differences...

      Consider a multi module project in maven structured like this:

      • parent
      • api
      • implementation
      • webapp

      The webapp has a compile scope dependency on the API and a runtime scope dependency on the implementation. The implementation classes are loaded with some dependency injection framework.

      If I run tomcat(7):run in the root project it will fail because the tomcat plugin does not add the implementation classes (i.e. the runtime dependency) to the classpath. If I change the dependency scope of the implementation dependency to compile, it works.

      The solution for this was pretty simple. Just change one method call in DefaultClassLoaderEntriesCalculator, viewable in the applied patch. All tests and IT-tests still pass.

        Issue Links


          Ludwig Magnusson created issue -
          Olivier Lamy (*$^¨%`£) made changes -
          Field Original Value New Value
          Link This issue is related to MTOMCAT-46 [ MTOMCAT-46 ]
          Olivier Lamy (*$^¨%`£) made changes -
          Fix Version/s 2.1 [ 12320767 ]
          Olivier Lamy (*$^¨%`£) made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]


            • Assignee:
              Olivier Lamy (*$^¨%`£)
              Ludwig Magnusson
            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created: