Ticket #108 (new task)
Tests that launch Kauri Runtime do not run with "mvn test", only with "mvn install"
|Reported by:||bruno||Owned by:||bruno|
Upon an initial Lily build (or when doing rm -rf ~/.m2/repository/org/lilycms), tests that launch Kauri Runtime do not run with "mvn test", only with "mvn install". This is because Kauri will not find the artifacts of the kauri-modules that are part of Lily, since they are not installed yet in the local maven repository.
Once "mvn install" has been run once, things will work, even if the installed jars are from a previous build. This is because Maven puts the classes from the dependent projects itself on the classpath, and we use source-mode for loading the other resources.
Note that usually the only reason to add the Kauri modules as dependencies to the project that contains the Kauri Runtime based tests is to force these modules to be build before the tests.
While the workaround is simply (use "mvn install"), we should fix this. One idea is to let these dependencies resolve to a 'dummy module jar'. After all, the classes are put on the classpath by Maven (or your IDE) so it would be less confusing if there is only one source for them.
Related, we should probably document the pattern for testing Kauri-based apps, which includes kauri-dependency-resolver maven plugin, writing a custom conf dir, using module-source-locations, and putting the tests into a separate project from e.g. a kauri module project (unless it needs only that module).