[xwiki-users] Usage of maven xwiki-platform-tool-packager-plugin

2011-12-12 Thread Richard Hierlmeier


Hi Users,

I tried to use the xwiki-platform-tool-packager-plugin maven plugin to 
import wiki pages into xwiki. However I get following error:


% mvn org.xwiki.platform:xwiki-platform-tool-packager-plugin:3.1:import
[INFO] Scanning for projects...
[INFO] 


[INFO] Building de.hierlmeier.xwiki.testpages
[INFO]task-segment: 
[org.xwiki.platform:xwiki-platform-tool-packager-plugin:3.1:import]
[INFO] 


[INFO] [xwiki-packager-plugin:import {execution: default-cli}]
2011-12-12 15:29:00,854 [main] WARN  iPropertiesConfigurationSource - 
Failed to load configuration file [/WEB-INF/xwiki.properties]. Using 
default configuration values.  Internal error [null]
[INFO] 


[ERROR] BUILD ERROR
[INFO] 


[INFO] Failed to import XWiki documents

Embedded error: Failed to load component 
[com.xpn.xwiki.store.XWikiStoreInterface] for hint [null]

...


The following exception occured during the import (printed out with 
maven -X):


[DEBUG] Configuring mojo 
'org.xwiki.platform:xwiki-platform-tool-packager-plugin:3.1:import' --

[DEBUG]   (f) databaseName = xwiki
[DEBUG]   (f) hibernateConfig = c:\xwiki\WEB-INF\hibernate.cfg.xml
[DEBUG]   (f) sourceDirectory = C:\Users\rh\xwiki\src\documents
[DEBUG] -- end configuration --
[INFO] [xwiki-packager-plugin:import {execution: default-cli}]
2011-12-12 15:44:54,378 [main] WARN  iPropertiesConfigurationSource - 
Failed to load configuration file [/WEB-INF/xwiki.properties]. Using 
default configuration values.  Internal error [null]
[INFO] 


[ERROR] BUILD ERROR
[INFO] 


[INFO] Failed to import XWiki documents

Embedded error: Failed to load component 
[com.xpn.xwiki.store.XWikiStoreInterface] for hint [null]
[INFO] 


[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to import 
XWiki documents
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at 
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at 
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to 
import XWiki documents

at com.xpn.xwiki.tool.backup.ImportMojo.execute(ImportMojo.java:62)
at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)

... 17 more
Caused by: java.lang.RuntimeException: Failed to load component 
[com.xpn.xwiki.store.XWikiStoreInterface] for hint [null]

at com.xpn.xwiki.web.Utils.getComponent(Utils.java:645)
at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:762)
at com.xpn.xwiki.XWiki.init(XWiki.java:710)
at 
com.xpn.xwiki.tool.backup.AbstractPackager.createXWikiContext(AbstractPackager.java:108)
at 
com.xpn.xwiki.tool.backup.Importer.importDocuments(Importer.java:62)

at com.xpn.xwiki.tool.backup.ImportMojo.execute(ImportMojo.java:60)
... 19 more
Caused by: org.xwiki.component.manager.ComponentLookupException: Failed 
to lookup component [role = 

Re: [xwiki-users] Integration of my webapplication with xwiki.

2011-12-12 Thread mohit gupta
Thanks  Thomas Mortagne and Vincent a lot  for pointing out to repository.
One question on Repository structure. i downloaded the
xwiki-enterprise-web-3.2.war file and found out that
XWikiAuthServiceImpl.class lies under  jar
xwiki-platform-legacy-oldcore-3.2.jar
 and path is
xwiki-platform-legacy-oldcore-3.2.jar\com\xpn\xwiki\user\impl\xwiki. But in
the repository you guys pointed out same file
 lies under
xwiki-platform-core\xwiki-platform-oldcore\src\main\java\com\xpn\xwiki\user\impl\xwiki.
But in my dowloaded war file
 there is no jar by the name of  xwiki-platform-core or
xwiki-platform-oldcore. There is jar file with the name
xwiki-platform-legacy-oldcore-3.2.jar.
could you brief about this discrepency?

On Sun, Dec 11, 2011 at 6:52 PM, Vincent Massol vinc...@massol.net wrote:


 On Dec 10, 2011, at 7:30 PM, mohit gupta wrote:

  Thanks all for sharing the information. I started working on the xwiki
  project.
 
  I downloaded the war file xwiki-enterprise-web-3.2 and started  working
 on
  that. I have got some questions/issues  while working
  on this. These are:-
 
  1) Is it possible to  get the source code of xwiki java files so that if
  want have some understanding/or modification as per my
 requirements i can go ahead?

 See
 http://dev.xwiki.org/xwiki/bin/view/Community/SourceRepository#HGettingSources
 (I've updated the page with more information)

 Thanks
 -Vincent

  2) As i said earlier too, i want my customer authentication. So i
 explored
  the downloaded war file and found there is a property
xwiki.authentication.authclass inside xwiki.cfg file against which file
  name(com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl)
is written. So i can provide my own customer class say
  MyProjectXWikiAuthentication.java instead of WikiAuthServiceImpl.So
my question is in which library it should be packed with and what are
  interfaces/parent class it should extend how i can find
it out?
 
  it would be a great help if you some one can brief about each point?
 
 
  On Fri, Dec 2, 2011 at 11:53 PM, mohit gupta motgu...@gmail.com wrote:
 
 
  Thanks Andreas a lot for sharing the information. Let me explain what
 got
  from the links you have mentioned above.
 
  i typed the URL http://www.teamsched.com/docs or
 http://www.teamsched.com in
  address bar. Both link took me to http://www.teamsched.com/docs/info/
  which seems to be a xwiki site based on java classes which must be
 hosted
  on some webserver(can you name the webserver which you used for this).
 Now
  i click the hyperlink getting started given on this site which takes me
 to
  another web application  i.e http://shept.org/docs/Shept/(which is
 again
  some java application hosted on another instance of webserver ). Is that
  correct? If yes i  also need to do same kind of stuff. Thanks.
 
 
  On Fri, Dec 2, 2011 at 11:04 PM, Andreas Hahn ah...@gmx.net wrote:
 
 
  Hi mohit,
 
  I think I have done something similar a while ago.
  Look at http://www.teamsched.com.
 
  The explanatory stuff is hosted on an xwiki that is identified by the
  http://www.teamsched.com/docs
  part of the url.
  The real application based on shept.org (spring, hibernate, e.t.c.)
  (when you press 'Gettings started')
  http://www.teamsched.com/app
 
  It works more or less seamless yet the level of integration of both
 apps
  is a little shaky.
  There are no user accounts handed over from one to the other app.
  That should be possible but I hesitated to invest the necessary effort
 to
  figure it out.
  If that's what you are looking for I'll try to provide details.
 
  good luck
 
  Andreas
 
 
 
  Am 02.12.2011 11:31, schrieb mohit gupta:
 
 
  i have my banking webapplication on tomcat. i want to host my
 application
  help on xwiki which will sit on another server(probably
  xwiki will be having its on app server). Basically what i have to do
 is i
  want to provide a link on my banking application on click of which
  i want to take it to wiki help(help shoud not ask any credentialsat
  http://platform.xwiki.org/**xwiki/bin/view/DevGuide/**WebHome
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/WebHome
  )
  though it should ask for credential if i hit my xwiki URL directly.i
 am
  not getting how to start it?i have gone thru xwiki devguide but could
  not get much out of it. It would be great if somebody can give me
 heads
  up
  how can i can i start it at high level, it would be a great help.
  As xwiki site states many tools to download like
  manager,enterprise,platform. which tool one i shoud start with and
 what
  should be the starting point
  in that?
  i want to give the users to modify the wiki page on the basis of
 roles in
  my banking application. So my application and xwiki has to interact a
  lot.
  looking for how we can proceed for this. My application is using
 struts
  2.
 
  Another question i have is once i dowload xwiki enterprsise, should i
  host
  in seperate tomcat or downloaded xwiki application will 

Re: [xwiki-users] Integration of my webapplication with xwiki.

2011-12-12 Thread Thomas Mortagne
On Mon, Dec 12, 2011 at 8:13 PM, mohit gupta motgu...@gmail.com wrote:
 Thanks  Thomas Mortagne and Vincent a lot  for pointing out to repository.
 One question on Repository structure. i downloaded the
 xwiki-enterprise-web-3.2.war file and found out that
 XWikiAuthServiceImpl.class lies under  jar
 xwiki-platform-legacy-oldcore-3.2.jar
  and path is
 xwiki-platform-legacy-oldcore-3.2.jar\com\xpn\xwiki\user\impl\xwiki. But in
 the repository you guys pointed out same file
  lies under
 xwiki-platform-core\xwiki-platform-oldcore\src\main\java\com\xpn\xwiki\user\impl\xwiki.
 But in my dowloaded war file
  there is no jar by the name of  xwiki-platform-core or
 xwiki-platform-oldcore. There is jar file with the name
 xwiki-platform-legacy-oldcore-3.2.jar.
 could you brief about this discrepency?

xwiki-platform-legacy-oldcore is actually a bit special: it's
repackaging xwiki-platform-oldcore and inject some deprecated APIs to
it.


 On Sun, Dec 11, 2011 at 6:52 PM, Vincent Massol vinc...@massol.net wrote:


 On Dec 10, 2011, at 7:30 PM, mohit gupta wrote:

  Thanks all for sharing the information. I started working on the xwiki
  project.
 
  I downloaded the war file xwiki-enterprise-web-3.2 and started  working
 on
  that. I have got some questions/issues  while working
  on this. These are:-
 
  1) Is it possible to  get the source code of xwiki java files so that if
  want have some understanding/or modification as per my
     requirements i can go ahead?

 See
 http://dev.xwiki.org/xwiki/bin/view/Community/SourceRepository#HGettingSources
 (I've updated the page with more information)

 Thanks
 -Vincent

  2) As i said earlier too, i want my customer authentication. So i
 explored
  the downloaded war file and found there is a property
    xwiki.authentication.authclass inside xwiki.cfg file against which file
  name(com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl)
    is written. So i can provide my own customer class say
  MyProjectXWikiAuthentication.java instead of WikiAuthServiceImpl.So
    my question is in which library it should be packed with and what are
  interfaces/parent class it should extend how i can find
    it out?
 
  it would be a great help if you some one can brief about each point?
 
 
  On Fri, Dec 2, 2011 at 11:53 PM, mohit gupta motgu...@gmail.com wrote:
 
 
  Thanks Andreas a lot for sharing the information. Let me explain what
 got
  from the links you have mentioned above.
 
  i typed the URL http://www.teamsched.com/docs or
 http://www.teamsched.com in
  address bar. Both link took me to http://www.teamsched.com/docs/info/
  which seems to be a xwiki site based on java classes which must be
 hosted
  on some webserver(can you name the webserver which you used for this).
 Now
  i click the hyperlink getting started given on this site which takes me
 to
  another web application  i.e http://shept.org/docs/Shept/(which is
 again
  some java application hosted on another instance of webserver ). Is that
  correct? If yes i  also need to do same kind of stuff. Thanks.
 
 
  On Fri, Dec 2, 2011 at 11:04 PM, Andreas Hahn ah...@gmx.net wrote:
 
 
  Hi mohit,
 
  I think I have done something similar a while ago.
  Look at http://www.teamsched.com.
 
  The explanatory stuff is hosted on an xwiki that is identified by the
  http://www.teamsched.com/docs
  part of the url.
  The real application based on shept.org (spring, hibernate, e.t.c.)
  (when you press 'Gettings started')
  http://www.teamsched.com/app
 
  It works more or less seamless yet the level of integration of both
 apps
  is a little shaky.
  There are no user accounts handed over from one to the other app.
  That should be possible but I hesitated to invest the necessary effort
 to
  figure it out.
  If that's what you are looking for I'll try to provide details.
 
  good luck
 
  Andreas
 
 
 
  Am 02.12.2011 11:31, schrieb mohit gupta:
 
 
  i have my banking webapplication on tomcat. i want to host my
 application
  help on xwiki which will sit on another server(probably
  xwiki will be having its on app server). Basically what i have to do
 is i
  want to provide a link on my banking application on click of which
  i want to take it to wiki help(help shoud not ask any credentialsat
  http://platform.xwiki.org/**xwiki/bin/view/DevGuide/**WebHome
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/WebHome
  )
  though it should ask for credential if i hit my xwiki URL directly.i
 am
  not getting how to start it?i have gone thru xwiki devguide but could
  not get much out of it. It would be great if somebody can give me
 heads
  up
  how can i can i start it at high level, it would be a great help.
  As xwiki site states many tools to download like
  manager,enterprise,platform. which tool one i shoud start with and
 what
  should be the starting point
  in that?
  i want to give the users to modify the wiki page on the basis of
 roles in
  my banking application. So my application and xwiki has to interact a