[ 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to