Details

    • Type: Wish Wish
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.7, 2.x
    • Component/s: None
    • Labels:
      None

      Description

      Velocity jar should be OSGi-ready with all necessary headers in MANIFEST.MF

        Issue Links

          Activity

          Hide
          Tamas Cserveny added a comment - - edited

          I think some of the imports should be marked as optional. ";resolution:=optional"

          Currently they are all needed even if no XML support and using eg. JDK14 logging.

          com.werken.xpath
          org.apache.commons.logging
          org.apache.log
          org.apache.log.format
          org.apache.log.output.io
          org.apache.log4j,
          org.apache.oro.text.perl
          org.apache.tools.ant
          org.apache.tools.ant.taskdefs
          org.jdom
          org.jdom.input
          org.jdom.output
          org.xml.sax

          I would suggest using maven-bundle-plugin(bnd) version 1.4.3 to generate the manifest, which can run with JDK14.

          Show
          Tamas Cserveny added a comment - - edited I think some of the imports should be marked as optional. ";resolution:=optional" Currently they are all needed even if no XML support and using eg. JDK14 logging. com.werken.xpath org.apache.commons.logging org.apache.log org.apache.log.format org.apache.log.output.io org.apache.log4j, org.apache.oro.text.perl org.apache.tools.ant org.apache.tools.ant.taskdefs org.jdom org.jdom.input org.jdom.output org.xml.sax I would suggest using maven-bundle-plugin(bnd) version 1.4.3 to generate the manifest, which can run with JDK14.
          Hide
          Maciej Biłas added a comment -

          Oh... it was meant to be different from #3 in a way that you can still have a script on the side that creates the MANIFEST.MF, but does take part directly in the build process, but I think it's needless to say. Sorry for the confusion.

          Show
          Maciej Biłas added a comment - Oh... it was meant to be different from #3 in a way that you can still have a script on the side that creates the MANIFEST.MF, but does take part directly in the build process, but I think it's needless to say. Sorry for the confusion.
          Hide
          Nathan Bubna added a comment -

          How exactly is that different than option #2? There is only one build process sanctioned for doing releases.

          Show
          Nathan Bubna added a comment - How exactly is that different than option #2? There is only one build process sanctioned for doing releases.
          Hide
          Maciej Biłas added a comment -

          Option 4:

          • Generate the manifest with Bundlor after all using JDK 1.5 and leave the 1.4 build process alone.
          Show
          Maciej Biłas added a comment - Option 4: Generate the manifest with Bundlor after all using JDK 1.5 and leave the 1.4 build process alone.
          Hide
          Nathan Bubna added a comment -

          Shame on me. Didn't actually test release task, for which we still require JDK1.4, while Bundlor requires 1.5. Here's the options i see:

          • Build non-OSGi-ready release for 1.7 and leave people to build their own manifests.
          • Bump the target JDK to 1.5 (No, building with 1.5 target 1.4 is not an option due to StringBuffer.append mess)
          • "Manually" build an OSGi-ready manifest with the jar tasks manifest sub-task. This means sticking a massive property like the one above into build.properties. But that would only be for 1.7. In 2.0, we'll be back to the Bundlor manifest.

          I'm inclined to go with option 3.

          Show
          Nathan Bubna added a comment - Shame on me. Didn't actually test release task, for which we still require JDK1.4, while Bundlor requires 1.5. Here's the options i see: Build non-OSGi-ready release for 1.7 and leave people to build their own manifests. Bump the target JDK to 1.5 (No, building with 1.5 target 1.4 is not an option due to StringBuffer.append mess) "Manually" build an OSGi-ready manifest with the jar tasks manifest sub-task. This means sticking a massive property like the one above into build.properties. But that would only be for 1.7. In 2.0, we'll be back to the Bundlor manifest. I'm inclined to go with option 3.
          Hide
          Nathan Bubna added a comment -

          Ok, the build.xml now support Bundlor-enhanced manifests for the jars (turned on by default in release task).

          Show
          Nathan Bubna added a comment - Ok, the build.xml now support Bundlor-enhanced manifests for the jars (turned on by default in release task).
          Hide
          Maciej Biłas added a comment -

          You can actually generate is automatically using tools like http://www.springsource.org/bundlor.

          If you use a Maven build process – there is a plugin available.

          Show
          Maciej Biłas added a comment - You can actually generate is automatically using tools like http://www.springsource.org/bundlor . If you use a Maven build process – there is a plugin available.
          Hide
          Nathan Bubna added a comment -

          Good grief. That Export-Package value looks like a maintenance nightmare. How did you generate that? Without some means to automate that or some dedicated contributors/committers, that is surely going to become stale in a hurry.

          Show
          Nathan Bubna added a comment - Good grief. That Export-Package value looks like a maintenance nightmare. How did you generate that? Without some means to automate that or some dedicated contributors/committers, that is surely going to become stale in a hurry.
          Hide
          Dmitry added a comment -

          Oh, well, about what is to be in manifest - actually, there should be actual version (Bundle-Version: 1.6.3) and something a bit more readable as Bundle-Name.

          Show
          Dmitry added a comment - Oh, well, about what is to be in manifest - actually, there should be actual version (Bundle-Version: 1.6.3) and something a bit more readable as Bundle-Name.
          Hide
          Dmitry added a comment -

          OSGI-able velocity bundle.

          Show
          Dmitry added a comment - OSGI-able velocity bundle.
          Hide
          Dmitry added a comment -

          Following should be added into META-INF/MANIFEST.MF
          Export-Package: org.apache.oro.text;uses:="org.apache.oro.util,org.apa
          che.oro.text.regex",org.apache.velocity.texen;uses:="org.apache.veloc
          ity,org.apache.velocity.util,org.apache.velocity.context,org.apache.v
          elocity.app",org.apache.commons.lang.enum;uses:="org.apache.commons.l
          ang",org.apache.commons.lang.enums;uses:="org.apache.commons.lang",or
          g.apache.oro.text.awk;uses:="org.apache.oro.text.regex",org.apache.co
          mmons.collections,org.apache.velocity.runtime.resource.util,org.apach
          e.velocity.anakia;uses:="org.jdom.output,com.werken.xpath,org.jdom,or
          g.jdom.input,org.apache.tools.ant,org.apache.commons.collections,org.
          apache.velocity.context,org.apache.tools.ant.taskdefs,org.xml.sax,org
          .apache.velocity,org.apache.velocity.util,org.apache.velocity.app",or
          g.apache.velocity.servlet;uses:="org.apache.velocity.runtime,org.apac
          he.velocity.exception,org.apache.velocity.context,javax.servlet,org.a
          pache.velocity,org.apache.velocity.util,org.apache.velocity.io,org.ap
          ache.velocity.app,javax.servlet.http",org.apache.velocity.util.intros
          pection;uses:="org.apache.velocity.runtime.log,org.apache.commons.lan
          g.text,org.apache.velocity.runtime,org.apache.commons.collections,org
          .apache.velocity.util,org.apache.velocity.runtime.parser.node",org.ap
          ache.velocity.context;uses:="org.apache.velocity.app.event,org.apache
          .velocity.util.introspection,org.apache.velocity.runtime.resource,org
          .apache.velocity.runtime.log,org.apache.velocity.runtime,org.apache.v
          elocity.util,org.apache.velocity.exception,org.apache.velocity.runtim
          e.parser.node",org.apache.oro.util,org.apache.commons.lang.mutable;us
          es:="org.apache.commons.lang,org.apache.commons.lang.math",org.apache
          .velocity.runtime.parser.node;uses:="org.apache.velocity.runtime.pars
          er,org.apache.velocity.context,org.apache.velocity.exception,org.apac
          he.velocity.runtime.directive,org.apache.velocity.runtime,org.apache.
          commons.lang.builder,org.apache.velocity.util,org.apache.velocity.run
          time.log,org.apache.velocity.util.introspection,org.apache.velocity.a
          pp.event,org.apache.commons.lang,org.apache.commons.lang.text",org.ap
          ache.commons.lang;uses:="org.apache.commons.lang.builder,org.apache.c
          ommons.lang.math,org.apache.commons.lang.exception",org.apache.common
          s.collections.iterators;uses:="org.apache.commons.collections",org.ap
          ache.velocity.texen.defaults,org.apache.commons.collections.map;uses:
          ="org.apache.commons.collections,org.apache.commons.collections.itera
          tors",org.apache.velocity.io;uses:="org.apache.velocity.util",org.apa
          che.velocity.app;uses:="org.apache.velocity.util,org.apache.velocity.
          runtime.log,org.apache.velocity.runtime,org.apache.commons.collection
          s,org.apache.velocity,org.apache.velocity.exception,org.apache.veloci
          ty.context",org.apache.commons.lang.exception;uses:="org.apache.commo
          ns.lang",org.apache.velocity.texen.util;uses:="org.apache.velocity.te
          xen",org.apache.commons.lang.text;uses:="org.apache.commons.lang",org
          .apache.velocity.runtime.directive;uses:="org.apache.velocity.runtime
          ,org.apache.velocity.exception,org.apache.velocity.context,org.apache
          .velocity.runtime.parser.node,org.apache.velocity.runtime.log,org.apa
          che.velocity.runtime.parser,org.apache.commons.lang.text,org.apache.v
          elocity.util.introspection,org.apache.velocity.app.event,org.apache.v
          elocity.runtime.resource,org.apache.velocity,org.apache.commons.colle
          ctions,org.apache.commons.lang",org.apache.velocity.app.event.impleme
          nt;uses:="org.apache.commons.lang,org.apache.velocity.runtime.log,org
          .apache.velocity.runtime,org.apache.commons.collections,org.apache.ve
          locity.util,org.apache.oro.text.perl,org.apache.velocity.app.event,or
          g.apache.velocity.util.introspection,org.apache.velocity.exception,or
          g.apache.velocity.context",org.apache.velocity.runtime;uses:="org.apa
          che.velocity.runtime.parser,org.apache.velocity.runtime.log,org.apach
          e.velocity.util,org.apache.velocity.exception,org.apache.velocity.con
          text,org.apache.velocity.runtime.directive,org.apache.commons.collect
          ions,org.apache.velocity,org.apache.velocity.runtime.resource,org.apa
          che.velocity.runtime.parser.node,org.apache.velocity.util.introspecti
          on,org.apache.velocity.app.event,org.apache.commons.lang.text,org.apa
          che.commons.lang,org.apache.velocity.runtime.resource.loader",org.apa
          che.velocity.runtime.defaults,org.apache.oro.io;uses:="org.apache.oro
          .text,org.apache.oro.text.awk,org.apache.oro.text.regex",org.apache.v
          elocity.convert;uses:="org.apache.velocity.util,org.apache.oro.text.p
          erl,org.apache.tools.ant",org.apache.velocity.runtime.parser;uses:="o
          rg.apache.velocity.runtime.parser.node,org.apache.velocity.runtime.lo
          g,org.apache.velocity.runtime.directive,org.apache.velocity.runtime,o
          rg.apache.velocity.exception",org.apache.velocity.exception;uses:="or
          g.apache.velocity.runtime.log,org.apache.velocity.runtime.parser,org.
          apache.velocity.util.introspection,org.apache.velocity.util",org.apac
          he.velocity.runtime.visitor;uses:="org.apache.velocity.context,org.ap
          ache.velocity.runtime.parser.node,org.apache.velocity.runtime.parser"
          ,org.apache.velocity.texen.ant;uses:="org.apache.velocity.texen,org.a
          pache.commons.collections,org.apache.velocity,org.apache.velocity.uti
          l,org.apache.velocity.exception,org.apache.velocity.context,org.apach
          e.velocity.app,org.apache.tools.ant",org.apache.oro.text.perl;uses:="
          org.apache.oro.text,org.apache.oro.text.regex,org.apache.oro.util",or
          g.apache.velocity.runtime.log;uses:="org.apache.velocity.runtime,org.
          apache.log,org.apache.log.output.io,org.apache.log.format,org.apache.
          commons.lang,org.apache.commons.logging,org.apache.velocity.runtime.d
          irective,org.apache.velocity.util.introspection,org.apache.velocity.r
          untime.parser.node,org.apache.log4j,org.apache.velocity.util,org.apac
          he.velocity.exception,javax.servlet",org.apache.velocity;uses:="org.a
          pache.velocity.runtime.log,org.apache.velocity.runtime,org.apache.vel
          ocity.runtime.parser,org.apache.velocity.exception,org.apache.velocit
          y.context,org.apache.velocity.runtime.resource,org.apache.velocity.ru
          ntime.parser.node,org.apache.velocity.runtime.resource.loader",org.ap
          ache.commons.lang.builder;uses:="org.apache.commons.lang.math,org.apa
          che.commons.lang",org.apache.velocity.util;uses:="org.apache.velocity
          .context,org.apache.velocity.runtime",org.apache.commons.lang.time;us
          es:="org.apache.commons.lang",org.apache.oro.text.regex,org.apache.ve
          locity.app.event;uses:="org.apache.velocity.runtime,org.apache.veloci
          ty.util,org.apache.velocity.context,org.apache.velocity.util.introspe
          ction",org.apache.velocity.runtime.resource;uses:="org.apache.velocit
          y.runtime.log,org.apache.velocity.runtime,org.apache.velocity.excepti
          on,org.apache.velocity.runtime.resource.loader,org.apache.commons.col
          lections.map,org.apache.velocity.util,org.apache.velocity,org.apache.
          commons.collections,org.apache.commons.lang",org.apache.velocity.app.
          tools;uses:="org.apache.velocity.context",org.apache.velocity.runtime
          .resource.loader;uses:="org.apache.velocity.runtime.log,org.apache.co
          mmons.collections,org.apache.velocity.util,org.apache.velocity.except
          ion,org.apache.velocity.runtime.resource,org.apache.commons.lang,java
          x.naming,javax.sql,org.apache.velocity.io,org.apache.velocity.runtime
          ,org.apache.velocity.runtime.resource.util",org.apache.commons.lang.m
          ath;uses:="org.apache.commons.lang"
          Bundle-Version: 0
          Bundle-Name: velocity-dep
          Bundle-ManifestVersion: 2
          Bundle-SymbolicName: velocity-dep

          I'll try to attach "osgi-ready" bundle to this issue

          Show
          Dmitry added a comment - Following should be added into META-INF/MANIFEST.MF Export-Package: org.apache.oro.text;uses:="org.apache.oro.util,org.apa che.oro.text.regex",org.apache.velocity.texen;uses:="org.apache.veloc ity,org.apache.velocity.util,org.apache.velocity.context,org.apache.v elocity.app",org.apache.commons.lang.enum;uses:="org.apache.commons.l ang",org.apache.commons.lang.enums;uses:="org.apache.commons.lang",or g.apache.oro.text.awk;uses:="org.apache.oro.text.regex",org.apache.co mmons.collections,org.apache.velocity.runtime.resource.util,org.apach e.velocity.anakia;uses:="org.jdom.output,com.werken.xpath,org.jdom,or g.jdom.input,org.apache.tools.ant,org.apache.commons.collections,org. apache.velocity.context,org.apache.tools.ant.taskdefs,org.xml.sax,org .apache.velocity,org.apache.velocity.util,org.apache.velocity.app",or g.apache.velocity.servlet;uses:="org.apache.velocity.runtime,org.apac he.velocity.exception,org.apache.velocity.context,javax.servlet,org.a pache.velocity,org.apache.velocity.util,org.apache.velocity.io,org.ap ache.velocity.app,javax.servlet.http",org.apache.velocity.util.intros pection;uses:="org.apache.velocity.runtime.log,org.apache.commons.lan g.text,org.apache.velocity.runtime,org.apache.commons.collections,org .apache.velocity.util,org.apache.velocity.runtime.parser.node",org.ap ache.velocity.context;uses:="org.apache.velocity.app.event,org.apache .velocity.util.introspection,org.apache.velocity.runtime.resource,org .apache.velocity.runtime.log,org.apache.velocity.runtime,org.apache.v elocity.util,org.apache.velocity.exception,org.apache.velocity.runtim e.parser.node",org.apache.oro.util,org.apache.commons.lang.mutable;us es:="org.apache.commons.lang,org.apache.commons.lang.math",org.apache .velocity.runtime.parser.node;uses:="org.apache.velocity.runtime.pars er,org.apache.velocity.context,org.apache.velocity.exception,org.apac he.velocity.runtime.directive,org.apache.velocity.runtime,org.apache. commons.lang.builder,org.apache.velocity.util,org.apache.velocity.run time.log,org.apache.velocity.util.introspection,org.apache.velocity.a pp.event,org.apache.commons.lang,org.apache.commons.lang.text",org.ap ache.commons.lang;uses:="org.apache.commons.lang.builder,org.apache.c ommons.lang.math,org.apache.commons.lang.exception",org.apache.common s.collections.iterators;uses:="org.apache.commons.collections",org.ap ache.velocity.texen.defaults,org.apache.commons.collections.map;uses: ="org.apache.commons.collections,org.apache.commons.collections.itera tors",org.apache.velocity.io;uses:="org.apache.velocity.util",org.apa che.velocity.app;uses:="org.apache.velocity.util,org.apache.velocity. runtime.log,org.apache.velocity.runtime,org.apache.commons.collection s,org.apache.velocity,org.apache.velocity.exception,org.apache.veloci ty.context",org.apache.commons.lang.exception;uses:="org.apache.commo ns.lang",org.apache.velocity.texen.util;uses:="org.apache.velocity.te xen",org.apache.commons.lang.text;uses:="org.apache.commons.lang",org .apache.velocity.runtime.directive;uses:="org.apache.velocity.runtime ,org.apache.velocity.exception,org.apache.velocity.context,org.apache .velocity.runtime.parser.node,org.apache.velocity.runtime.log,org.apa che.velocity.runtime.parser,org.apache.commons.lang.text,org.apache.v elocity.util.introspection,org.apache.velocity.app.event,org.apache.v elocity.runtime.resource,org.apache.velocity,org.apache.commons.colle ctions,org.apache.commons.lang",org.apache.velocity.app.event.impleme nt;uses:="org.apache.commons.lang,org.apache.velocity.runtime.log,org .apache.velocity.runtime,org.apache.commons.collections,org.apache.ve locity.util,org.apache.oro.text.perl,org.apache.velocity.app.event,or g.apache.velocity.util.introspection,org.apache.velocity.exception,or g.apache.velocity.context",org.apache.velocity.runtime;uses:="org.apa che.velocity.runtime.parser,org.apache.velocity.runtime.log,org.apach e.velocity.util,org.apache.velocity.exception,org.apache.velocity.con text,org.apache.velocity.runtime.directive,org.apache.commons.collect ions,org.apache.velocity,org.apache.velocity.runtime.resource,org.apa che.velocity.runtime.parser.node,org.apache.velocity.util.introspecti on,org.apache.velocity.app.event,org.apache.commons.lang.text,org.apa che.commons.lang,org.apache.velocity.runtime.resource.loader",org.apa che.velocity.runtime.defaults,org.apache.oro.io;uses:="org.apache.oro .text,org.apache.oro.text.awk,org.apache.oro.text.regex",org.apache.v elocity.convert;uses:="org.apache.velocity.util,org.apache.oro.text.p erl,org.apache.tools.ant",org.apache.velocity.runtime.parser;uses:="o rg.apache.velocity.runtime.parser.node,org.apache.velocity.runtime.lo g,org.apache.velocity.runtime.directive,org.apache.velocity.runtime,o rg.apache.velocity.exception",org.apache.velocity.exception;uses:="or g.apache.velocity.runtime.log,org.apache.velocity.runtime.parser,org. apache.velocity.util.introspection,org.apache.velocity.util",org.apac he.velocity.runtime.visitor;uses:="org.apache.velocity.context,org.ap ache.velocity.runtime.parser.node,org.apache.velocity.runtime.parser" ,org.apache.velocity.texen.ant;uses:="org.apache.velocity.texen,org.a pache.commons.collections,org.apache.velocity,org.apache.velocity.uti l,org.apache.velocity.exception,org.apache.velocity.context,org.apach e.velocity.app,org.apache.tools.ant",org.apache.oro.text.perl;uses:=" org.apache.oro.text,org.apache.oro.text.regex,org.apache.oro.util",or g.apache.velocity.runtime.log;uses:="org.apache.velocity.runtime,org. apache.log,org.apache.log.output.io,org.apache.log.format,org.apache. commons.lang,org.apache.commons.logging,org.apache.velocity.runtime.d irective,org.apache.velocity.util.introspection,org.apache.velocity.r untime.parser.node,org.apache.log4j,org.apache.velocity.util,org.apac he.velocity.exception,javax.servlet",org.apache.velocity;uses:="org.a pache.velocity.runtime.log,org.apache.velocity.runtime,org.apache.vel ocity.runtime.parser,org.apache.velocity.exception,org.apache.velocit y.context,org.apache.velocity.runtime.resource,org.apache.velocity.ru ntime.parser.node,org.apache.velocity.runtime.resource.loader",org.ap ache.commons.lang.builder;uses:="org.apache.commons.lang.math,org.apa che.commons.lang",org.apache.velocity.util;uses:="org.apache.velocity .context,org.apache.velocity.runtime",org.apache.commons.lang.time;us es:="org.apache.commons.lang",org.apache.oro.text.regex,org.apache.ve locity.app.event;uses:="org.apache.velocity.runtime,org.apache.veloci ty.util,org.apache.velocity.context,org.apache.velocity.util.introspe ction",org.apache.velocity.runtime.resource;uses:="org.apache.velocit y.runtime.log,org.apache.velocity.runtime,org.apache.velocity.excepti on,org.apache.velocity.runtime.resource.loader,org.apache.commons.col lections.map,org.apache.velocity.util,org.apache.velocity,org.apache. commons.collections,org.apache.commons.lang",org.apache.velocity.app. tools;uses:="org.apache.velocity.context",org.apache.velocity.runtime .resource.loader;uses:="org.apache.velocity.runtime.log,org.apache.co mmons.collections,org.apache.velocity.util,org.apache.velocity.except ion,org.apache.velocity.runtime.resource,org.apache.commons.lang,java x.naming,javax.sql,org.apache.velocity.io,org.apache.velocity.runtime ,org.apache.velocity.runtime.resource.util",org.apache.commons.lang.m ath;uses:="org.apache.commons.lang" Bundle-Version: 0 Bundle-Name: velocity-dep Bundle-ManifestVersion: 2 Bundle-SymbolicName: velocity-dep I'll try to attach "osgi-ready" bundle to this issue
          Hide
          Will Glass-Husain added a comment -

          Responding to this old issue. If you can provide detail as to what should be included we can put it in.

          Show
          Will Glass-Husain added a comment - Responding to this old issue. If you can provide detail as to what should be included we can put it in.

            People

            • Assignee:
              Unassigned
              Reporter:
              Stevo Slavic
            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development