eventCompileEnd

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

eventCompileEnd

Todd Wells-2
The docs for the "CompileEnd" event say the parameter it gets passed is "kind", which indicates the kind of compile -- source or test.

But when I make a simple _Events.groovy that has this:

eventCompileEnd = { kind ->
    println "FINISHED COMPILING ${kind.toString()}"
}

I get this output for a 'grails compile':

  [groovyc] Compiling 53 source files to /Users/ttop/.grails/1.1/projects/grails/classes
FINISHED COMPILING org.codehaus.gant.GantBinding@64d6833a

What am I missing here? I need to know what type of compile finished. Really what I want to do is make sure a certain file gets compiled into a specific location before the war is packaged, so if there's a better way to go about it than hooking into this event, I'd like to know that too.


Reply | Threaded
Open this post in threaded view
|

Re: eventCompileEnd

Todd Wells-2
Am I doing something wrong here or are there any ideas for an alternative?

On Sat, May 9, 2009 at 4:55 PM, Todd Wells <[hidden email]> wrote:
The docs for the "CompileEnd" event say the parameter it gets passed is "kind", which indicates the kind of compile -- source or test.

But when I make a simple _Events.groovy that has this:

eventCompileEnd = { kind ->
    println "FINISHED COMPILING ${kind.toString()}"
}

I get this output for a 'grails compile':

  [groovyc] Compiling 53 source files to /Users/ttop/.grails/1.1/projects/grails/classes
FINISHED COMPILING org.codehaus.gant.GantBinding@64d6833a

What am I missing here? I need to know what type of compile finished. Really what I want to do is make sure a certain file gets copied into a specific location before the war is packaged, so if there's a better way to go about it than hooking into this event, I'd like to know that too.



Reply | Threaded
Open this post in threaded view
|

Re: Re: eventCompileEnd

Robert Fischer
There was a change with 1.1, and eventCompileEnd no longer gets the type.  Instead, the test compile
fires a different event:

/Users/robert/dev/grails/scripts/_GrailsTest.groovy:    event("TestCompileStart", [type])
/Users/robert/dev/grails/scripts/_GrailsTest.groovy:    event("TestCompileEnd", [type])

~~ Robert.

Todd Wells wrote:

> Am I doing something wrong here or are there any ideas for an alternative?
>
> On Sat, May 9, 2009 at 4:55 PM, Todd Wells <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     The docs for the "CompileEnd" event say the parameter it gets passed
>     is "kind", which indicates the kind of compile -- source or test.
>
>     But when I make a simple _Events.groovy that has this:
>
>     eventCompileEnd = { kind ->
>         println "FINISHED COMPILING ${kind.toString()}"
>     }
>
>     I get this output for a 'grails compile':
>
>       [groovyc] Compiling 53 source files to
>     /Users/ttop/.grails/1.1/projects/grails/classes
>     FINISHED COMPILING org.codehaus.gant.GantBinding@64d6833a
>
>     What am I missing here? I need to know what type of compile
>     finished. Really what I want to do is make sure a certain file gets
>     copied into a specific location before the war is packaged, so if
>     there's a better way to go about it than hooking into this event,
>     I'd like to know that too.
>
>
>

--
~~ Robert Fischer.
Grails Training        http://GroovyMag.com/training
Smokejumper Consulting http://SmokejumperIT.com
Enfranchised Mind Blog http://EnfranchisedMind.com/blog

Check out my book, "Grails Persistence with GORM and GSQL"!
http://www.smokejumperit.com/redirect.html

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Re: eventCompileEnd

pledbrook
> There was a change with 1.1, and eventCompileEnd no longer gets the type.
>  Instead, the test compile fires a different event:
>
> /Users/robert/dev/grails/scripts/_GrailsTest.groovy:
>  event("TestCompileStart", [type])
> /Users/robert/dev/grails/scripts/_GrailsTest.groovy:
>  event("TestCompileEnd", [type])

CompileStart still seems to be called twice though. Not sure why that
is. I'll have to find out whether there's an option in Gant for
tracing the target invocations.

Cheers,

Peter

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: eventCompileEnd

pledbrook
In reply to this post by Todd Wells-2
> The docs for the "CompileEnd" event say the parameter it gets passed is
> "kind", which indicates the kind of compile -- source or test.

Can you raise a documentation issue to have this fixed?

Thanks,

Peter

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Re: eventCompileEnd

pledbrook
In reply to this post by pledbrook
> CompileStart still seems to be called twice though. Not sure why that
> is. I'll have to find out whether there's an option in Gant for
> tracing the target invocations.

Of course, as soon as I said that, I could not longer reproduce the issue.

Move along, nothing to see here...

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Re: eventCompileEnd

Todd Wells-2
I also saw sometimes when it fired twice, but not consistently reproducible.

I'll file a JIRA on the doc issue, and see if I can come up with a repro on the multiple firing.

On Tue, May 12, 2009 at 3:21 AM, Peter Ledbrook <[hidden email]> wrote:
> CompileStart still seems to be called twice though. Not sure why that
> is. I'll have to find out whether there's an option in Gant for
> tracing the target invocations.

Of course, as soon as I said that, I could not longer reproduce the issue.

Move along, nothing to see here...

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

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: eventCompileEnd

sameer23
In reply to this post by Todd Wells-2
So you can get  free coins hov and it will sure help in win big.