On Fri, Jun 15, 2012 at 12:26 PM, Thomas Mortagne <thomas.mortagne(a)xwiki.com
wrote:
Hi devs,
Since I got some veto on
http://markmail.org/message/feavtmfokcsaalpo
lets cut all that in small peaces.
The today's episode is about finding what is the war we are running it
at runtime to list it in the core extensions (among other things it
allows to check for available updates).
Like the JAR packages, a WAR contains pom.xml file, problem is that
this pom.xml file is not in a "stable" location
(META-INF/<groupId>/<artifactId>/pom.xml) and I can't find any generic
way to scan a WAR like Reflection allows to scan jars files from the
classpath.
So as a last resort solution I propose to include the extension
identifier in the METAINF.MF at build time. This will give me the
entry point I need to find the pom.xml and gather more detailed
informations about the war to put it as core extension.
WDYT ?
Currently, I do not really see what it changes compare to our previous
thread.
Let me try to better explains myself with a similar example from another
domain.
In Javascript, you sometime needs to detect in which browser you are
running in, and we all know that this is bad.
The good way to do is to detect available features, and not the browser as
a whole.
I see the war here as the browser, and the deployed jars/xars as the
available features. Providing a way to know which was the initial WAR
deployed, is therefore encouraging the bad way to know what features are
available. This is even worse than in the browser detection, since XWiki is
really modular, and you can install a XEM war, but setup XE over it. So, I
really do not understand currently why you really want to better know on
which WAR you are running ?
Moving further in the future, we may expect to have a single minimal WAR,
and a bunch of extentions choosen freely by the user, using something
similar to a linux setup, using recommended groups of extensions to build a
XWiki well suited for this or that purpose. And therefore, the WAR will
completely loose its meaning. IMO, currently, a WAR is simply the minimal
core, and a pre-selected set of extensions, just to ease an initial setup.
After being deployed, it loose its meaning completely, and could fully
changed. I know that these "core" extensions are installed for ever, but
this more a limitation than a feature, except for the minimal needed set.
Could you explain why you really want to give that initial set of
extensions some properties as a whole ? or am I missing something
fundamental ?
+1
--
Thomas Mortagne
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Denis Gervalle
SOFTEC sa - CEO
eGuilde sarl - CTO