Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8479991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:11:15+00:00 2026-06-10T19:11:15+00:00

I am using IntelliJ 11.1.3 , IvyIDEA Plugin for IntelliJ , Spock 0.5 (which

  • 0

I am using IntelliJ 11.1.3, IvyIDEA Plugin for IntelliJ, Spock 0.5 (which depends on Groovy 1.8.4), and Groovy 1.5.6.

I have an IntelliJ module that follows Maven Standard Directory Layout. The output is a WAR file.

When doing a build of this module in IntelliJ, is there any way that I can tell IntelliJ to use the following:

  • Groovy 1.5.6 to compile src/main/groovy
  • Groovy 1.8.4 to compile src/test/groovy

I need to do this because the actual application code needs to be compiled against Groovy 1.5.6 (long story short: the WAR that is generated is deployed with an EAR that must stay on Groovy 1.5.6 for now).

The Test directory, of course, does not get deployed with the WAR. The Test directory contains Spock Tests. I am using Spock 0.5, which requires Groovy 1.8.x

ivy.xml

<dependency conf="compile->default" name="groovy-all" 
    org="org.codehaus.groovy" rev="1.5.6"/>

<dependency conf="test->default" name="groovy-all" 
    org="org.codehaus.groovy" rev="1.8.4"/>
<dependency conf="test->default" name="spock-core" 
    org="org.spockframework" rev="0.5-groovy-1.8"/>

I need to be able to run tests from IntelliJ. If I build from IntelliJ and attempt to run a Spock Test, I get the following:

org.spockframework.runtime.InvalidSpecException: 
Specification 'org.myorg.test.ProcessCaseTest' was not compiled properly 
(Spock AST transform was not run); try to do a clean build
at org.spockframework.runtime.SpecUtil.checkIsSpec(SpecUtil.java:53)

If I remove this line:

<dependency conf="compile->default" name="groovy-all" 
    org="org.codehaus.groovy" rev="1.5.6"/>

then I can build and run Spock Tests, but I lose Groovy from my module.

I think what I need to do is tell IntelliJ to use one version of Groovy to compile the application code and another version of Groovy to compile the tests, but I have not been able to find a way to do this.

I would be extremely grateful for any help or insight that anyone could provide. Thank you very much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:11:16+00:00Added an answer on June 10, 2026 at 7:11 pm

    IDEA follows the Maven dependency model where compile dependencies automatically make it to the test class path. What you can try is to reorder dependencies in the IDEA module so that Groovy 1.8 (which should have scope test) comes before Groovy 1.5 (which should have scope compile). Anyway, it’s a hairy affair.

    PS: I recommend to use Spock 0.6.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using IntelliJ 8.1.2 on Windows to develop a Grails 1.1 project that depends
I have a java web application which I can debug using IntelliJ or Eclipse
I have a Java EE 6 Wicket application deployed with maven using IntelliJ IDEA
I'm using IntelliJ Ultimate 11.1 which includes the goodies that comes with the latest
I am using IntelliJ Idea CE (which is incredible) and have included ActionBar Sherlock
I am using IntelliJ IDEA 11.1.2 Ultimate with Gradle 1.0 multi module project. One
I'm using IntellIJ with Apache Wicket and IntelliJ is showing me that tags like
Hi I have just started using IntelliJ again and have version 9. I just
Using intellij and maven pom files, how do i debug tests run inside the
I'm making an iPhone game in .lua using IntelliJ IDEA, and I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.