We just had a chat with Adam about the best way to handle
skinresources.jar. This jar is basically a skin template. It contains
the class part of a skin. We use it so that users would be able to
create skins by only creating a zip file with images and property/xml
files. SC then converts these zips to bundle jars by attaching the zip
content to that of skinresources.jar.
Now, the question is: how should we be handling this jar and where
should we be storing it.
We are currently building and deploying it in sc-bundles. The problem is
that in order to access it, we are currently using the "user.dir"
property (working directory) and the "sc-bundles" name in the code, and
we'd better not.
Ideally, we should be storing files that we need to access during
runtime in our resources directory. However the skinresources.jar does
not quite fit there either since it needs to be compiled, built, and
most importantly cleaned. It represents dynamic content and we don't
store such content in the "resources" dir.
After discussing this Yana, Lubo, and Adam, the following plan has emerged:
1. We are going to try and see whether we can somehow access the
sc-bundles directory through felix, without explicitly naming it
(I doubt this because we have never really defined the name anywhere
other than the individual bundle locations)
2. We get the bundle to actually start, then try to access it via the
bundle context, and then discover the jar location from there
(It is important to note that the bundle should only be installed and
not started so that we don't confuse it with an active skin. Adam this
means you would have to place it in an auto.install clause rather than
3. We crate a new directory in resources that we deem as dynamic and
cleanable and we generate the jar in there. We also update build.xml to
purge that directory when "clean: is called.
(In this case we are running the risk of people accidentally committing
the jar on SVN)
I actually have a 4. now but I'll put it in a reply to this mail since
it wasn't dicsussed during my chat with Adam.