0

I want to upgrade spring cloud version to 2020.0.X inorder to use both spring-cloud-starter-sleuth:jar:3.0.0 and spring-cloud-sleuth-otel-autoconfigure:jar:1.0.0-M7 so i upgraded the following dependencies in our project.

       <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
            <version>2.4.1</version>
        </dependency>
        <dependencyManagement>
           <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>2.4.1</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring.cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencyManagement>

also i have

            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-junit-platform</artifactId>
            <version>3.0.0-M5</version>
            <scope>test</scope>
        </dependency>```

But while `mvn clean install -x /mvn package` build fails with the following message.

```[main] DEBUG org.springfram[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project XXX There are test failures
 Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
k[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
.t[ERROR] Command was cmd.exe /X /C ""C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot\bin\java" -javaagent:C:\\Users\\xxxxxx\\.m2\\repository\\org\\jacoco
\\org.jacoco.agent\\0.8.6\\org.jacoco.agent-0.8.6-runtime.jar=destfile=D:\\projectName\\target\\jacoco.exec -jar C
:\Users\xxxxx\AppData\Local\Temp\surefire14272808336558418303\surefirebooter3610339089489683155.jar C:\Users\xxxxx\AppData\Local\Temp\surefire142728083
36558418303 2021-05-09T16-38-09_904-jvmRun1 surefire2306903082365675980tmp surefire_016204502211780774895tmp"
es[ERROR] Process Exit Code: 0
t[ERROR] Crashed tests:


[ERROR] For more information about the errors and possible solutions, please read the following articles:
.Exclud[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
eFilterContextCustomizer@615439f7, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@3404e5c4, or
g.springframework

Can anyone tell me what i missed or misconfigured?

Sweety
  • 307
  • 1
  • 11
  • "mvn clean install -x /mvn package" - what? please be clear on what command you're trying to run – eis May 09 '21 at 11:44
  • i mean, i tried both mvn clean install -X and mvn package but did't work – Sweety May 10 '21 at 05:04
  • May be try running mvn clean install -DskipTests=true to check if the update is not messing up surefire or current tests? If build succeeds after skipping tests, issue is not with upgrade. – Anupama Boorlagadda May 10 '21 at 07:56
  • post the POM in GitHub. This issue cannot be investigated with current information. – tibor17 May 10 '21 at 23:55
  • Check the errors in the tests, do they say that the app was not able to start since you need to exclude brave if you want to use OTel? – Jonatan Ivanov May 14 '21 at 18:33

0 Answers0