Closed QBH-insist closed 2 years ago
My guess is that you have maven.compiler.target
set to 8
. It should be 1.8
. If for some reason that doesn't work for you, you can do
<configuration>
<targetBytecode>1.8</targetBytecode>
<configuration>
in the GmavenPlus plugin element.
My guess is that you have
maven.compiler.target
set to8
. It should be1.8
. If for some reason that doesn't work for you, you can do<configuration> <targetBytecode>1.8</targetBytecode> <configuration>
in the GmavenPlus plugin element.
You are right,thanks. Now i meet another problem, The file can compile but not run. Look forward to your reply.
Your Spock test files are named like *Spec.groovy
, right? Because your Surefire configuration currently expects that.
My guess is that you have
maven.compiler.target
set to8
. It should be1.8
. If for some reason that doesn't work for you, you can do<configuration> <targetBytecode>1.8</targetBytecode> <configuration>
in the GmavenPlus plugin element.
You are right,thanks. Now i meet another problem, The file can compile but not run. Look forward to your reply.
I found the reason why test not run. I excluded 'junit-vintage-engine' dependency, this is wrong. Thanks
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<!-- <exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>-->
</dependency>
I'm glad you were able to get it working. I'll close this issue now, but if you have further problems, let me know and I'll re-open.
hi, i have a compile problem when i try to use spock and gmavenplus.
command:
mvn test
result:java version:
"1.8.0_151"
parent pom.xml: