On Sat, Jun 16, 2012 at 10:05 AM, Thomas Mortagne <[email protected] > wrote:
> On Fri, Jun 15, 2012 at 7:18 PM, Denis Gervalle <[email protected]> wrote: > > On Fri, Jun 15, 2012 at 12:26 PM, Thomas Mortagne < > [email protected] > >> 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 ? > > This comparison does not make any sense. It's like saying a browser > should not know its own version to be sure it's not going to indicate > it. > Finally, trying to make analogy to clarify my point does not make it :( There is absolutely no issue with putting somewhere the version of the core, but this is for me completely different to put in the distribution. > If you had read my mail more carefully you would have seen one example > I gave: "among other things it allows to check for available updates". > I had read it carefully ! So the only goal would be to automate the update of the war itself ? Not sure to know if this could be done, but you may have a better view than I have on this specific point. I do not see the exact relation with EM however. So, if your goal is to build a war upgrade procedure, when the war has been the deployment method, than you have probably the only valid use case IMO, and you have my agreement, but this is really lot of work for a very simple admin procedure for which containers already provide an interface. > This is one of the perfectly valid use case for wanting to know what > is the distribution and there is others I'm sure. For example right > Really curious to know about other valid usages, and in particular, to know how to avoid bad one. > now by default you get the distribution name and version in the footer > and this is done by putting it in the name in XWikiPreferences page at > build time which could hardly be worst. It will also make the > version.properties useless and all the build configuration to generate > it since you will get a generic API to get the version of the > distribution and also any extension like you can do already. > AFAIK, we have only 2 distributions, XE and XEM, and the difference between these two wars are really small. This is probably mainly why I do not understand your goals. Writing the distribution next to the version is not so easy since you may setup the XEM war and finally use it as you would use XE. or the reverse. > > > > 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 > > Linux is not a good example for what you are trying to say. Many > distributions like Ubuntu to cite just one have the concept of > distribution as a whole with version and distribution upgrade. I was not referring to distributions, but to the way dselect provided a presets features for different purposes. Which only append at initial setup, but does not persist later. Upgrading later, is only based on installed packages. > > 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. > > Please lets do things one step at a time. Also don't assume that the > future is settled, I still don't agree with you that it is a good > thing to completely loose the concept of XWiki distribution that you > can upgrade etc. > Ok, maybe you should currently explains me what is the advantages of the two distributions we have. I have already found this so confusing, because you can so easily switch from one to the other without reinstallation. > It's not like I was proposing a very complex thing that is going to > make XWiki stuck for any evolution of the architecture, it's just > adding one perfectly valid information to the MANIFEST.MF file. This > This exactly the meaning of what you want to add that I do not understand. > is not something built at the hearth of extension manager that you are > running in a WAR, it's just one more information when this information > is available. It will not change anything at all in the way to deal > with extensions in general. > > > > > 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 ? > > Where did I said exactly that I want to replace the list of core > extensions by the single WAR entry ? The goal is not to make all > extensions put the war as dependency instead of the proper core > extensions but to provide an information that should be provided > simply because it exists and can be useful. > If the information as no meaning, it would be useless. So what is the meaning of that information ? XE and XEM are so similar, and each could be turned into the other one with very simple configuration changes. So I do not understand the meaning of the information you are adding, and for which use case it is valid to be used. The fear that a bad developer will put XWiki Enterprise 4.0 as > dependency instead of listing the actual modules his extension needs > should not prevent us to provide this information for other needs than > dependency resolution. > No fear of that, only of the meaning and usage intended for the information you were adding. > > > > > > > > >> > >> +1 > >> -- > >> Thomas Mortagne > >> _______________________________________________ > >> devs mailing list > >> [email protected] > >> http://lists.xwiki.org/mailman/listinfo/devs > >> > > > > > > > > -- > > Denis Gervalle > > SOFTEC sa - CEO > > eGuilde sarl - CTO > > _______________________________________________ > > devs mailing list > > [email protected] > > http://lists.xwiki.org/mailman/listinfo/devs > > > > -- > Thomas Mortagne > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > -- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

