Hi David, breeden wrote: > Hi, > > I'm new to XWiki (and Maven, for that matter) and would like to write a > component. I've gone through the Writing XWiki Components tutorial and the > Building XWiki from sources page and also found this helpful post: > http://n2.nabble.com/Components-in-XWiki-td2621693.html#a2621693. I > generated the sample org.xwiki.component.HelloWorld component from the > archetype in the tutorial, compiled it using the Maven Eclipse plugin, then > dropped the jar in my WEB-INF\lib. But when I try to load the component > with the sample script: > > {{groovy}} > def greeter = > com.xpn.xwiki.web.Utils.getComponent(org.xwiki.component.HelloWorld.class); > {{/groovy}} > > I get exceptions saying "Failed to load component > [org.xwiki.component.HelloWorld] for hint [default]" and "Can't find > descriptor for the component [role = [org.xwiki.component.HelloWorld] hint = > [default]]" > > I've also tried adding the @ComponentRole and @Component annotations (with > no hints) to HelloWorld.java and DefaultHelloWorld.java which weren't there > before, and also adding org.xwiki.component.HelloWorld to the plugins in > xwiki.cfg, but this doesn't seem to change anything. >
> What am I missing to successfully load the component? Do you have the META-INF/components.txt file in your jar? Marius > > Much thanks, > David Breeden _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
