[opencms-dev] some newbie questions

Eugeny N Dzhurinsky bofh at redwerk.com
Fri Aug 11 13:18:17 CEST 2006


On Fri, Aug 11, 2006 at 10:48:27AM +0100, Jonathan Woods wrote:
> Eugeny -
> 
> 0.  A module is, literally speaking, some VFS resources rooted at
> /system/modules, together with configuration XML in opencms-modules.xml.
> The module's VFS resources have a reasonably standard structure - for
> example, OpenCms will make JAR files in folder /system/modules/<module
> folder name>/lib accessible to the OpenCms-wide classpath.  Other folders or
> parts of the module structure have names which are de facto (rather than
> absolute) standards, but it's best to be consistent with general usage.  I
> guess the best exposition of this subject is to be found in Matt Butcher's
> book on OpenCms (published by Packt).
> 
> When OpenCms starts up, it loads things like resource types, search Lucene
> Document factories according to its default configuration and any
> configuration you applied during installation; then it looks in
> opencms-modules.xml and adds resource types etc etc from the configuration
> it finds there.
> 
> 1.  (a) The best way to create a module is to develop and manage its
> resources in an IDE like Eclipse, and then to upload them to your OpenCms
> instance by some means.  I use an Ant build target and a fair bit of shell
> scripting; other people are trying the Eclipse VFS plugin, which allows you
> to make the VFS accessible to Eclipse.

Umm, I'm not sure how to use Eclipse for that (I'm using eclipse for several
years now). Do I need some plugin which helps to create modules?

Also it's still not clear for me, what is module. I tried to export some
modules from OpenCMS as archives to take a look at tit, but it didn't do the
trick - I was unable to get JAR or ZIP file :(

May be you can share your ant script for building and installing a module?

> 2.  Modules aren't really accessible as modules in JSPs etc: it's the
> resources provided by modules which are.  That is, if your module provides
> JSPs page1.jsp and page2.jsp and (in a module .jar file) class MyClass, then
> you can refer to these directly in JSPs (and indeed any Java code) you
> develop.

So my module should provide some JSPs which will be simply included into other
JSP pages, correct?

> 4.  I soon got over my reluctance to modify OpenCms-distributed resources
> (other than opencms.war).  I think all OpenCms config files - especially
> opencms-modules.xml, opencms-vfs.xml etc - should be maintained in your IDE
> and installable/updateable as part of your development process.  If you run
> things in other web app contexts, I imagine that will end up causing you
> other problems - but maybe other people can answer this better.

I think if OpenCMS would provide something like JSR-168 reference
implementation, it would be extremely good for developers. Portlets really
rocks. Just a thought :)

-- 
Eugene N Dzhurinsky



More information about the opencms-dev mailing list