Hrm... I though I replied to this mail hours ago... but looks like I
didn't...
Ok, we've got different approaches here. I'll line them out to
summarize:
I appreciate you taking the time :-)
Mine:
- use an integration testing plugin like maven-it-plugin to run
test projects
placed in src/it/*/pom.xml against the current artifact, which is
not installed
in any repository yet.
- The embedder is fed the current artifact and the src/it/*
projects in the reactor,
where the current artifact is marked to be skipped during the build.
Note: the IT projects don't have to specify a <version> for any
<plugin> they're testing,
since the version tag is optional. If absent, the latest version
will be used,
or the version from the reactor. MNG-1677 currently prevents maven
from using a plugin
from the reactor, though normal artifacts work.
Do you have an example of this working somewhere I can look at?
Something that I can checkout, and build... and get all of the src/it
magic working?
I looked through a few different plugins, some use snaps of plugins
which aren't published anywhere, some use plugins I can't even find
the source code for.
If you have a working example, I would love to look at it... at the
end of the day... I don't care how I get this work, as long as I get
it working ;-)
Your approach:
- bind a modified install plugin to the pre-integration-test phase
to install
the artifact with a different version in the local repository
- run the invoker plugin to fork maven to build src/it/*.pom, using
the local repository,
remote repositories etc (IMHO an uncontrolled environment).
What is uncontrolled?
If your approach works, go for it. Here are some other comments
wrt. your problems:
- use the install:install-file mojo; you can specify the path to
the artifact in target/
and the version you want to use - no need for a forceVersion
parameter.
Yes, this is an option, though its a bit more pom configuration than:
<configuration>
<forceVersion>testing</forceVersion>
</configuration>
But, its worth a short... though I still think that forceVersion may
come in handy every now and then...
- if you hardcode the version to install ('testing') in the pom, i
see no harm
in specifying that version in src/it/*/pom.xml aswell
Ya, that was how I was going to ensure that what I just built was
actually what was used by the child mvn invocations.
- perhaps the staging mojo (can't remember which plugin) is of use;
it temporarily
installs the plugin in the local repository, backing up what's there;
after the integration test, it restores the local repository.
I could have sworn I replied to this now... maybe Alzheimer's is
setting in or something...
I don't really care about uninstalling the "testing" artifacts... IMO
thats just too much complexity for these simple tests.
--jason
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]