Folks, I just brought plexus-groovy-factory back from the dead...
I've updated it to use Groovy 1.0, and updated it to allow loaded
Groovy components to load other Groovy classes as resources (via the
GroovyResourceLoader), this lets Groovy components use/extend from
other Groovy classes which are in the same archive.
I've also setup the API to allow the same code to be used by the
groovy-maven-plugin ( http://mojo.codehaus.org/groovy-maven-
plugin/ )... though for some reason, when injecting the
GroovyComponentFactory via @component, Maven freaks out with:
<snip>
...
Caused by:
org.codehaus.plexus.component.composition.CompositionException:
Composition failed of field factory in object of type
org.codehaus.mojo.groovy.ExecuteMojo because the requirement
ComponentRequirement
{role='org.codehaus.plexus.component.factory.groovy.GroovyComponentFacto
ry', roleHint='null', fieldName='factory'} was missing
at
org.codehaus.plexus.component.composition.FieldComponentComposer.assignR
equirementToField(FieldComponentComposer.java:154)
at
org.codehaus.plexus.component.composition.FieldComponentComposer.assembl
eComponent(FieldComponentComposer.java:73)
at
org.codehaus.plexus.component.composition.DefaultComponentComposerManage
r.assembleComponent(DefaultComponentComposerManager.java:68)
at
org.codehaus.plexus.DefaultPlexusContainer.composeComponent
(DefaultPlexusContainer.java:1486)
at
org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.
execute(CompositionPhase.java:29)
... 25 more
Caused by:
org.codehaus.plexus.component.repository.exception.ComponentLookupExcept
ion: Component descriptor cannot be found in the component
repository:
org.codehaus.plexus.component.factory.groovy.GroovyComponentFactory.
at org.codehaus.plexus.DefaultPlexusContainer.lookup
(DefaultPlexusContainer.java:323)
at org.codehaus.plexus.DefaultPlexusContainer.lookup
(DefaultPlexusContainer.java:312)
at
org.codehaus.plexus.component.composition.FieldComponentComposer.assignR
equirementToField(FieldComponentComposer.java:129)
... 29 more
</snip>
But simply creating a new instance works fine here... though I guess
it would be nicer to get the component injected.
The basic "hello" test is setup to validate that extending a Groovy
script works... HelloImpl.groovy, extends HelloSupport.groovy, which
implements Hello.java's interface... blah, blah, blah. Prolly could
use some more tests, but whats there now should be sufficient for the
very basics.
* * *
The pom for this puppy was set for version 1.0-alpha-6-SNAPSHOT,
which I left alone... though I don't know why this version was used,
can't find any of the older versions anywhere. But whatever... going
to let this settle for a day or so and then if there are no
objections, going to release 1.0-alpha-6, so that the groovy-maven-
plugin can be released using it.
Cheers,
--jason
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email