Bálint Kriván wrote:
> Hi!
>
> On Sat, Apr 11, 2009 at 10:26 PM, Jerome Velociter <[email protected]> wrote:
>
>> Hi,
>>
>> Bálint Kriván wrote:
>>> Hi!
>>>
>>> As the beginning I would like to say Hi! everyone, I'm new to XWiki.
>>>
>>> I've read this guide:
>>> http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents
>>> I've got the main picture about this but how can I compile this component
>> "mvn install" in the root directory of your component (where the pom.xml
>> is).
>>
>> check
>> http://dev.xwiki.org/xwiki/bin/view/Community/Building#HInstallingMaven
>> for more info on building (which maven version to use, how to configure
>> maven, etc.)
>
>
> Thanks for your help! It works, just a little question:
> I had to do this:
> $ mvn install:install-file -DgroupId=org.xwiki.platform
> -DartifactId=xwiki-core-component -Dversion=1.8-SNAPSHOT -Dpackaging=jar
> -Dfile=./xwiki-core-component-1.8.jar
>
> Because for "mvn install" it said that he need that dependency. So I've
> installed it as it suggested (from WEB-INF/lib). Is it okay? Or is it a
> recommended way how to install dependencies?

This should not be necessary. Have you setup your settings.xml config 
file as detailed on the building guide ?

Maven should download automatically that dependency from here 
http://maven.xwiki.org/snapshots/org/xwiki/platform/xwiki-core-component/1.8-SNAPSHOT/
>
>
>>> (Should I?) and how can I include it in my XWiki installation?
>> just drop the built jar in the WEB-INF/lib/ folder of your XWiki
>> application
>
>
> Thanks. Is XWiki realize the components in run-time? Or I have to restart
> it? (I've copied it and started, so I don't know if it works if I just copy
> it while XWiki still running.)

You have to restart.

Jerome.
>
>
>>
>> that should be all.
>
>
> Thank for your fast help!
>
>
>>
>> Jerome
>>> So for example: I've make a HelloWorld component and I would like to use
>> it
>>> in a wiki page like this (using groovy):
>>>
>>> <%
>>> def greeter =
>> com.xpn.xwiki.web.Utils.getComponent(org.xwiki.component.HelloWorld.ROLE);
>>> println greeter.sayHello();
>>> %>
>>>
>>> How can I do that? What are the missing steps I need to do (currently i'm
>>> having a directory with tree like this:
>>>
>>> pom.xml
>>> src/main/java/org/xwiki/component/HelloWorld.java
>>> src/main/java/org/xwiki/component/internal/DefaultHelloWorld.java
>>> src/main/resources/META-INF/plexus/components.xml
>>> src/test/java/org/xwiki/component/HelloWorldTest.java
>>>
>>> )?
>>>
>>> Thanks for reading and your guidance!
>>>
>>> --
>>> Regards,
>>> Bálint Kriván
>>> _______________________________________________
>>> users mailing list
>>> [email protected]
>>> http://lists.xwiki.org/mailman/listinfo/users
>> _______________________________________________
>> users mailing list
>> [email protected]
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>
>
>

_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to