I just added a dependency on EasyConf
<dependency>
<groupId>easyconf</groupId>
<artifactId>easyconf</artifactId>
<version>0.9.5</version>
</dependency>
and now I have a lot of dependencies which I don't need.
I think this is because the dependencies listed in EasyConf pom needs
to be more strictly defined. For example there are api dependencies
and implementation dependencies, and some dependencies are runtime
optional (but not marked as such)
So is there a recommended best practice for defining dependencies?
Looking at EasyConf as an example I think:
APIs should be compile (the default)
Implementations should be runtime, and if they are extra features
should also be defined optional.
What happens when you are not using an optional feature? Because the
API is needed to compile the artifact itself then it will also be
included when I depend on that artifact even though I am not using
that feature. Should the API also be marked as optional then?
I'm sure there are probably other pom's out there that do not
correctly define the dependencies. So in these cases what is the
suggested way of overriding them so they are not included? Including
the dependency again and using optional doesn't fix the problem,
nor does changing the scope to provided, but this might be because
EasyConf depends on xdoclet:xdoclet:jar:1.2.1 which is not available
at ibiblio.
Cheers
Bae
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]