osoco/grails-concordion — Issue #2: Extension class not found in Grails source
Author: martindow
Created: 2011-11-30 18:22:13+00:00
State: open

Hi,

Thanks for a great plugin - creating the example with Geb test has really helped get things started quickly.

I've hit a problem trying to configure an extension, though. I've written a class which extends ConcordionExtension and placed that in src/java in my Grails project.

I then declared the extension in BuildConfig.groovy as per your instructions:
concordion.extensions = [ 'my.BespokeExtension' ]

When I run the concordion tests with 'grails test-app concordion:', however the test fails with this exception:
Cannot find extension 'my.BespokeExtension' on classpath
java.lang.RuntimeException: Cannot find extension 'net.creativity.concordion.CreativityStyleExtension' on classpath
at org.concordion.internal.ConcordionBuilder.addExtension(ConcordionBuilder.java:276)
at org.concordion.internal.ConcordionBuilder.addExtensions(ConcordionBuilder.java:266)

I also tried the extension as a Groovy class in src/groovy, in test/concordion and in test/unit with the same result.

I was able to use the concordion-external extension, as documented, so I then bundled my class into its own jar and placed that in the lib directory of my Grails project. From here Concordion found my extension class.

So there's some interesting class loading going on, but I'm not familiar enough with it myself. Do you have any idea how I can make this work? I'll go with my external class for the time being.

Thanks,

Martin.