You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Nick Lloyd (JIRA)" <ji...@apache.org> on 2012/12/04 16:48:58 UTC

[jira] [Created] (MTOMCAT-189) additionalClassesDirs parameter handling expanded to include run and run-war goals

Nick Lloyd created MTOMCAT-189:
----------------------------------

             Summary: additionalClassesDirs parameter handling expanded to include run and run-war goals
                 Key: MTOMCAT-189
                 URL: https://issues.apache.org/jira/browse/MTOMCAT-189
             Project: Apache Tomcat Maven Plugin
          Issue Type: Improvement
    Affects Versions: 2.1
            Reporter: Nick Lloyd
            Priority: Minor


I contributed the original patch to add the functionality to add additional directories to the classpath for the run goal.  This patch expands on that, adding the functionality to both run and run-war goals in the tomcat6 and tomcat7 plugin artifacts.

Please review and incorporate as you see fit.  My organization is using this internally.

--
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


[jira] [Commented] (MTOMCAT-189) additionalClassesDirs parameter handling expanded to include run and run-war goals

Posted by "Arne Franken (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510402#comment-13510402 ] 

Arne Franken commented on MTOMCAT-189:
--------------------------------------

maybe I misunderstand the use case (or your explanation), but don't you want _any_ files/classes that your webapp depends on to be a dependency of the webapp instead of depending on a preconfigured tomcat? 

That way you would be independent from the deployment of the application container running your webapp and could switch to a service provider where you get only default tomcat deployments, or run your webapp in a completely different application container.
                
> additionalClassesDirs parameter handling expanded to include run and run-war goals
> ----------------------------------------------------------------------------------
>
>                 Key: MTOMCAT-189
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-189
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1
>            Reporter: Nick Lloyd
>            Priority: Minor
>             Fix For: 2.1
>
>
> I contributed the original patch to add the functionality to add additional directories to the classpath for the run goal.  This patch expands on that, adding the functionality to both run and run-war goals in the tomcat6 and tomcat7 plugin artifacts.
> Please review and incorporate as you see fit.  My organization is using this internally.

--
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


[jira] [Commented] (MTOMCAT-189) additionalClassesDirs parameter handling expanded to include run and run-war goals

Posted by "Nick Lloyd (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510539#comment-13510539 ] 

Nick Lloyd commented on MTOMCAT-189:
------------------------------------

Let me better explain the current way my project team deploys our servlets and configuration:

We have several Spring-based servlets running in different tomcat containers across several different environments.  We keep a single configuration file holding any environment-specific configuration data (ex. database connection parameters, JMS URLs).  This configuration file we make accessible to servlets through the classpath so that in the Spring XML we reference the file as "classpath:env.properties".  We extend the tomcat classpath through a setenv.sh script packaged by a maven assembly into tomcat bundle which we actually deploy across these environments.

While each developer on the team can package up a local environment configured tomcat bundle, I put in some time back the tomcat-maven-plugin to allow for running individual servlets through maven for faster testing (also fancy integration testing and super easy debugging through eclipse).  This worked fine before we had a common env.properties file when each servlet had its own env.properties packaged in the war... however this meant that we had a distinct war file for each environment we deployed to.  Not an ideal situation.

I patched tomcat-maven-plugin version 1.2 to allow equivalent functionality to setenv.sh or any other mechanism not relying on dependencies to add arbitrary paths to the classpath for the embedded tomcat instance.  I shared the patch with this project back then and the changes were incorporated in version 2.0, into the tomcat6-maven-plugin though only to the "run" goal.  This is an update to that.

I can provide one or more integration tests around this functionality if that would make you more comfortable.
                
> additionalClassesDirs parameter handling expanded to include run and run-war goals
> ----------------------------------------------------------------------------------
>
>                 Key: MTOMCAT-189
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-189
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1
>            Reporter: Nick Lloyd
>            Priority: Minor
>             Fix For: 2.1
>
>
> I contributed the original patch to add the functionality to add additional directories to the classpath for the run goal.  This patch expands on that, adding the functionality to both run and run-war goals in the tomcat6 and tomcat7 plugin artifacts.
> Please review and incorporate as you see fit.  My organization is using this internally.

--
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


[jira] [Commented] (MTOMCAT-189) additionalClassesDirs parameter handling expanded to include run and run-war goals

Posted by "Nick Lloyd (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509840#comment-13509840 ] 

Nick Lloyd commented on MTOMCAT-189:
------------------------------------

This is meant to support modifications that you can make to a regular tomcat installation via the conf/catalina.properties files where you can add directories to the different classloaders.  Why this matters is if you want to have directories containing configuration files that you want to access across servlets via the classpath.

Different beast from adding dependencies.

Note that this functionality already exists in tomcat6-maven-plugin for the run goal, I am simply expanding it to include run-war and also incorporating the change into tomcat7-maven-plugin.
                
> additionalClassesDirs parameter handling expanded to include run and run-war goals
> ----------------------------------------------------------------------------------
>
>                 Key: MTOMCAT-189
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-189
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1
>            Reporter: Nick Lloyd
>            Priority: Minor
>
> I contributed the original patch to add the functionality to add additional directories to the classpath for the run goal.  This patch expands on that, adding the functionality to both run and run-war goals in the tomcat6 and tomcat7 plugin artifacts.
> Please review and incorporate as you see fit.  My organization is using this internally.

--
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


[jira] [Commented] (MTOMCAT-189) additionalClassesDirs parameter handling expanded to include run and run-war goals

Posted by "Arne Franken (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MTOMCAT-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509815#comment-13509815 ] 

Arne Franken commented on MTOMCAT-189:
--------------------------------------

why don't you just add additional dependencies to the plugin configuration instead of adding classes / jars manually into the classpath?
The additional property means more code that needs to be tested, maintained and documented... I was wondering why it was even there...
                
> additionalClassesDirs parameter handling expanded to include run and run-war goals
> ----------------------------------------------------------------------------------
>
>                 Key: MTOMCAT-189
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-189
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1
>            Reporter: Nick Lloyd
>            Priority: Minor
>
> I contributed the original patch to add the functionality to add additional directories to the classpath for the run goal.  This patch expands on that, adding the functionality to both run and run-war goals in the tomcat6 and tomcat7 plugin artifacts.
> Please review and incorporate as you see fit.  My organization is using this internally.

--
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


[jira] [Updated] (MTOMCAT-189) additionalClassesDirs parameter handling expanded to include run and run-war goals

Posted by "Olivier Lamy (*$^¨%`£ JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MTOMCAT-189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy (*$^¨%`£) updated MTOMCAT-189:
-------------------------------------------

    Fix Version/s: 2.1
    
> additionalClassesDirs parameter handling expanded to include run and run-war goals
> ----------------------------------------------------------------------------------
>
>                 Key: MTOMCAT-189
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-189
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1
>            Reporter: Nick Lloyd
>            Priority: Minor
>             Fix For: 2.1
>
>
> I contributed the original patch to add the functionality to add additional directories to the classpath for the run goal.  This patch expands on that, adding the functionality to both run and run-war goals in the tomcat6 and tomcat7 plugin artifacts.
> Please review and incorporate as you see fit.  My organization is using this internally.

--
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