compiling sources in plugin

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

compiling sources in plugin

Marcel Overdijk
Plugin sources in src/groovy and src/java are copied to the main project and compilid when running or warring the main project.

Is there a way to hook pre-compile Java and Groovy sources within the plugin.
I'm working on a plugin which contains a Gant script which dows some logic. I want to put this logic in separate Groovy or Java files. But after installing the plugin these source are not compiled and when running the Gant script it will fail because it can't find the mentioned sources.

Is there some way to do this?


Cheers,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: compiling sources in plugin

graemer
Not at the moment,but i fixed this bug yesterday. Your Gant script
must just depend on the compile task

includeTargets << new File ( "${grailsHome}/scripts/Compile.groovy" )

...
depends(compile)

Cheers

On 10/9/07, Marcel Overdijk <[hidden email]> wrote:

>
> Plugin sources in src/groovy and src/java are copied to the main project and
> compilid when running or warring the main project.
>
> Is there a way to hook pre-compile Java and Groovy sources within the
> plugin.
> I'm working on a plugin which contains a Gant script which dows some logic.
> I want to put this logic in separate Groovy or Java files. But after
> installing the plugin these source are not compiled and when running the
> Gant script it will fail because it can't find the mentioned sources.
>
> Is there some way to do this?
>
>
> Cheers,
> Marcel
> --
> View this message in context: http://www.nabble.com/compiling-sources-in-plugin-tf4593238.html#a13112699
> Sent from the grails - dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Graeme Rocher
Grails Project Lead
http://grails.org

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: compiling sources in plugin

Marcel Overdijk
Perfect! Will try it later today.

graemer wrote
Not at the moment,but i fixed this bug yesterday. Your Gant script
must just depend on the compile task

includeTargets << new File ( "${grailsHome}/scripts/Compile.groovy" )

...
depends(compile)

Cheers

On 10/9/07, Marcel Overdijk <marceloverdijk@gmail.com> wrote:
>
> Plugin sources in src/groovy and src/java are copied to the main project and
> compilid when running or warring the main project.
>
> Is there a way to hook pre-compile Java and Groovy sources within the
> plugin.
> I'm working on a plugin which contains a Gant script which dows some logic.
> I want to put this logic in separate Groovy or Java files. But after
> installing the plugin these source are not compiled and when running the
> Gant script it will fail because it can't find the mentioned sources.
>
> Is there some way to do this?
>
>
> Cheers,
> Marcel
> --
> View this message in context: http://www.nabble.com/compiling-sources-in-plugin-tf4593238.html#a13112699
> Sent from the grails - dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Graeme Rocher
Grails Project Lead
http://grails.org

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

    http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

Re: compiling sources in plugin

Marcel Overdijk
In reply to this post by graemer
Hi Graeme,

I just tested this, bit it isn't working. The class cannot be resolved.

Isn't this because the Gant script itself will be compiled first and at that stage my plugins class (which is used in the script!) is not yet compiled.




graemer wrote
Not at the moment,but i fixed this bug yesterday. Your Gant script
must just depend on the compile task

includeTargets << new File ( "${grailsHome}/scripts/Compile.groovy" )

...
depends(compile)

Cheers

On 10/9/07, Marcel Overdijk <marceloverdijk@gmail.com> wrote:
>
> Plugin sources in src/groovy and src/java are copied to the main project and
> compilid when running or warring the main project.
>
> Is there a way to hook pre-compile Java and Groovy sources within the
> plugin.
> I'm working on a plugin which contains a Gant script which dows some logic.
> I want to put this logic in separate Groovy or Java files. But after
> installing the plugin these source are not compiled and when running the
> Gant script it will fail because it can't find the mentioned sources.
>
> Is there some way to do this?
>
>
> Cheers,
> Marcel
> --
> View this message in context: http://www.nabble.com/compiling-sources-in-plugin-tf4593238.html#a13112699
> Sent from the grails - dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Graeme Rocher
Grails Project Lead
http://grails.org

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

    http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

Re: compiling sources in plugin

Graeme-Rocher
Hmm seems like there may be a regression as i fixed a problem where
Gant scripts couldn't resolve classes earlier but this now seems to be
broken again

http://jira.codehaus.org/browse/GRAILS-1639

Feel free to re-open

Cheers

On 10/12/07, Marcel Overdijk <[hidden email]> wrote:

>
> Hi Graeme,
>
> I just tested this, bit it isn't working. The class cannot be resolved.
>
> Isn't this because the Gant script itself will be compiled first and at that
> stage my plugins class (which is used in the script!) is not yet compiled.
>
>
>
>
>
> graemer wrote:
> >
> > Not at the moment,but i fixed this bug yesterday. Your Gant script
> > must just depend on the compile task
> >
> > includeTargets << new File ( "${grailsHome}/scripts/Compile.groovy" )
> >
> > ...
> > depends(compile)
> >
> > Cheers
> >
> > On 10/9/07, Marcel Overdijk <[hidden email]> wrote:
> >>
> >> Plugin sources in src/groovy and src/java are copied to the main project
> >> and
> >> compilid when running or warring the main project.
> >>
> >> Is there a way to hook pre-compile Java and Groovy sources within the
> >> plugin.
> >> I'm working on a plugin which contains a Gant script which dows some
> >> logic.
> >> I want to put this logic in separate Groovy or Java files. But after
> >> installing the plugin these source are not compiled and when running the
> >> Gant script it will fail because it can't find the mentioned sources.
> >>
> >> Is there some way to do this?
> >>
> >>
> >> Cheers,
> >> Marcel
> >> --
> >> View this message in context:
> >> http://www.nabble.com/compiling-sources-in-plugin-tf4593238.html#a13112699
> >> Sent from the grails - dev mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list please visit:
> >>
> >>     http://xircles.codehaus.org/manage_email
> >>
> >>
> >
> >
> > --
> > Graeme Rocher
> > Grails Project Lead
> > http://grails.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/compiling-sources-in-plugin-tf4593238.html#a13170034
> Sent from the grails - dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Graeme Rocher
Grails Project Lead
http://grails.org

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

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: compiling sources in plugin

Marcel Overdijk
Tested again this morning with latest code in svn but fails. Just re-opened the JIRA issue.


Graeme Rocher-2 wrote
Hmm seems like there may be a regression as i fixed a problem where
Gant scripts couldn't resolve classes earlier but this now seems to be
broken again

http://jira.codehaus.org/browse/GRAILS-1639

Feel free to re-open

Cheers

On 10/12/07, Marcel Overdijk <marceloverdijk@gmail.com> wrote:
>
> Hi Graeme,
>
> I just tested this, bit it isn't working. The class cannot be resolved.
>
> Isn't this because the Gant script itself will be compiled first and at that
> stage my plugins class (which is used in the script!) is not yet compiled.
>
>
>
>
>
> graemer wrote:
> >
> > Not at the moment,but i fixed this bug yesterday. Your Gant script
> > must just depend on the compile task
> >
> > includeTargets << new File ( "${grailsHome}/scripts/Compile.groovy" )
> >
> > ...
> > depends(compile)
> >
> > Cheers
> >
> > On 10/9/07, Marcel Overdijk <marceloverdijk@gmail.com> wrote:
> >>
> >> Plugin sources in src/groovy and src/java are copied to the main project
> >> and
> >> compilid when running or warring the main project.
> >>
> >> Is there a way to hook pre-compile Java and Groovy sources within the
> >> plugin.
> >> I'm working on a plugin which contains a Gant script which dows some
> >> logic.
> >> I want to put this logic in separate Groovy or Java files. But after
> >> installing the plugin these source are not compiled and when running the
> >> Gant script it will fail because it can't find the mentioned sources.
> >>
> >> Is there some way to do this?
> >>
> >>
> >> Cheers,
> >> Marcel
> >> --
> >> View this message in context:
> >> http://www.nabble.com/compiling-sources-in-plugin-tf4593238.html#a13112699
> >> Sent from the grails - dev mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list please visit:
> >>
> >>     http://xircles.codehaus.org/manage_email
> >>
> >>
> >
> >
> > --
> > Graeme Rocher
> > Grails Project Lead
> > http://grails.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/compiling-sources-in-plugin-tf4593238.html#a13170034
> Sent from the grails - dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Graeme Rocher
Grails Project Lead
http://grails.org

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

    http://xircles.codehaus.org/manage_email