groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keegan Witt <keeganw...@gmail.com>
Subject Re: IntelliJ/Maven/GMavenPlus project, groovy scripts and run CLASSPATH
Date Sun, 04 Oct 2015 03:16:01 GMT
How about adding them in a non-standard directory (to avoid IntelliJ
knowing where they are) then add them as test sources to GMavenPlus?  If
that'd work, please see here
<https://github.com/groovy/GMavenPlus/wiki/Examples#additional-sources> for
an example.  It might not though, because I'm not sure I'm fully
understanding your use case.  It wasn't clear to me how you were deploying
the scripts so you could do the GroovyClassLoader.parseClass() calls in
production.

-Keegan

On Thu, Oct 1, 2015 at 3:29 AM, Maarten Boekhold <boekhold@gmx.com> wrote:

> Hi all,
>
> Not strictly a groovy-specific question I believe, but I also believe that
> if anybody knows the answer to this, they'll be on this list.
>
> I am working on a project that is mixed Java and groovy code. I'm
> developing in IntelliJ, it's a maven project that is using GMavenPlus (1.5).
>
> When the resulting artifact is run after I have installed it, the groovy
> scripts should *not* be on the CLASSPATH of the application; instead they
> are loaded dynamically (GroovyClassLoader.parseClass()). So, also inside
> IntelliJ, when running or debugging the full application, I want to exclude
> the groovy sources (or compiled artifacts) from the CLASSPATH. However,
> while developing I *do* want these scripts to be *compiled *so I can see
> any errors. Also when running unit tests the scripts will need to be on the
> classpath.
>
> I'm looking for a way to achieve the following:
> - Groovy sources are compiled when building the project
> - Groovy artifacts are NOT on the CLASSPATH when running/debugging the
> application inside IntelliJ
> - Groovy artifacts ARE on the CLASSPATH when running unit tests
>
> Does anybody have any idea how to do this?
>
> Maarten
>

Mime
View raw message