[ https://issues.apache.org/jira/browse/MTOMCAT-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy updated MTOMCAT-77: -------------------------------- Fix Version/s: 2.0 Assignee: Olivier Lamy > Add support for using the test classpath instead of the compile classpath > with tomcat:run > ----------------------------------------------------------------------------------------- > > Key: MTOMCAT-77 > URL: https://issues.apache.org/jira/browse/MTOMCAT-77 > Project: Apache Tomcat Maven Plugin > Issue Type: New Feature > Affects Versions: 1.1 > Environment: Maven > Reporter: Oscar Westra van Holthe - Kind > Assignee: Olivier Lamy > Fix For: 2.0 > > > For an _instant developer experience_, we need to be able to do something > like the following: > {code} > svn co https://company.repository.com/project/foo foo > cd foo > mvn install > mvn tomcat:run > {code} > Using the tomcat:run goal in itself works perfectly, but the (in-memory) > database is empty. Using the Jetty plugin, I can choose to use the test > classpath (which tells Hibernate to initialize the database): > {code:xml} > <plugin> > <groupId>org.mortbay.jetty</groupId> > <artifactId>maven-jetty-plugin</artifactId> > <version>6.1.26</version> > <configuration> > <useTestClasspath>true</useTestClasspath> > <webAppConfig> > <jettyEnvXmlFile>/src/test/config/jetty-env.xml</jettyEnvXmlFile> > </webAppConfig> > </configuration> > <!-- Cut out: dependencies for the database --> > </plugin> > {code} > I want to do something similar with the Tomcat plugin: > {code:xml} > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>tomcat-maven-plugin</artifactId> > <version>1.1</version> > <configuration> > <useTestClasspath>true</useTestClasspath><!-- This is the requested > item. --> > <path>/</path> > <contextFile>src/test/config/tomcat-context.xml</contextFile> > </configuration> > <!-- Cut out: dependencies for the database --> > </plugin> > {code} > So my request is: add a "useTestClasspath" configuration setting for tje > class RunMojo that tells it to use > {{MavenProject.getTestClasspathElements()}} instead of > {{MavenProject.getCompileClasspathElements()}} when creating the webapp > loader. On 2011-02-08, this was line 132 in the class > {{org.codehaus.mojo.tomcat.RunMojo}}. -- 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org