I think you'd have to copy the files all to one directory and use that
instead, but that would prevent the automatic recompilation.

You might be able to add a profile that adds the test directory as an
additional source directory, but be careful here that it will pollute
target/classes for an eventual build that doesn't run with clean.

If you need an enhancement to the plugin to support multiple class
directories, that would need to be requested of the Jetty developers.
They may have better ideas how to do this, as it seems like an unusual
use case to me.

- Brett

2008/9/23 Andrew Robinson <[EMAIL PROTECTED]>:
> I have a war project that was built that also has a "src/test/webapp"
> directory. The idea was that test pages could be made in this
> directory that would not be included in the normal war.
>
> I have got it mostly working except for the classes. I need to have
> both target/classes and target/test-classes on the classpath. Here is
> what I have been attempting to use:
>
>          <plugin>
>            <groupId>org.mortbay.jetty</groupId>
>            <artifactId>maven-jetty-plugin</artifactId>
>            <version>6.1.12.rc2</version>
>            <configuration>
>              <scanIntervalSeconds>10</scanIntervalSeconds>
>              <webXml>${basedir}/src/test/webapp/WEB-INF/web.xml</webXml>
>              
> <webAppSourceDirectory>${basedir}/src/test/webapp</webAppSourceDirectory>
>              <webAppConfig>
>                <contextPath>/demo-test</contextPath>
>                <baseResource
>                  implementation="org.mortbay.resource.ResourceCollection">
>                  <resourcesAsCSV>
>                    src/test/webapp,src/main/webapp
>                  </resourcesAsCSV>
>                </baseResource>
>              </webAppConfig>
>            </configuration>
>
>
> Looking here:
> http://docs.codehaus.org/display/JETTY/Which+files+are+scanned+by+the+Jetty+Maven+Plugin
>
> It says that scanTargets are picked up, but that did not work.
>
> I set classesDirectory to "${basedir}/target/test-classes", but then
> the "${basedir}/target/classes" were no longer on the classpath.
>
> How can I get jetty to run off of the src/test/webapp and include both
> "${basedir}/target/test-classes" and "${basedir}/target/classes"?
>
> Thanks,
> Andrew
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to