palantir/docker-compose-rule

Getting NoClassDefFoundError exception

kedarr opened this issue · 2 comments

I am trying to use 'docker-compose-rule' but getting the following exception. I have tried it with the latest version.

                  <dependency>
			<groupId>com.palantir.docker.compose</groupId>
			<artifactId>docker-compose-rule-junit4</artifactId>
			<version>0.33.0</version>
			<scope>test</scope>
		</dependency>

Method threw 'java.lang.NoClassDefFoundError' exception. Cannot evaluate com.palantir.docker.compose.configuration.ImmutableProjectName.toString()

Here is how I am initialising my docker compose

 @ClassRule
    public static DockerComposeRule docker = DockerComposeRule.builder()
            .file("src/test/resources/docker-compose-test.yml")
            .build();

I also tried adding this dependency but same issue.

                <dependency>
			<groupId>com.palantir.docker.compose</groupId>
			<artifactId>docker-compose-rule</artifactId>
			<version>0.28.1</version>
		</dependency>

However I am able to run project without any issues. The only difference is between the build tool maven vs gradle.

@kedarr do you have a repo or anything that we could clone to try and reproduce your issue? I was not able to reproduce it locally myself