Finally fixed a Conflicting Module Versions problem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Finally fixed a Conflicting Module Versions problem

Kenneth Kousen
Every time I update my groovy installation (outside Eclipse, such as in my Gradle build file), I wind up with an ExceptionInInitializerError due to conflicting module versions when I try to run anything in Eclipse. It drives me crazy.

I finally found a laborious work around. I wanted to share it here, and maybe find out if I'm missing something or if there's a better way.

When I run a script and get that error, I go into "Run Configurations...", select my script, go to the Arguments tab, and, in the "VM Arguments" section, I delete:

-Dgroovy.starter.conf="${groovy_home}/conf/groovy-starter.conf"

Everything works after that. I don't know of a way to make that the normal method of running, or if it will ultimately mess up something else, but that error is the bane of my existence. Any way to defeat it is a win.

Ken
--
Kenneth A. Kousen
President
Kousen IT, Inc.
Reply | Threaded
Open this post in threaded view
|

Re: Finally fixed a Conflicting Module Versions problem

Vladimír Oraný
+1 to fix it very soon! I run my apps using Gradle so I had to create global property in my ~/.gradle/gradle.properties where do I store the current version of Groovy used by Groovy Eclipse compiler. than I have to use in each of my build.gradle files following construct:

def groovyVersion = '2.1.5' // the version which should by normally used
if(project.hasProperty('groovy.2.1.compiler.version')){ // for CI etc.
    groovyVersion = project.getProperty('groovy.2.1.compiler.version')
}

The drawback of this approach is that my builds can differ from the ones on CI server or run by my colleagues.

As a first step would be nice if similar property will be available for all (or just import) gradle build run from the Groovy Eclipse but definitely would be nice to be able to run any Groovy version available.



2013/6/25 Kenneth Kousen <[hidden email]>
Every time I update my groovy installation (outside Eclipse, such as in my Gradle build file), I wind up with an ExceptionInInitializerError due to conflicting module versions when I try to run anything in Eclipse. It drives me crazy.

I finally found a laborious work around. I wanted to share it here, and maybe find out if I'm missing something or if there's a better way.

When I run a script and get that error, I go into "Run Configurations...", select my script, go to the Arguments tab, and, in the "VM Arguments" section, I delete:

-Dgroovy.starter.conf="${groovy_home}/conf/groovy-starter.conf"

Everything works after that. I don't know of a way to make that the normal method of running, or if it will ultimately mess up something else, but that error is the bane of my existence. Any way to defeat it is a win.

Ken
--
Kenneth A. Kousen
President
Kousen IT, Inc.

Reply | Threaded
Open this post in threaded view
|

Re: Finally fixed a Conflicting Module Versions problem

Andrew Eisenberg
Happy to fix this, but first I need to understand what is going on.  I
think the problem is that you are using and saving a launch
configuration for launching your apps inside of Eclipse.  The launch
configuration hardwires some information about the script (like
-Dgroovy.starter.conf="${groovy_home}/conf/groovy-starter.conf").

groovy_home is set to the version of groovy being used by Eclipse.
Normally, the groovy.starter.conf property must be set in order for
the launch to happen correctly.  So, not sure how this property is
being set otherwise.

On Tue, Jun 25, 2013 at 9:25 AM, Vladimír Oraný <[hidden email]> wrote:

> +1 to fix it very soon! I run my apps using Gradle so I had to create global
> property in my ~/.gradle/gradle.properties where do I store the current
> version of Groovy used by Groovy Eclipse compiler. than I have to use in
> each of my build.gradle files following construct:
>
> def groovyVersion = '2.1.5' // the version which should by normally used
> if(project.hasProperty('groovy.2.1.compiler.version')){ // for CI etc.
>     groovyVersion = project.getProperty('groovy.2.1.compiler.version')
> }
>
> The drawback of this approach is that my builds can differ from the ones on
> CI server or run by my colleagues.
>
> As a first step would be nice if similar property will be available for all
> (or just import) gradle build run from the Groovy Eclipse but definitely
> would be nice to be able to run any Groovy version available.
>
>
>
> 2013/6/25 Kenneth Kousen <[hidden email]>
>>
>> Every time I update my groovy installation (outside Eclipse, such as in my
>> Gradle build file), I wind up with an ExceptionInInitializerError due to
>> conflicting module versions when I try to run anything in Eclipse. It drives
>> me crazy.
>>
>> I finally found a laborious work around. I wanted to share it here, and
>> maybe find out if I'm missing something or if there's a better way.
>>
>> When I run a script and get that error, I go into "Run Configurations...",
>> select my script, go to the Arguments tab, and, in the "VM Arguments"
>> section, I delete:
>>
>> -Dgroovy.starter.conf="${groovy_home}/conf/groovy-starter.conf"
>>
>> Everything works after that. I don't know of a way to make that the normal
>> method of running, or if it will ultimately mess up something else, but that
>> error is the bane of my existence. Any way to defeat it is a win.
>>
>> Ken
>> --
>> Kenneth A. Kousen
>> President
>> Kousen IT, Inc.
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email