Hi,
I'm working on a webapp where I've got a bunch of domain model unit
tests in src/test and then want to put some HttpUnit integration
tests in something like src/iu-test or src/web-test.
I was hoping to use the pom's integrationUnitTestDirectory element,
but it seems to be no longer used? Does anyone have a best practice
way of going about having two different sets of JUnit tests?
After giving up on finding a nice, built-in way, I copied some of
the Jelly code out of test's plugin.jelly and tried to do this in my
own goal in maven.xml:
<taskdef
name="junit"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
<classpath>
<pathelement path="${pom.getDependencyPath('ant')}"/>
<pathelement path="${pom.getDependencyPath('ant+optional')}"/>
<pathelement path="${pom.getDependencyPath('junit')}"/>
</classpath>
</taskdef>
<junit
...snip... />
But the taskdef fails with a NoClassDefFoundError for
junit.framework.TestListener, even though the
pom.getDependencyPath('junit') line should import junit just as it
does (and works) for a javac task prior to this taskdef.
My naive thinking is that this is some classloader issue that is
being/will be worked out, but I've tried it with beta-8 and HEAD to
no avail and can't think of a work around other than manually
calling JUnit via the java task. But ideally I'd like to avoid it.
Is there an easier way to do this that I'm not just seeing?
Thanks,
Stephen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]