Prabagaran Sellamuthu
Prabagaran Sellamuthu

Reputation: 245

In STS - The type groovy.transform.Generated cannot be resolved. It is indirectly referenced from required .class files

I am trying to use spock framework in STS. But I am facing this error in my groovy class.

ERROR - The type groovy.transform.Generated cannot be resolved. It is indirectly referenced from required .class files

let me know, how to fix this issue.

Having this depedencies and plugin in pom.xml

    <dependency>
        <groupId>org.spockframework</groupId>
        <artifactId>spock-core</artifactId>
        <version>2.1-M2-groovy-3.0</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.spockframework</groupId>
        <artifactId>spock-spring</artifactId>
        <version>2.1-M2-groovy-3.0</version>
        <scope>test</scope>
    </dependency>

            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>1.13.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>compileTests</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Downloaded the groovy plugin from Eclipse marketplace

enter image description here

This is the Groovy complier version

enter image description here

Upvotes: 1

Views: 1883

Answers (0)

Related Questions