You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Zoran Regvart <zo...@regvart.com> on 2017/04/26 08:17:30 UTC

Running tests against built artifacts

Hi Cameleers,
I thought you might find this interesting, the Surefire Maven plugin
has an option to search dependencies for tests
(dependenciesToScan[1]), so you can create a POM file with the version
of the artifact you want to test and the tests you want to run.

In my case I first deployed test-jar to local maven repository from
code in master (mvn jar:test-jar install), this gives me
2.20.0-SNAPSHOT test jar, then I added dependencies to this artifact
(tests classifier), the 2.19.0 staged dependency and the dependencies
needed by the tests.

It is unfortunate that the test jar's transitive dependencies do not
get added[2], but we could probably structure the Maven modules or
create some tooling to make this more straightforward,

zoran

[1] https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#dependenciesToScan
[2] https://issues.apache.org/jira/browse/MNG-1378
-- 
Zoran Regvart