#428 auto-add release info to users-guide.xsl from properties

closed-fixed
None
5
2013-02-28
2012-03-01
Alan Ezust
No

The build-support doc build scripts should automatically add a <releaseinfo> element to the docbook doc (or something at a further stage in the transformation process) with the correct version number, so it does not need to be changed in 2 places in each plugin, and the docs will always match the properties in the plugin itself.

Discussion

  • Jarek Czekalski

    Jarek Czekalski - 2012-03-01

    Alan, could you pull out the release info into a separate file, for example release-info.xml? If the file is simple, it can be regenerated with each build. Until the automat is done, the file's content will be updated manually.

     
  • Alan Ezust

    Alan Ezust - 2012-03-01

    Actually, it can be done in users-guide.xsl without any modification to the original document, with the right xsl/ant knowledge.

     
  • Alan Ezust

    Alan Ezust - 2012-03-01
    • summary: auto-add <releaseinfo> to docs from build-support --> auto-add release info to users-guide.xsl from properties
     
  • Eric Le Lay

    Eric Le Lay - 2013-02-04
    • assigned_to: nobody --> kerik-sf
     
  • Eric Le Lay

    Eric Le Lay - 2013-02-18

    here is a patch to do that.
    It contains a bit of script in plugin-build.xml to be able to guess the plugin.version property. I couldn't figure out how to do it in plain ant, since it must load a fileset of property files, then get the matching property (contains variable YOURPLUGINCLASS in plugin.YOURPLUGINCLASS.version). But it should work for everybody since javascript engine is included since jdk 6 and we don't support java 5 anymore.

    How to be convinced that it works ?
    Try it on SpellCheck plugin:
    ant userdocs => you get R007 in the header of the userguide.
    remove the <releaseinfo>R007</releaseinfo> element from docs/users-guide.xml
    ant usedocs => you get R008 in the header of the userguide.

    The releaseinfo contained in the users-guide.xml could be overriden, but it seems better to let the developer win.

    If nobody objects, I'll commit it in a week. Then I guess it'll be picked by the dailies server...

     
  • Eric Le Lay

    Eric Le Lay - 2013-02-27

    committed in r22816

     
  • Eric Le Lay

    Eric Le Lay - 2013-02-27
    • status: open --> closed-fixed
     
  • Alan Ezust

    Alan Ezust - 2013-02-27

    Sorry I was unable to test before you committed, but I just svn updated and I get the following error trying to build console. Seems I am missing a jar?
    BUILD FAILED
    /home/ezust/workspace/jedit/plugins/Console/build.xml:19: The following error occurred while executing this line:
    /home/ezust/workspace/jedit/build-support/plugin-build.xml:61: javax.script.ScriptException: sun.org.mozilla.javascript.EvaluatorException: Can't find method org.apache.tools.ant.Project.getProperty(). (<Unknown source>#13) in <Unknown source> at line number 13
    at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:183)
    at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:199)
    at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:108)
    at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
    at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103)
    at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67)
    at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:169)
    at org.apache.tools.ant.taskdefs.ImportTask.importResource(ImportTask.java:225)
    at org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:163)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:180)
    at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
    at org.apache.tools.ant.Main.runBuild(Main.java:793)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
    Caused by: sun.org.mozilla.javascript.EvaluatorException: Can't find method org.apache.tools.ant.Project.getProperty(). (<Unknown source>#13)
    at sun.org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
    at sun.org.mozilla.javascript.Context.reportRuntimeError(Context.java:945)
    at sun.org.mozilla.javascript.Context.reportRuntimeError(Context.java:1001)
    at sun.org.mozilla.javascript.Context.reportRuntimeError1(Context.java:964)
    at sun.org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:166)
    at sun.org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119)
    at sun.org.mozilla.javascript.gen._Unknown_source__3._c_script_0(<Unknown source>:13)
    at sun.org.mozilla.javascript.gen._Unknown_source__3.call(<Unknown source>)
    at sun.org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
    at com.sun.script.javascript.RhinoScriptEngine$1.superDoTopCall(RhinoScriptEngine.java:112)
    at com.sun.script.javascript.RhinoScriptEngine$1.doTopCall(RhinoScriptEngine.java:105)
    at sun.org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
    at sun.org.mozilla.javascript.gen._Unknown_source__3.call(<Unknown source>)
    at sun.org.mozilla.javascript.gen._Unknown_source__3.exec(<Unknown source>)
    at sun.org.mozilla.javascript.Context.evaluateReader(Context.java:1142)
    at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:173)
    ... 35 more

     
  • Alan Ezust

    Alan Ezust - 2013-02-27
    • status: closed-fixed --> open-fixed
     
  • Eric Le Lay

    Eric Le Lay - 2013-02-27

    my mistake: I had done a bit of grooming after testing
    Should be good in r22817

     
  • Alan Ezust

    Alan Ezust - 2013-02-28

    works for me now!

     
  • Alan Ezust

    Alan Ezust - 2013-02-28
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.