You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Leen Toelen (JIRA)" <ji...@apache.org> on 2010/01/08 13:48:54 UTC
[jira] Created: (HADOOP-6484) OSGI headers in jar manifest
OSGI headers in jar manifest
----------------------------
Key: HADOOP-6484
URL: https://issues.apache.org/jira/browse/HADOOP-6484
Project: Hadoop Common
Issue Type: Improvement
Components: build
Reporter: Leen Toelen
When using hadoop inside an OSGI environment one needs to change the META-INF/MANIFEST.MF file to include OSGI headers (version and symbolic name). It would be convenient to do this in the default build.xml.
There are no runtime dependencies.
An easy way of doing this is to use the bnd ant task: http://www.aqute.biz/Code/Bnd
<target name="build">
<taskdef resource="aQute/bnd/ant/taskdef.properties"
classpath="bnd.jar"/>
<bnd
classpath="src"
eclipse="true"
failok="false"
exceptions="true"
files="test.bnd"/>
</target>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6484) OSGI headers in jar manifest
Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800805#action_12800805 ]
Steve Loughran commented on HADOOP-6484:
----------------------------------------
This could be useful
# It needs a proper patch file
# that new dependency would need to be build time only, property driven, etc
# I wouldn't do a <copy>/<move> that way as it effectively ignores timestamps and would take place every build. The manifest operation should only take place if the bar is older than the source jar.
# Is there a way for a unit test to check the manifest? Some test case that looks in the classpath for a resource?
> OSGI headers in jar manifest
> ----------------------------
>
> Key: HADOOP-6484
> URL: https://issues.apache.org/jira/browse/HADOOP-6484
> Project: Hadoop Common
> Issue Type: Improvement
> Components: build
> Reporter: Leen Toelen
>
> When using hadoop inside an OSGI environment one needs to change the META-INF/MANIFEST.MF file to include OSGI headers (version and symbolic name). It would be convenient to do this in the default build.xml.
> There are no runtime dependencies.
> An easy way of doing this is to use the bnd ant task: http://www.aqute.biz/Code/Bnd
> <target name="build">
> <taskdef resource="aQute/bnd/ant/taskdef.properties"
> classpath="bnd.jar"/>
> <bnd
> classpath="src"
> eclipse="true"
> failok="false"
> exceptions="true"
> files="test.bnd"/>
> </target>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-6484) OSGI headers in jar manifest
Posted by "Leen Toelen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-6484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799187#action_12799187 ]
Leen Toelen commented on HADOOP-6484:
-------------------------------------
ivy.xml:
<dependency org="biz.aQute" name="bnd" rev="0.0.169" conf="common->default"></dependency>
conf/hadoop-core.bnd.template:
Bundle-Version:${version}
Bundle-SymbolicName:org.apache.hadoop.common
Added to the jar section in build.xml:
<taskdef name="bndwrap" classname="aQute.bnd.ant.WrapTask">
<classpath refid="classpath" />
</taskdef>
<copy file="${conf.dir}/hadoop-core.bnd.template" tofile="${build.dir}/${final.name}.bnd" overwrite="true"/>
<bndwrap output="${build.dir}" definitions="${build.dir}">
<fileset dir="${build.dir}" includes="*.jar"/>
</bndwrap>
<move file="${build.dir}/${final.name}.bar" tofile="${build.dir}/${final.name}.jar" overwrite="true"/>
This generates an OSGI compatible manifest
> OSGI headers in jar manifest
> ----------------------------
>
> Key: HADOOP-6484
> URL: https://issues.apache.org/jira/browse/HADOOP-6484
> Project: Hadoop Common
> Issue Type: Improvement
> Components: build
> Reporter: Leen Toelen
>
> When using hadoop inside an OSGI environment one needs to change the META-INF/MANIFEST.MF file to include OSGI headers (version and symbolic name). It would be convenient to do this in the default build.xml.
> There are no runtime dependencies.
> An easy way of doing this is to use the bnd ant task: http://www.aqute.biz/Code/Bnd
> <target name="build">
> <taskdef resource="aQute/bnd/ant/taskdef.properties"
> classpath="bnd.jar"/>
> <bnd
> classpath="src"
> eclipse="true"
> failok="false"
> exceptions="true"
> files="test.bnd"/>
> </target>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.