Re: [xwiki-users] Components : Bridge to old core and objects ?

2012-04-11 Thread Marius Dumitru Florea
On Tue, Apr 10, 2012 at 6:08 PM, Diego Jesus diego.a.r...@gmail.com wrote: Ok, got it to work. The small test component is running just fine in XWiki. However, if I try to run unit tests with maven I get the following error: Results : Failed tests:  

Re: [xwiki-users] Components : Bridge to old core and objects ?

2012-04-10 Thread _diego
Well, I've been trying, but maven doesn't find that dependency. I've tried with several versions of the following: dependency groupIdorg.xwiki.platform/groupId artifactIdxwiki-platform-oldcore/artifactId version4.0-SNAPSHOT/version /dependency I also search in maven repository but

Re: [xwiki-users] Components : Bridge to old core and objects ?

2012-04-10 Thread Thomas Mortagne
Probably mean you don't have the right configuration in your .m2/settings.xml. See http://dev.xwiki.org/xwiki/bin/view/Community/Building#HInstallingMaven On Tue, Apr 10, 2012 at 3:24 PM, _diego diego.a.r...@gmail.com wrote: Well, I've been trying, but maven doesn't find that dependency. I've

Re: [xwiki-users] Components : Bridge to old core and objects ?

2012-04-10 Thread Marius Dumitru Florea
On Tue, Apr 10, 2012 at 4:34 PM, Thomas Mortagne thomas.morta...@xwiki.com wrote: Probably mean you don't have the right configuration in your .m2/settings.xml. See http://dev.xwiki.org/xwiki/bin/view/Community/Building#HInstallingMaven Yes, I can see the 4.0-SNAPSHOT version of

Re: [xwiki-users] Components : Bridge to old core and objects ?

2012-04-10 Thread Diego Jesus
Ok, got it to work. The small test component is running just fine in XWiki. However, if I try to run unit tests with maven I get the following error: Results : Failed tests:   testGetDocument(com.aims.DocumentScriptTest): unexpected invocation: context.getContext() no expectations specified: did

Re: [xwiki-users] Components : Bridge to old core and objects ?

2012-04-09 Thread _diego
Hi, I'm also trying to do something similar and I have already followed that guide. However, I still can't use the API, since I can't find the XWikiContext class in my classpath, or any other class from com.xpn.xwiki in eclipse. Am I missing some maven dependency? I also can't find anything on

Re: [xwiki-users] Components : Bridge to old core and objects ?

2012-04-09 Thread Marius Dumitru Florea
On Mon, Apr 9, 2012 at 5:44 PM, _diego diego.a.r...@gmail.com wrote: Hi, I'm also trying to do something similar and I have already followed that guide. However, I still can't use the API, since I can't find the XWikiContext class in my classpath, or any other class from com.xpn.xwiki in

[xwiki-users] Components : Bridge to old core and objects ?

2012-01-20 Thread jerem
Hello, I'm trying to convert a groovy class (in a wiki page) to a proper xwiki component in Java. Problem is : my groovy code makes heavy use of the document model, for example : - setting documents creator/author, dates, with and without triggering change events (modifying also internal

Re: [xwiki-users] Components : Bridge to old core and objects ?

2012-01-20 Thread Marius Dumitru Florea
If you don't mind depending on the old core then you can access it from a component as indicated on http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents#HAccessingLegacycode . Once you have the XWikiContext object (from the ExecutionContext) then you have access to all the old core