Hey, Sorry to bump. Is there no one out there with some pointer on how to integrate custom distributions and maven multi module projects / reactor builds?
Best, Benjamin From: Benjamin Debeerst [mailto:[email protected]] Sent: Mittwoch, 26. März 2014 17:06 To: [email protected] Subject: Integration Test with custom distro and Maven multi-module project Hello there, I'd like to integrate my application's integration tests with the maven multi-module projects that build my application's custom Karaf distribution, but I face some problems. I have been able to create a custom distribution form karaf, with my own config and pre-installed features and bundles a.s.o. This is a maven multi-module project with the following structure: my-app --my-app-camel-routes --my-app-feature --my-app-karaf-distro In this multi module-build, I can build and test the routing bundle, define a custom feature descriptor and add it all to the custom distribution, using the features-maven-plugin add-features-to-repo goal, such that all bundles are already in the Karaf system repository. This way the distribution is completely self-contained. This multi-module setup works well even without using maven install (which deploys intermediate results locally): Running mvn clean package will also pick up the latest changes from the sibling projects, e.g. the my-app-camel-route and add them to that custom distribution. So far so good. At the moment I run the integration tests for that custom distribution in a separate maven project. The integration test pom has the dependency on that custom distribution like this: <dependency> <groupId>my.group.id</groupId> <artifactId>my-app-karaf-distro</artifactId> <version>${my.app.version}</version> <type>tar.gz</type> <exclusions> <!-- The Karaf dependency contains multiple SLF4J bindings, which must be removed from the classpath to make the tests work --> <exclusion> <artifactId>apache-karaf</artifactId> <groupId>org.apache.karaf</groupId> </exclusion> </exclusions> </dependency> Moreover, in the test setup I specify the maven coordinates for that custom distro via karafDistributionConfiguration().frameworkUrl(maven("my.group.id", "my-app-karaf-distro").type("tar.gz").versionAsInProject()). This works all fine. But I would like to include the integration tests to the build of the actual distro. At last, I wouldn't want to release a custom distribution where the integration tests fail. But when I move the my-app-integrationtests to the multi-module project I get the problem that the reactor build always tries to download the tar.gz from the nexus instead of using the recently built distribution from the sibling project. Of course I can use mvn install and all works fine, but that also means I change my local maven repo. How can I convince maven/the integration test to pick up the distro from the sibling without using mvn install or mvn deploy? Best, Benjamin
