I'm trying to imagine why you would want the cocoon-testcase stuff in
your webapp and I'm coming up empty. These classes are for unit
testing. Stuff that goes in the webapp is in the samples directory.
What are you wanting to do?
Ralph
Jean-Baptiste Quenot wrote:
Hello,
I would like to add some test classes in src/test/org to use them
in the webapp, but they are not included in the build. I notice
that the « package-testcase » build target only includes a limited
set of classes in the jar. Why so?
Also, the cocoon-testcase.jar built by this target is not copied
to webapp/WEB-INF/lib. Is there a reason for this?
The attached patch includes all classes in src/test/org in
cocoon-testcase.jar and places the jar in the webapp.
Thanks in advance for your comments,
------------------------------------------------------------------------
Index: tools/targets/compile-build.xml
===================================================================
--- tools/targets/compile-build.xml (revision 365598)
+++ tools/targets/compile-build.xml (working copy)
@@ -218,13 +218,7 @@
<!-- package testcase code -->
<target name="package-testcase" depends="compile-tests">
<jar jarfile="${build}/${name}-testcase.jar" index="true">
- <fileset dir="${build.test}">
- <include name="org/apache/cocoon/environment/mock/*"/>
- <include
name="org/apache/cocoon/components/source/SourceResolverAdapter*"/>
- <include name="org/apache/cocoon/core/container/ContainerTestCase*"/>
- <include name="org/apache/cocoon/SitemapComponentTestCase*"/>
- <include name="org/apache/cocoon/xml/WhitespaceFilter*"/>
- </fileset>
+ <fileset dir="${build.test}"/>
</jar>
<cocoon.package-sources name="${name}-testcase"
Index: tools/targets/webapp-build.xml
===================================================================
--- tools/targets/webapp-build.xml (revision 365598)
+++ tools/targets/webapp-build.xml (working copy)
@@ -79,6 +79,8 @@
<mapper type="glob" from="*-block.jar" to="cocoon-*-block.jar"/>
</copy>
+ <copy file="${build}/${name}-testcase.jar" todir="${build.webapp.lib}"/>
+
<if>
<istrue value="${include.sources-jars}"/>
<then>