blob: bb183308b869d463adc7758843740d7adf899339 [file] [log] [blame]
<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter&nbsp;7.&nbsp;Detecting Manifest Requirements</title><meta content="DocBook XSL Stylesheets V1.76.0" name="generator"><link rel="home" href="index.html" title="Bundlor User Guide"><link rel="up" href="index.html" title="Bundlor User Guide"><link rel="prev" href="ch06s02.html" title="Using OSGi profiles with Bundlor"><link rel="next" href="ch07s02.html" title="Spring Context Configuration Detection Criteria"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><td align="left" width="20%"><a accesskey="p" href="ch06s02.html">Prev</a>&nbsp;</td><th align="center" width="60%">&nbsp;</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="ch07s02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter&nbsp;7.&nbsp;Detecting Manifest Requirements"><div class="titlepage"><div><div><h2 class="title"><a name="detecting"></a>Chapter&nbsp;7.&nbsp;Detecting Manifest Requirements</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch07.html#detecting.java">Java Detection Criteria</a></span></dt><dd><dl><dt><span class="section"><a href="ch07.html#N10607">Export Package</a></span></dt><dt><span class="section"><a href="ch07.html#N1060C">Import Package</a></span></dt></dl></dd><dt><span class="section"><a href="ch07s02.html">Spring Context Configuration Detection Criteria</a></span></dt><dd><dl><dt><span class="section"><a href="ch07s02.html#N10646">Spring Context Values</a></span></dt></dl></dd><dt><span class="section"><a href="ch07s03.html">Blueprint Service Configuration Detection Criteria</a></span></dt><dd><dl><dt><span class="section"><a href="ch07s03.html#N106BC">Blueprint Configuration Values</a></span></dt></dl></dd><dt><span class="section"><a href="ch07s04.html">Web Application File Detection Criteria</a></span></dt><dd><dl><dt><span class="section"><a href="ch07s04.html#N106FE"><code class="literal">web.xml</code> Values</a></span></dt></dl></dd><dt><span class="section"><a href="ch07s05.html"><code class="literal">Bundle-Classpath</code> File Detection Criteria</a></span></dt><dt><span class="section"><a href="ch07s06.html">JPA Detection Criteria</a></span></dt><dd><dl><dt><span class="section"><a href="ch07s06.html#N10775"><code class="literal">persistence.xml</code> Values</a></span></dt><dt><span class="section"><a href="ch07s06.html#N10787"><code class="literal">orm.xml</code> Values</a></span></dt></dl></dd><dt><span class="section"><a href="ch07s07.html">EclipseLink Detection Criteria</a></span></dt><dd><dl><dt><span class="section"><a href="ch07s07.html#N107E0"><code class="literal">eclipselink-orm.xml</code> Values</a></span></dt></dl></dd><dt><span class="section"><a href="ch07s08.html">Hibernate Mapping File Detection Criteria</a></span></dt><dd><dl><dt><span class="section"><a href="ch07s08.html#N10891">Hibernate Attributes</a></span></dt><dt><span class="section"><a href="ch07s08.html#N108DC">Hibernate Keywords</a></span></dt></dl></dd><dt><span class="section"><a href="ch07s09.html">JSP File Detection Criteria</a></span></dt><dd><dl><dt><span class="section"><a href="ch07s09.html#N109A2">JSP Values</a></span></dt></dl></dd><dt><span class="section"><a href="ch07s10.html">Log4J Configuration Detection Criteria</a></span></dt><dd><dl><dt><span class="section"><a href="ch07s10.html#N109B4">Log4J Configuration Values</a></span></dt></dl></dd><dt><span class="section"><a href="ch07s11.html">Static Resource Detection Criteria</a></span></dt></dl></div><p>
Bundlor's main function is to scan an existing JAR file and determine its runtime dependencies. With this
information it can then generate the OSGi-compliant manifest headers needed for proper runtime operation. This
analysis is comprised of looking for class references and class names in Java classes and certain well-known
file types.
</p><div class="section" title="Java Detection Criteria"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="detecting.java"></a>Java Detection Criteria</h2></div></div></div><p>
Bundlor scans any Java class it can find in the artifact created by the underlying build system. This means
that if a build process has custom behavior (i.e. weaving with AspectJ or <code class="literal">jarjar</code>ing),
Bundlor will be able to see and analyze the changes made by that process as long as the changes are in the
artifact created by the build system.
</p><p>
There are a number of places in a Java class that another Java type can be referenced from. Bundlor detects
these references and adds manifest requirements for them.
</p><div class="section" title="Export Package"><div class="titlepage"><div><div><h3 class="title"><a name="N10607"></a>Export Package</h3></div></div></div><p>
Bundlor exports any package that contains a class.
</p></div><div class="section" title="Import Package"><div class="titlepage"><div><div><h3 class="title"><a name="N1060C"></a>Import Package</h3></div></div></div><p>
The following is a list of the places that Bundlor will search for type names
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">Declared Type Superclass Types</li><li class="listitem">Declared Type Implemented Interfaces Types</li><li class="listitem">Declared Type Annotation Types</li><li class="listitem">Declared Field Types</li><li class="listitem">Declared Field Values Types</li><li class="listitem">Declared Method Argument Types</li><li class="listitem">Declared Method Return Types</li><li class="listitem">Declared Method Exception Types</li><li class="listitem">Declared Method Annotation Types</li><li class="listitem">Reference To Field Owner Type</li><li class="listitem">Reference To Field Type</li><li class="listitem">Declared Local Variable Type</li><li class="listitem">Reference to Method Declaring Type</li><li class="listitem">Reference to Method Return Type</li><li class="listitem">Reference to Method Argument Types</li><li class="listitem">Allocation of Array Type</li><li class="listitem">Declared Parameter Annotation Types</li><li class="listitem">Caught Exception Type</li><li class="listitem">Instantiated Type</li><li class="listitem">Cast Target Type</li><li class="listitem">Instanceof Type</li><li class="listitem">Declared Constant Type</li></ul></div><p>
</p></div></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="ch06s02.html">Prev</a>&nbsp;</td><td align="center" width="20%">&nbsp;</td><td align="right" width="40%">&nbsp;<a accesskey="n" href="ch07s02.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;</td></tr></table></div></body></html>