You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Glen Mazza (JIRA)" <ji...@apache.org> on 2013/01/11 14:38:12 UTC

[jira] [Commented] (MTOMCAT-178) additionalClasspathDirs doesn't seem to be used

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

Glen Mazza commented on MTOMCAT-178:
------------------------------------

According to this JIRA it's not yet implemented with the Tomcat 7 plugin: https://issues.apache.org/jira/browse/MTOMCAT-189.  But I don't think you need additionalClasspathDirs for what you're configuring -- I would suggest "warSourceDirectory" (http://tomcat.apache.org/maven-plugin-2.1-SNAPSHOT/tomcat7-maven-plugin/run-mojo.html) if you want to reroute from src/main/webapp (put there by default to allow for real-time updating of css/jsp/javascript files) to the more authoritative target/webappname/ folder, which should have all the dependencies being defined in your pom.

Also, AFAIK additionalClasspathDirs is intended to be for additional classpaths for dependencies not declared in your WAR (or, probably in your case, in JARs declared as dependencies in your pom.xml), it's not meant as an overriding feature ("hey, ignore my foo.jar I put in the WAR and use this one instead!").  It should be rarely needed.  Also, it doesn't have a concept of inheritance/precedence, you're at Tomcat's mercy of whatever it wants to do if you declare the same dependency in multiple places.
                
> additionalClasspathDirs doesn't seem to be used
> -----------------------------------------------
>
>                 Key: MTOMCAT-178
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-178
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: Bug
>          Components: tomcat7
>    Affects Versions: 2.0
>         Environment: Maven 3.0.3 / Linux / OpenJDK 7
>            Reporter: Craig
>            Assignee: Olivier Lamy (*$^¨%`£)
>
> Using the plugin like this:
>                         <plugin>
>                             <groupId>org.apache.tomcat.maven</groupId>
>                             <artifactId>tomcat7-maven-plugin</artifactId>
>                             <version>2.0</version>
>                             <configuration>
>                                 <additionalClasspathDirs>
>                                     <additionalClasspathDir>${project.build.directory}/../../../mits-common-parent/common-ui/src/main/resource$
>                                     <additionalClasspathDir>${project.build.directory}/../src/main/webapp</additionalClasspathDir>
>                                 </additionalClasspathDirs>
>                             </configuration>
>                         </plugin>
> I run Tomcat like this:
> mvn tomcat7:run
> The application starts and runs fine. But, when the classloader loads a resource that is in one of the additionalClasspathDir entries, it loads it from the .war, not from the additionalClasspathDir location. Nothing I do seems to make Tomcat use the additionalClasspathDir entries.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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