felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Felix > Sigil Projects
Date Wed, 16 Sep 2009 14:27:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=FELIX&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/FELIX/Sigil+Projects">Sigil
Projects</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~dsavage@apache.org">David
Savage</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <h1><a name="SigilProjects-SigilProjects"></a>Sigil Projects</h1>

<p>This page is meant as an overview of how to set up sigil projects, for an in depth
look at the file format see <a href="/confluence/display/FELIX/Sigil+Properties" title="Sigil
Properties">Sigil Properties</a>.</p>
<h3><a name="SigilProjects-Basics"></a>Basics</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>sigil.properties</b></div><div
class="codeContent panelContent">
<pre class="code-java">
-bundles: org.foo
-version: 1.0.0
-exports: org.foo.api
-imports: org.foo.api
-sourcedirs: src
</pre>
</div></div>

<p>This describes a bundle with symbolic name org.foo that has version 1.0.0 and embeds
all java classes found in the folder src within our bundle. It exports the package org.foo.api
and imports the package org.foo.api. If we assume that the src folder contains classes in
the package org.foo.api then both the exports and imports will also inherit the version from
the bundle (as no explicit version is specified).</p>

<h3><a name="SigilProjects-Versionmanagement"></a>Version management</h3>

<p>If we wanted to have explicit control we could do:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>sigil.properties</b></div><div
class="codeContent panelContent">
<pre class="code-java">
-bundles: org.foo
-version: 1.1.0
-exports: org.foo.api;version=1.1.1
-imports: org.foo.api;version=[1.0,1.2)
-sourcedirs: src
</pre>
</div></div>

<h3><a name="SigilProjects-Multiprojectbuilds"></a>Multi project builds</h3>

<p>You can also set default versions and import ranges in your project hierarchy so
leaf projects inherit the version strategy of their parent:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>+ project
   + sigil-defaults.properties
   + leaf-project
      + sigil.properties
      + src
         + org
            + foo
               + api
                  + Foo.java
</pre>
</div></div>

<p>If we define in sigil-defaults.properties:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>sigil-defaults.properties</b></div><div
class="codeContent panelContent">
<pre class="code-java">
version: 1.1.0
<span class="code-keyword">package</span>;org.foo.api: [1.0,1.2)
</pre>
</div></div>

<p>Then we could change our sigil.properties file to:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>sigil.properties</b></div><div
class="codeContent panelContent">
<pre class="code-java">
-bundles: org.foo
-exports: org.foo.api;version=1.1.1
-imports: org.foo.api
-sourcedirs: src
</pre>
</div></div>

<p>Where the bundle version is now inherited and the import range is inherited from
the package;org.foo.api property from the parent sigil-defaults.properties file.</p>
     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/FELIX/Sigil+Projects">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=3473995&revisedVersion=2&originalVersion=1">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/FELIX/Sigil+Projects?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message