hazelcast-<version>-tests.jar dependency includes a logback.xml file
Closed this issue ยท 5 comments
The hazelcast-<version>-tests.jar
and hazelcast-client-<version>-tests.jar
are retrieved when resolving the dependencies for hazelcast-eureka
via gradle. This seems to be caused by these entries in the pom.xml
file for hazelcast-eureka
:
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
<version>${hazelcast.version}</version>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-client</artifactId>
<version>${hazelcast.version}</version>
<classifier>tests</classifier>
</dependency>
Are these dependencies supposed to have a test
scope, or are they required runtime dependencies of hazelcast-eureka
?
Since my project declares hazelcast-eureka
as a runtime dependency, these jars (they appear to contain unit tests for hazelcast and hazelcast-client?) are included in my application distribution, and when the application launches, it finds the logback.xml
file included in hazelcast-<version>-tests.jar
and so ignores the configuration for my application.
Thanks for the pointer. I have added test scopes to the master.
Does exclusion
in pom.xml fix your problem as workaround for now?
https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
I'm using gradle, not native maven. At the moment, gradle's support for exclusion doesn't cover artifact classifiers. I can only exclude based on group/artifactId. While that's not a problem for the hazelcast-client
artifact, it seems to be a problem for the hazelcast
artifact, which has a variant with and without the tests
classifier.
I suppose I can work around this problem by excluding the hazelcast
and hazelcast-client
transitive dependencies and then add back in the hazelcast
dependency in my project directly.
๐
We will be releasing this fix soon in the next version..
@mesutcelik: just roughly, do you have an idea when the next version will release?
We are planning to release a bunch of hazelcast modules this week inncluding Eureka