|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
plexus configurationHi,
I use plexus container to start an openIm server on a webapp (xmpp server in java). In my component.xml, i use the AccountRepositoryHolder and the RosterListRepositoryHolder to manage account. I would like to configure these holders by giving us the path of my account.xml and roster-list.xml but i don't want to set an absolute path. I would like to set a relative path (with a current path which is the path of my webapp - for exemple : C:\Document and Setting\....\myWebApp) Do you know how to do that...? If it's not possible, i would create a variable (like plexus.home) named webapp.home and set this variable one time at the begin of the component.xml (or plexus.xml) and use it to configure the AccountRepositoryHolder and RosterListRepositoryHolder like : <configuration> <encoding>UTF-8</encoding> <filename>${webapp.home}/WEB-INF/storages/roster-list.xml</filename> </configuration> is it possible..? Thanks in advance, Mat |
|
|
Re: plexus configurationHi there,
first of all, this is the "Dev" list of plexus project, meant for developers working _on_ plexus. Your question should be posted to the "users" list (user@...). You did not specify in which environment and how are you using/booting plexus container. You said it is in a webapp, so i will presume you are using plexus-servlet. SVN of it's trunk is here (just for the reference): http://svn.codehaus.org/plexus/plexus-servlet/trunk/ By using plexus servlet, you have automatically defined a plexus context property "plexus.home", which points to /WEB-INF of your webapp. See setPlexusHome method here: http://svn.codehaus.org/plexus/plexus-servlet/trunk/src/main/java/org/codehaus/plexus/servlet/ServletContextUtils.java And you can use it in plexus.xml as ${plexus.home} for reference. BUT, this doesn't work in case if your servlet container doest not unpack the WAR before running it (it is up to servlet container config). For that case, you can use the second solution, as you proposed. AFAIK (and see from source), with plexus-servlet, by putting a "/WEB-INF/plexus.properties" file, you can define as much plexus context properties as you want. These properties can be then referenced in plexus.xml (and components.xml) as ${propertyName}, just as you wrote. And it should work. So, yes, it is possible :) Hope helps, ~t~ On Jan 29, 2008 9:57 AM, mathieu fabre <mathieufab@...> wrote: > Hi, > > I use plexus container to start an openIm server on a webapp (xmpp server in > java). > > In my component.xml, i use the AccountRepositoryHolder and the > RosterListRepositoryHolder to manage account. > I would like to configure these holders by giving us the path of my > account.xml and roster-list.xml > but i don't want to set an absolute path. > > I would like to set a relative path (with a current path which is the path > of my webapp - for exemple : C:\Document and Setting\....\myWebApp) > > Do you know how to do that...? > > If it's not possible, i would create a variable (like plexus.home) named > webapp.home and set this variable one time at the begin of the component.xml > (or plexus.xml) > and use it to configure the AccountRepositoryHolder and > RosterListRepositoryHolder like : > > <configuration> > <encoding>UTF-8</encoding> > <filename>${webapp.home}/WEB-INF/storages/roster-list.xml</filename> > </configuration> > > is it possible..? > > Thanks in advance, > > Mat > -- Thanks, ~t~ --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: plexus configurationI guess I should put the code in the open but we have the OpenIM
server that was originally based on Merlin but it's now been ported to Plexus. I just haven't had time to get it out. But I can send you an archive if you want to take a look. On 29-Jan-08, at 12:57 AM, mathieu fabre wrote: > Hi, > > I use plexus container to start an openIm server on a webapp (xmpp > server in java). > > In my component.xml, i use the AccountRepositoryHolder and the > RosterListRepositoryHolder to manage account. > I would like to configure these holders by giving us the path of my > account.xml and roster-list.xml > but i don't want to set an absolute path. > > I would like to set a relative path (with a current path which is > the path of my webapp - for exemple : C:\Document and Setting\.... > \myWebApp) > > Do you know how to do that...? > > If it's not possible, i would create a variable (like plexus.home) > named webapp.home and set this variable one time at the begin of the > component.xml (or plexus.xml) > and use it to configure the AccountRepositoryHolder and > RosterListRepositoryHolder like : > > <configuration> > <encoding>UTF-8</encoding> > <filename>${webapp.home}/WEB-INF/storages/roster-list.xml</ > filename> > </configuration> > > is it possible..? > > Thanks in advance, > > Mat Thanks, Jason ---------------------------------------------------------- Jason van Zyl Founder, Apache Maven jason at sonatype dot com ---------------------------------------------------------- In short, man creates for himself a new religion of a rational and technical order to justify his work and to be justified in it. -- Jacques Ellul, The Technological Society --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |