tomcat-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/MTOMCAT-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437956#comment-13437956
] 

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
everything.
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
compiling.

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: https://issues.apache.org/jira/browse/MTOMCAT-173
>             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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message