Hi I found a little time and have committed a fix for this on the branches.
On Tue, Jun 6, 2017 at 12:25 PM, Claus Ibsen <claus.ib...@gmail.com> wrote: > Hi > > Ah that test-jar should only be used as part of testing > camel-test-blueprint itself. It should have scope=test like it does in > camel-spring etc. > > You are welcome to contribute a fix via a github PR > > On Tue, Jun 6, 2017 at 11:52 AM, Leber, Thomas > <thomas.le...@omnetric.com> wrote: >> Hi all, >> >> We are using blueprint and therefore we include camel-test-blueprint. This >> also includes Camel-core dependencies with type "test-jar": >> >> https://github.com/apache/camel/blob/master/components/camel-test-blueprint/pom.xml >> >> <dependency> >> <groupId>org.apache.camel</groupId> >> <artifactId>camel-core</artifactId> >> <type>test-jar</type >> </dependency> >> >> Problem is now that this contains a java service for " >> java.nio.file.spi.FileTypeDetector": >> https://github.com/apache/camel/blob/camel-2.17.x/camel-core/src/test/resources/META-INF/services/java.nio.file.spi.FileTypeDetector >> >> This one is specifying the class " >> org.apache.camel.component.file.MyFileTypeDetector": >> https://github.com/apache/camel/blob/master/camel-core/src/test/java/org/apache/camel/component/file/MyFileTypeDetector.java >> >> We are using in our code NIO to probe file contents. In our jUnit test cases >> Java is detecting the service and is therefore only loading " >> MyFileTypeDetector". >> This always returns "txt" for a file type. >> >> We could fix this with adding an exclusion to our pom: >> >> <dependency> >> <groupId>org.apache.camel</groupId> >> <artifactId>camel-test-blueprint</artifactId> >> <exclusions> >> <exclusion> >> <groupId>org.apache.camel</groupId> >> <artifactId>camel-core</artifactId> >> <type>test-jar</type> >> </exclusion> >> </exclusions> >> </dependency> >> >> This is maybe something that should be fixed or at least mentioned in the >> camel documentation for blueprint camel test. >> >> Thomas Leber > > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2