tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arne Franken (JIRA)" <>
Subject [jira] [Commented] (MTOMCAT-173) Direct dependencies are not added to classpath
Date Mon, 20 Aug 2012 15:51:37 GMT


Arne Franken commented on MTOMCAT-173:

> Don't clean your projects
oops, of course you're right about that.

> use only mvn -pl :dep-issue-webapp tomcat7:run (without -am) if you don't want to rebuild/recompile
if I don't use "-am", Tomcat will not have all necessary libraries in the classpath

if I use "-am" , Tomcat will have all necessary libraries in the classpath, but this won't
work if any of my dependencies are also WAR artefacts which also have a Tomcat configuration
since Maven will run the Tomcat plugin for the first module with plugin configuration in the
dependency chain.
Also, dependencies will only be added to the classpath if they are compile time dependencies,
whereas a WAR artefact only needs runtime dependencies if it doesn't contain code that needs

For me the only working workaround at the moment is to run "mvn tomcat7:run" directly in the
directory of the webapp module.
> Direct dependencies are not added to classpath
> ----------------------------------------------
>                 Key: MTOMCAT-173
>                 URL:
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: Bug
>          Components: tomcat6, tomcat7
>    Affects Versions: 2.0
>            Reporter: Arne Franken
>            Assignee: Olivier Lamy (*$^¨%`£)
> in DefaultClassLoaderEntriesCalculator#calculateClassPathEntries, direct dependencies
are not added, the log message says "skip adding artifact " + artifact.getArtifactId() + "
as it's in reactors". 
> In my case, it's a jar that is configured as a direct dependency. When the Webapp starts,
the Jar is missing from the Classpath and the startup fails.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message