[ 
https://issues.apache.org/jira/browse/GROOVY-9505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082154#comment-17082154
 ] 

Kamil Jedrzejuk edited comment on GROOVY-9505 at 4/13/20, 8:52 AM:
-------------------------------------------------------------------

[~paulk] 

Hi I've download two poms:

org.spockframework:spock-core 
[https://mvnrepository.com/artifact/org.spockframework/spock-core/2.0-M2-groovy-3.0]

org.spockframework:spock-spring 
[https://mvnrepository.com/artifact/org.spockframework/spock-spring/2.0-M2-groovy-3.0]

I've changed in each of poms the artifactId to:  '2.0-M2-groovy-3.0.3',

and also in each pom I've changed groovy version from 3.0.0 to 3.0.3 after that 
I have installed this artifacts in my local maven repo. In my build gradle I 
would like to use them (with changed artifacts id). BUt I still have the same 
problem.

 

 
{code:java}
buildscript {
    ext {
        springBootVersion = '2.2.4.RELEASE'
    }
    repositories {
        mavenCentral()
        maven { url "https://repo.spring.io/snapshot"; }
        maven { url "https://repo.spring.io/milestone"; }
        maven { url "https://plugins.gradle.org/m2/"; }
    }
    dependencies {
        
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath("net.ltgt.gradle:gradle-apt-plugin:0.21")
    }
}

apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'application'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'net.ltgt.apt'

group = 'com.twitter.kamilyedrzejuq'
version = '0.0.2-SNAPSHOT'

sourceCompatibility = JavaVersion.VERSION_14
targetCompatibility = JavaVersion.VERSION_14

mainClassName = "com.twitter.kamilyedrzejuq.Application"

compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
compileJava.dependsOn(processResources)

tasks.withType(JavaCompile).each {
    it.options.compilerArgs.add('--enable-preview')
}

[bootJar, bootRun, bootDistTar, bootDistZip, distTar, distZip]*.enabled = false
jar.enabled = true

project.ext.versions = [
        lombokVersion                       : '1.18.12',
        swaggerVersion                      : '2.9.2',
        spockVersion                        : '2.0-M2-groovy-3.0.3',
        vavrVersion                         : '0.10.2',
        mockWebServerVersion                : '3.14.1',
        gsonVersion                         : '2.8.5',
        springdocOpenapiVersion             : '1.3.2'
]

repositories {
    mavenLocal()
    mavenCentral()
    maven { url "https://repo.spring.io/snapshot"; }
    maven { url "https://repo.spring.io/milestone"; }
}

test {
    useJUnitPlatform()
    jvmArgs(['--enable-preview'])
    testLogging {
        exceptionFormat = 'full'
        events = ["STARTED", "PASSED", "SKIPPED", "FAILED"]

    }
}

sourceSets {
    integrationTest {
        groovy {
            compileClasspath += main.output + test.output
            runtimeClasspath += main.output + test.output
            srcDir {
                file('src/integrationTest/groovy')
            }
        }
        resources.srcDir file('src/integrationTest/resources')
    }
}

configurations {
    integrationTestImplementation.extendsFrom compileOnly
    integrationTestImplementation.extendsFrom implementation
    integrationTestImplementation.extendsFrom annotationProcessor
    integrationTestImplementation.extendsFrom testImplementation
}

task integrationTest(type: Test) {
    testClassesDirs = sourceSets.integrationTest.output.classesDirs
    classpath = sourceSets.integrationTest.runtimeClasspath
    include '**/*Spec.*'
    include '**/*Test.*'

    systemProperty 'spring.profiles.active', 'integration'
    outputs.upToDateWhen { false }
}


dependencies {
    compileOnly("org.projectlombok:lombok:${versions.lombokVersion}")
    annotationProcessor("org.projectlombok:lombok:${versions.lombokVersion}")
    
    implementation("org.springframework.boot:spring-boot-starter-webflux")

    implementation("io.vavr:vavr:${versions.vavrVersion}")

    implementation("com.google.code.gson:gson:${versions.gsonVersion}")
    
implementation("org.springdoc:springdoc-openapi-webflux-ui:${versions.springdocOpenapiVersion}")

    testImplementation 'org.codehaus.groovy:groovy-all:3.0.3'
    
testImplementation("org.spockframework:spock-core:${versions.spockVersion}") {
//        exclude group : 'org.codehaus.groovy'
//        compile 'org.codehaus.groovy:groovy:3.0.3'
//        compile 'org.codehaus.groovy:groovy-json:3.0.3'
//        compile 'org.codehaus.groovy:groovy-nio:3.0.3'
//        compile 'org.codehaus.groovy:groovy-macro:3.0.3'
//        compile 'org.codehaus.groovy:groovy-templates:3.0.3'
//        compile 'org.codehaus.groovy:groovy-test:3.0.3'
//        compile 'org.codehaus.groovy:groovy-sql:3.0.3'
//        compile 'org.codehaus.groovy:groovy-xml:3.0.3'

    }
    
testImplementation("org.spockframework:spock-spring:${versions.spockVersion}") {
//        exclude group : 'org.codehaus.groovy'
//        compile 'org.codehaus.groovy:groovy:3.0.3'
//        compile 'org.codehaus.groovy:groovy-json:3.0.3'
//        compile 'org.codehaus.groovy:groovy-nio:3.0.3'
//        compile 'org.codehaus.groovy:groovy-macro:3.0.3'
//        compile 'org.codehaus.groovy:groovy-templates:3.0.3'
//        compile 'org.codehaus.groovy:groovy-test:3.0.3'
//        compile 'org.codehaus.groovy:groovy-sql:3.0.3'
//        compile 'org.codehaus.groovy:groovy-xml:3.0.3'
    }
    
    testImplementation("io.projectreactor:reactor-core")
    testImplementation("io.projectreactor:reactor-test")

    testImplementation("org.springframework.boot:spring-boot-starter-test")
    
testImplementation("com.squareup.okhttp3:mockwebserver:${versions.mockWebServerVersion}")

}

dependencyManagement {
   imports {     
      mavenBom 
"org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
   }
}

wrapper {
    gradleVersion = '6.3'
    distributionType = Wrapper.DistributionType.ALL
}

{code}
Pom from maven which I changed:
{code:java}
<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.spockframework</groupId>
    <artifactId>spock-core</artifactId>
    <version>2.0-M2-groovy-3.0.3</version>
    <name>Spock Framework - Core Module</name>
    <description>
        Spock is a testing and specification framework for Java and Groovy 
applications. What makes it stand out from
        the crowd is its beautiful and highly expressive specification 
language. Thanks to its JUnit runner, Spock is
        compatible with most IDEs, build tools, and continuous integration 
servers. Spock is inspired from JUnit, jMock,
        RSpec, Groovy, Scala, Vulcans, and other fascinating life forms.
    </description>
    <url>http://spockframework.org</url>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>pniederw</id>
            <name>Peter Niederwieser</name>
            <email>pe...@pniederw.com</email>
        </developer>
        <developer>
            <id>ldaley</id>
            <name>Luke Daley</name>
            <email>l...@ldaley.com</email>
        </developer>
        <developer>
            <id>leonard84</id>
            <name>Leonard Brünings</name>
            <email>lord_damok...@gmx.net</email>
        </developer>
    </developers>
    <scm>
        
<connection>scm:git:git://github.com/spockframework/spock.git</connection>
        <developerConnection>
            scm:git:ssh://g...@github.com/spockframework/spock.git
        </developerConnection>
        <url>http://github.spockframework.org/spock</url>
    </scm>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>5.5.2</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-json</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-nio</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-macro</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-templates</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-test</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-sql</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-xml</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-engine</artifactId>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-testkit</artifactId>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>13.0</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.10.5</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
            <version>7.1</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <version>1.9.11</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>3.2.10</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
            <version>3.0.1</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
    </dependencies>
</project>

{code}
{code:java}
<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.spockframework</groupId>
    <artifactId>spock-spring</artifactId>
    <version>2.0-M2-groovy-3.0.3</version>
    <name>Spock Framework - Spring Module</name>
    <description>
        Spock's Spring Module makes it possible to use Spring's TestContext 
framework together with Spock. Supports
        Spring 2.5.x, 3.x, and 4.x.
    </description>
    <url>http://spockframework.org</url>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>pniederw</id>
            <name>Peter Niederwieser</name>
            <email>pe...@pniederw.com</email>
        </developer>
        <developer>
            <id>ldaley</id>
            <name>Luke Daley</name>
            <email>l...@ldaley.com</email>
        </developer>
        <developer>
            <id>leonard84</id>
            <name>Leonard Brünings</name>
            <email>lord_damok...@gmx.net</email>
        </developer>
    </developers>
    <scm>
        
<connection>scm:git:git://github.com/spockframework/spock.git</connection>
        <developerConnection>
            scm:git:ssh://g...@github.com/spockframework/spock.git
        </developerConnection>
        <url>http://github.spockframework.org/spock</url>
    </scm>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>5.5.2</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-json</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-nio</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-macro</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-templates</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-test</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-sql</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-xml</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>2.0-M2-groovy-3.0</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>4.3.5.RELEASE</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>4.3.5.RELEASE</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>4.3.5.RELEASE</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
</project>

{code}
 

 


was (Author: camilyed):
[~paulk] 

Hi I've download two poms:

org.spockframework:spock-core 
[https://mvnrepository.com/artifact/org.spockframework/spock-core/2.0-M2-groovy-3.0]

org.spockframework:spock-spring 
[https://mvnrepository.com/artifact/org.spockframework/spock-spring/2.0-M2-groovy-3.0]

I've changed in each of poms the artifactcId to:  '2.0-M2-groovy-3.0.3',

and also in each pom I've changed groovy version from 3.0.0 to 3.0.3 after that 
I have installed this artifacts in my local maven repo. In my build gradle I 
would like to use them (with changed artifacts id). BUt I still have the same 
problem.

 

 
{code:java}
buildscript {
    ext {
        springBootVersion = '2.2.4.RELEASE'
    }
    repositories {
        mavenCentral()
        maven { url "https://repo.spring.io/snapshot"; }
        maven { url "https://repo.spring.io/milestone"; }
        maven { url "https://plugins.gradle.org/m2/"; }
    }
    dependencies {
        
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath("net.ltgt.gradle:gradle-apt-plugin:0.21")
    }
}

apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'application'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'net.ltgt.apt'

group = 'com.twitter.kamilyedrzejuq'
version = '0.0.2-SNAPSHOT'

sourceCompatibility = JavaVersion.VERSION_14
targetCompatibility = JavaVersion.VERSION_14

mainClassName = "com.twitter.kamilyedrzejuq.Application"

compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
compileJava.dependsOn(processResources)

tasks.withType(JavaCompile).each {
    it.options.compilerArgs.add('--enable-preview')
}

[bootJar, bootRun, bootDistTar, bootDistZip, distTar, distZip]*.enabled = false
jar.enabled = true

project.ext.versions = [
        lombokVersion                       : '1.18.12',
        swaggerVersion                      : '2.9.2',
        spockVersion                        : '2.0-M2-groovy-3.0.3',
        vavrVersion                         : '0.10.2',
        mockWebServerVersion                : '3.14.1',
        gsonVersion                         : '2.8.5',
        springdocOpenapiVersion             : '1.3.2'
]

repositories {
    mavenLocal()
    mavenCentral()
    maven { url "https://repo.spring.io/snapshot"; }
    maven { url "https://repo.spring.io/milestone"; }
}

test {
    useJUnitPlatform()
    jvmArgs(['--enable-preview'])
    testLogging {
        exceptionFormat = 'full'
        events = ["STARTED", "PASSED", "SKIPPED", "FAILED"]

    }
}

sourceSets {
    integrationTest {
        groovy {
            compileClasspath += main.output + test.output
            runtimeClasspath += main.output + test.output
            srcDir {
                file('src/integrationTest/groovy')
            }
        }
        resources.srcDir file('src/integrationTest/resources')
    }
}

configurations {
    integrationTestImplementation.extendsFrom compileOnly
    integrationTestImplementation.extendsFrom implementation
    integrationTestImplementation.extendsFrom annotationProcessor
    integrationTestImplementation.extendsFrom testImplementation
}

task integrationTest(type: Test) {
    testClassesDirs = sourceSets.integrationTest.output.classesDirs
    classpath = sourceSets.integrationTest.runtimeClasspath
    include '**/*Spec.*'
    include '**/*Test.*'

    systemProperty 'spring.profiles.active', 'integration'
    outputs.upToDateWhen { false }
}


dependencies {
    compileOnly("org.projectlombok:lombok:${versions.lombokVersion}")
    annotationProcessor("org.projectlombok:lombok:${versions.lombokVersion}")
    
    implementation("org.springframework.boot:spring-boot-starter-webflux")

    implementation("io.vavr:vavr:${versions.vavrVersion}")

    implementation("com.google.code.gson:gson:${versions.gsonVersion}")
    
implementation("org.springdoc:springdoc-openapi-webflux-ui:${versions.springdocOpenapiVersion}")

    testImplementation 'org.codehaus.groovy:groovy-all:3.0.3'
    
testImplementation("org.spockframework:spock-core:${versions.spockVersion}") {
//        exclude group : 'org.codehaus.groovy'
//        compile 'org.codehaus.groovy:groovy:3.0.3'
//        compile 'org.codehaus.groovy:groovy-json:3.0.3'
//        compile 'org.codehaus.groovy:groovy-nio:3.0.3'
//        compile 'org.codehaus.groovy:groovy-macro:3.0.3'
//        compile 'org.codehaus.groovy:groovy-templates:3.0.3'
//        compile 'org.codehaus.groovy:groovy-test:3.0.3'
//        compile 'org.codehaus.groovy:groovy-sql:3.0.3'
//        compile 'org.codehaus.groovy:groovy-xml:3.0.3'

    }
    
testImplementation("org.spockframework:spock-spring:${versions.spockVersion}") {
//        exclude group : 'org.codehaus.groovy'
//        compile 'org.codehaus.groovy:groovy:3.0.3'
//        compile 'org.codehaus.groovy:groovy-json:3.0.3'
//        compile 'org.codehaus.groovy:groovy-nio:3.0.3'
//        compile 'org.codehaus.groovy:groovy-macro:3.0.3'
//        compile 'org.codehaus.groovy:groovy-templates:3.0.3'
//        compile 'org.codehaus.groovy:groovy-test:3.0.3'
//        compile 'org.codehaus.groovy:groovy-sql:3.0.3'
//        compile 'org.codehaus.groovy:groovy-xml:3.0.3'
    }
    
    testImplementation("io.projectreactor:reactor-core")
    testImplementation("io.projectreactor:reactor-test")

    testImplementation("org.springframework.boot:spring-boot-starter-test")
    
testImplementation("com.squareup.okhttp3:mockwebserver:${versions.mockWebServerVersion}")

}

dependencyManagement {
   imports {     
      mavenBom 
"org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
   }
}

wrapper {
    gradleVersion = '6.3'
    distributionType = Wrapper.DistributionType.ALL
}

{code}
Pom from maven which I changed:
{code:java}
<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.spockframework</groupId>
    <artifactId>spock-core</artifactId>
    <version>2.0-M2-groovy-3.0.3</version>
    <name>Spock Framework - Core Module</name>
    <description>
        Spock is a testing and specification framework for Java and Groovy 
applications. What makes it stand out from
        the crowd is its beautiful and highly expressive specification 
language. Thanks to its JUnit runner, Spock is
        compatible with most IDEs, build tools, and continuous integration 
servers. Spock is inspired from JUnit, jMock,
        RSpec, Groovy, Scala, Vulcans, and other fascinating life forms.
    </description>
    <url>http://spockframework.org</url>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>pniederw</id>
            <name>Peter Niederwieser</name>
            <email>pe...@pniederw.com</email>
        </developer>
        <developer>
            <id>ldaley</id>
            <name>Luke Daley</name>
            <email>l...@ldaley.com</email>
        </developer>
        <developer>
            <id>leonard84</id>
            <name>Leonard Brünings</name>
            <email>lord_damok...@gmx.net</email>
        </developer>
    </developers>
    <scm>
        
<connection>scm:git:git://github.com/spockframework/spock.git</connection>
        <developerConnection>
            scm:git:ssh://g...@github.com/spockframework/spock.git
        </developerConnection>
        <url>http://github.spockframework.org/spock</url>
    </scm>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>5.5.2</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-json</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-nio</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-macro</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-templates</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-test</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-sql</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-xml</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-engine</artifactId>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-testkit</artifactId>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>13.0</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.10.5</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
            <version>7.1</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <version>1.9.11</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>3.2.10</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
            <version>3.0.1</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>
    </dependencies>
</project>

{code}
{code:java}
<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.spockframework</groupId>
    <artifactId>spock-spring</artifactId>
    <version>2.0-M2-groovy-3.0.3</version>
    <name>Spock Framework - Spring Module</name>
    <description>
        Spock's Spring Module makes it possible to use Spring's TestContext 
framework together with Spock. Supports
        Spring 2.5.x, 3.x, and 4.x.
    </description>
    <url>http://spockframework.org</url>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>pniederw</id>
            <name>Peter Niederwieser</name>
            <email>pe...@pniederw.com</email>
        </developer>
        <developer>
            <id>ldaley</id>
            <name>Luke Daley</name>
            <email>l...@ldaley.com</email>
        </developer>
        <developer>
            <id>leonard84</id>
            <name>Leonard Brünings</name>
            <email>lord_damok...@gmx.net</email>
        </developer>
    </developers>
    <scm>
        
<connection>scm:git:git://github.com/spockframework/spock.git</connection>
        <developerConnection>
            scm:git:ssh://g...@github.com/spockframework/spock.git
        </developerConnection>
        <url>http://github.spockframework.org/spock</url>
    </scm>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>5.5.2</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-json</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-nio</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-macro</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-templates</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-test</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-sql</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-xml</artifactId>
            <version>3.0.3</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>2.0-M2-groovy-3.0</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>4.3.5.RELEASE</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>4.3.5.RELEASE</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>4.3.5.RELEASE</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>junit-dep</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
</project>

{code}
 

 

> Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 on JDK 14 in 
> Spock tests
> -----------------------------------------------------------------------------------------
>
>                 Key: GROOVY-9505
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9505
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 3.0.0-beta-2
>         Environment: Ubuntu 20.04
> Intellij IDEA IntelliJ IDEA 2020.1 (Ultimate Edition)
> Build #IU-201.6668.121, built on April 8, 2020
> Runtime version: 11.0.6+8-b765.25 amd64
> Adopt Open JDK 14.0.0.hs-adpt
>            Reporter: Kamil Jedrzejuk
>            Priority: Critical
>         Attachments: Screenshot from 2020-04-12 22-23-10.png, Screenshot from 
> 2020-04-12 22-23-52.png
>
>   Original Estimate: 720h
>  Remaining Estimate: 720h
>
> I have a problem with integration tests.  I've updated  Java from 11 to 14.
> I can compile my application, but I can't run a integration tests.
> I'm using a Gradle 6.3
> Open JDK 14
> Spring Boot 2.4
> 2.0-M2-groovy-3.0
>  
> The code you can find here 
> [https://github.com/KamilJedrzejuk/weatherinformer/tree/develop]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to