You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Nathan Bubna (JIRA)" <de...@velocity.apache.org> on 2010/09/01 18:36:53 UTC

[jira] Resolved: (VELOCITY-768) Mark optional dependencies as optional in OSGi bundle manifest

     [ https://issues.apache.org/jira/browse/VELOCITY-768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna resolved VELOCITY-768.
-----------------------------------

    Resolution: Fixed

Fixed in 1.7. 
2.0 will probably use Maven to generate the manifest.

> Mark optional dependencies as optional in OSGi bundle manifest
> --------------------------------------------------------------
>
>                 Key: VELOCITY-768
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-768
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Build
>    Affects Versions: 2.0
>            Reporter: Matt Ryall
>             Fix For: 1.7
>
>         Attachments: VELOCITY-768_mark_optional_deps_in_manifest_v1.patch
>
>
> Trying to use the Velocity 1.7-beta1 JAR in our OSGi container (Felix running in Atlassian Confluence), we ran into dependency problems because all the dependencies of Velocity are marked as mandatory.
> As you would know, Velocity has a logging abstraction which allows different logging frameworks to be used. Likewise, you don't need the servlet API to use Velocity. However, these dependencies are marked as required in the new OSGi manifest added in VELOCITY-694. This causes the bundle to fail to start because the dependencies are missing.
> From our testing, we could use Velocity in our application just fine with following imports changed to be optional:
>     * com.werken.xpath
>     * javax.servlet
>     * javax.servlet.http
>     * 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
> That means changing the current Import-Package declaration from this:
> Import-Package: com.werken.xpath,
>  javax.naming,
>  javax.servlet,
>  javax.servlet.http,
>  javax.sql,
>  org.apache.commons.collections,
>  org.apache.commons.collections.map,
>  org.apache.commons.lang,
>  org.apache.commons.lang.builder,
>  org.apache.commons.lang.text,
>  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
> to this:
> Import-Package: com.werken.xpath;resolution:=optional,
>  javax.naming,
>  javax.servlet;resolution:=optional,
>  javax.servlet.http;resolution:=optional,
>  javax.sql,
>  org.apache.commons.collections,
>  org.apache.commons.collections.map,
>  org.apache.commons.lang,
>  org.apache.commons.lang.builder,
>  org.apache.commons.lang.text,
>  org.apache.commons.logging;resolution:=optional,
>  org.apache.log;resolution:=optional,
>  org.apache.log.format;resolution:=optional,
>  org.apache.log.output.io;resolution:=optional,
>  org.apache.log4j;resolution:=optional,
>  org.apache.oro.text.perl;resolution:=optional,
>  org.apache.tools.ant;resolution:=optional,
>  org.apache.tools.ant.taskdefs;resolution:=optional,
>  org.jdom;resolution:=optional,
>  org.jdom.input;resolution:=optional,
>  org.jdom.output;resolution:=optional,
>  org.xml.sax
> I'll prepare a patch against trunk and attach it shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org