Quantcast

Domain Class only for test

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Domain Class only for test

Pablo Nussembaum
Hey Guys,
I'm one of the developers of drools-gorm plugin. In the plugin we have a domain class that it's only used inside the tests. Is there any way to not include it when the plugin is used in other
environments than test.

Thanks,
--
Bauna

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

RE: Domain Class only for test

netwiser
I didn't try this out but I think it is doable:

    def pluginExcludes = (Environment.current != Environment.TEST) ?  [
            "grails-app/views/error.gsp",
            "grails-app/domain/com/grailsrocks/taxonomy/test/Book.groovy"
    ] : []

Regards,

James

> Date: Mon, 12 Sep 2011 17:58:45 -0300

> From: [hidden email]
> To: [hidden email]
> Subject: [grails-dev] Domain Class only for test
>
> Hey Guys,
> I'm one of the developers of drools-gorm plugin. In the plugin we have a domain class that it's only used inside the tests. Is there any way to not include it when the plugin is used in other
> environments than test.
>
> Thanks,
> --
> Bauna
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

RE: Domain Class only for test

bksaville
Please correct me if I'm wrong, but doesn't pluginExcludes only get used
during package-plugin?  It wouldn't work for an already installed plugin
running in different environments.

But then again, I could really be misunderstanding the excludes behavior.

Thanks,
Brian Saville

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Domain Class only for test

Pablo Nussembaum
That's works. And should be enough because most users will use the binary version.

On 09/12/2011 06:29 PM, Brian Saville wrote:

> Please correct me if I'm wrong, but doesn't pluginExcludes only get used
> during package-plugin?  It wouldn't work for an already installed plugin
> running in different environments.
>
> But then again, I could really be misunderstanding the excludes behavior.
>
> Thanks,
> Brian Saville
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

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

    http://xircles.codehaus.org/manage_email


Loading...