On 16-Sep-08, at 1:12 PM, Benjamin Bentmann wrote:
Jason van Zyl wrote:
The ITs for example could easily use the invoker in shared.
Not as is I believe. The maven-invoker is intended to run Maven, not
more. The maven-verifier on the other hand appears to be a
conglomerate of these functionalities
- invoke Maven
- assert pre-/post-build conditions
- duplicate stuff from plexus-utils
Correct. I'm talking about replacing the straight up invocation part
of the verifier with the invoker which is entirely possible.
I started trying to shape this branch of the verifier here to use the
invoker:
http://svn.apache.org/repos/asf/maven/shared/branches/embedder-verifier/
With the corresponding branch of the integration tests here:
http://svn.apache.org/repos/asf/maven/core-integration-testing/branches/embedder/
My experience with the maven-verifier and the core ITs is rather
limited but in favor of separation of concerns I wonder whether we
shouldn't split this up.
We need to.
I've noted this here: http://docs.codehaus.org/display/MAVEN/IT+Problems
For instance, maven-verifier could either just directly depend on
plexus-utils instead of duplicating its classes and if - for the
sake of the core ITs - the classes need to have different names, we
could use the Shade Plugin to relocate the stuff.
I think the maven-invoker would be the thing to use here. John has
already put a lot of work in here and we should try to reuse it.
And as for the assertions: I recently created a JIRA (MINVOKER-63)
to allow pre-/post-build hook scripts in the Invoker Plugin to
easily check test conditions. My initial thoughts were about a
simple stateful class Asserter or something that holds the path to a
current directory (e.g. base directory of project), the path to the
local repo and offers several assert*() methods on this, end. I
really feel that is something that has nothing to do with invoking
Maven and could if properly designed serve the core ITs as well as
the hook scripts used by the Invoker/SHITTY Plugin or traditional
JUnit tests as employed for the ITs of the Eclipse Plugin.
That sounds fine, the only thing I would like to keep in mind is being
able to do this from Maven invoked on the command line and the embedder.
Though if you want to work on the ITs, I think the first thing that
would be useful is to get the core Maven plugins out of the ITs which
we are using for testing. Integration tests for plugins themselves
should be moved to their respective plugins and stay there.
Benjamin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
To do two things at once is to do neither.
-—Publilius Syrus, Roman slave, first century B.C.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]