Ok, but I'm building a camel component here, so I need to access these classes and use them as a developer (i.e. read their documentation). Anyway, an end-user will be able to use these classes, that you want it or not, since they are included in camel-core, so why not simply keep the dependency to spi-annotation explicit instead of trying to hide these classes while you cannot?

Now, if I depends on spi-annotations (which I guess is what you expect component developers to do), then one of my code quality tool (duplicate-finder-maven-plugin) complain that camel-core and spi-annotations contain the same classes, and that they are different classes… that's actually why I first considered there was something wrong with it.
Its output is the following:
[WARNING] Found duplicate and different classes in [org.apache.camel:camel-core:2.15.2, org.apache.camel:spi-annotations:2.15.2]:
[WARNING]   org.apache.camel.spi.Metadata
[WARNING]   org.apache.camel.spi.UriEndpoint
[WARNING]   org.apache.camel.spi.UriParam
[WARNING]   org.apache.camel.spi.UriParams
[WARNING]   org.apache.camel.spi.UriPath

At least, if there are included in camel-core, they should be the same bytecode classes, no?

Victor


Le 12/05/2015 15:20, Claus Ibsen a écrit :
Hi

As end users you should not depend on spi-annotations - only camel-core.
spi-annotations is an internal model used as part of building
camel-core using the camel apt compiler plugin.

On Tue, May 12, 2015 at 2:58 PM, Victor NOËL <victor.n...@linagora.com> wrote:
Hi,

Why is spi-annotation included in camel-core?

It's bothering because:
  - the source are not in camel-core so one can't see the definition of the
annotatons (so it's not easy to use them like that).
  - and then if we add spi-annotation to the pom, there is duplicate classes
from the two artefacts which is not very nice in term of code quality.

Is there really a reason to do that?

Thanks,

Victor



Reply via email to