They definitely should be integration tests, not unit tests. Something as
time-consuming as a maven build shouldn't really be used during unit
testing. In the case of the eclipse plugin, the fact that it was running
these builds during unit testing causes the issue where the testing version
of the plugin gets deployed. That's not to say that the plugin testing tools
shouldn't be able to handle this use case (IMO).

To address this, I've modified the maven-plugin-testing-tools so they make a
copy of the plugin project directory, then mangle/install the plugin from
there for testing. This separates the target directories of the main build
and the test-staging build one doesn't step on the other's feet. I've tested
this with a plugin that has maven builds in the integration-test phase, and
manually inspected the target/classes/META-INF/maven/plugin.xml to verify
that everything is still intact after integration testing. However, the
reason this (deploying the testing version) will only happen when test
builds are run during unit testing is that by the time integration testing
happens, the plugin jar is already present, and the target/classes/**
directory structure is just leftovers.

-john

On 12/20/06, Barrie Treloar <[EMAIL PROTECTED]> wrote:

See http://jira.codehaus.org/browse/MECLIPSE-192

maven-plugin-testing-tools builds the test jar by mangling the pom
info to include the test version and then run BuiltTool.executeMaven()
with the "package" phase to create the test jar.

The side effect of this is to put test artifacts into
D:\ide\workspace\maven\maven-eclipse-plugin\target\classes which is
not good.

I can see no work around for this situation except to use a different
mechanism for testing.

I noticed that there has been discussion about cleaning up the various
invokers/unit testing frameworks that are sprouting up.

The particular failures for the eclipse plugin are probably because
they should be integration tests and not unit tests.

Anyone have suggestions?

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


Reply via email to