felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Felix: Apache Felix Manifest Generator (mangen) (page edited)
Date Fri, 14 Mar 2008 17:03:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence" />
    <style type="text/css">
    <!--
    body, p, td, table, tr, .bodytext, .stepfield {
	font-family: Verdana, arial, sans-serif;
	font-size: 11px;
	line-height: 16px;
	color: #000000;
	font-weight: normal;
}
#PageContent {
	text-align: left;
	background-color: #fff;
	padding: 0px;
	margin: 0px;
    padding-bottom:20px;
}
/*
** when this stylesheet is used for the Tiny MCE Wysiwyg editor's edit area, we can't
** use an id=PageContent or class=wiki-content, so we must
** set the body style to that used for PageContent, and p to that used for wiki-content.
*/

body {
	margin: 0px;
	padding: 0px;
	text-align: center;
    background-color: #f0f0f0;
}

@media print {

body {
    background-color: #fff;
}

}

.monospaceInput {
    font:12px monospace
}

.wiki-content p, .commentblock p {
    margin: 16px 0px 16px 0px;
    padding: 0px;
}

.wiki-content-preview {
    padding: 5px;
    border-left: 1px solid #3c78b5;
    border-right: 1px solid #3c78b5;
}

ul, ol {
    margin-top: 2px;
    margin-bottom: 2px;
    padding-top: 0px;
    padding-bottom: 0px;
}

pre {
    padding: 0px;
    margin-top: 5px;
    margin-left: 15px;
    margin-bottom: 5px;
    margin-right: 5px;
    text-align: left;
}

.helpheading {
    font-weight: bold;
    background-color: #D0D9BD;
        border-bottom: 1px solid #3c78b5;
        padding: 4px 4px 4px 4px;
        margin: 0px;
        margin-top: 10px;
}
.helpcontent {
        padding: 4px 4px 20px 4px;
    background-color: #f5f7f1;
}

.code {
 	border: 1px dashed #3c78b5;
    font-size: 11px;
	font-family: Courier;
    margin: 10px;
	line-height: 13px;
}

.focusedComment {
    background: #ffffce;
}

.commentBox, .focusedComment {
    padding: 10px;
    margin: 5px 0 5px 0;
    border: 1px #bbb solid;
}

.codeHeader {
    background-color: #f0f0f0;
 	border-bottom: 1px dashed #3c78b5;
    padding: 3px;
	text-align: center;
}

.codeContent {
    text-align: left;
    background-color: #f0f0f0;
    padding: 3px;
}

.preformatted {
 	border: 1px dashed #3c78b5;
    font-size: 11px;
	font-family: Courier;
    margin: 10px;
	line-height: 13px;
}

.preformattedHeader {
    background-color: #f0f0f0;
 	border-bottom: 1px dashed #3c78b5;
    padding: 3px;
	text-align: center;
}

.preformattedContent {
    background-color: #f0f0f0;
    padding: 3px;
}

.panel {
 	border: 1px dashed #3c78b5;
    margin: 10px;
    margin-top: 0px;
}

.panelHeader {
    background-color: #f0f0f0;
 	border-bottom: 1px dashed #3c78b5;
    padding: 3px;
	text-align: center;
}

.panelContent {
    background-color: #f0f0f0;
    padding: 5px;
}

.anonymousAlert {
    background-color: #f0f0f0;
 	border: 1px dashed red;
    font-size: 11px;
    padding: 10px 5px 10px 5px;
    margin: 4px;
	line-height: 13px;
}

.lockAlert {
    background-color: #f0f0f0;
    width: 50%;
 	border: 1px dashed red;
    font-size: 11px;
    padding: 10px 5px 10px 5px;
    margin: 4px;
	line-height: 13px;
}


.code-keyword {
  color: #000091;
  background-color: inherit;
}

.code-object {
  color: #910091;
  background-color: inherit;
}

.code-quote {
  color: #009100;
  background-color: inherit;
}

.code-comment {
  color: #808080;
  background-color: inherit;
}


.code-xml .code-keyword {
  color: inherit;
  font-weight: bold;
}

.code-tag {
  color: #000091;
  background-color: inherit;
}

.breadcrumbs {
    background-color: #f0f0f0;
 	border-color: #3c78b5;
	border-width: 1px 0px 1px 0px;
	border-style: solid;
    font-size: 11px;
    padding: 3px 0px 3px 0px;
}

.navmenu {
    border: 1px solid #ccc;
}

.menuheading {
    font-weight: bold;
    background-color: #f0f0f0;
 	border-bottom: 1px solid #3c78b5;
	padding: 4px 4px 2px 4px;
}

.menuitems {
	padding: 4px 4px 20px 4px;
}

.rightpanel {
    border-left: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

#helpheading {
    text-align: left;
    font-weight: bold;
    background-color: #D0D9BD;
 	border-bottom: 1px solid #3c78b5;
	padding: 4px 4px 4px 4px;
	margin: 0px;
}
#helpcontent {
	padding: 4px 4px 4px 4px;
    background-color: #f5f7f1;
}
.helptab-unselected {
    font-weight: bold;
	padding: 5px;
    background-color: #f5f7f1;
}
.helptab-selected {
    font-weight: bold;
    background-color: #D0D9BD;
	padding: 5px;
}
.helptabs {
    margin: 0px;
    background-color: #f5f7f1;
	padding: 5px;
}
.infopanel-heading {
    font-weight: bold;
	padding: 4px 0px 2px 0px;
}

.pagebody {
}

.pageheader {
	padding: 5px 5px 5px 0px;
 	border-bottom: 1px solid #3c78b5;
}

.pagetitle {
	font-size: 22px;
	font-weight: bold;
	font-family: Arial, sans-serif;
	color: #003366;
}

.newpagetitle {
    color: #ccc !important;
}

.steptitle {
	font-size: 18px;
	font-weight: bold;
	font-family: Arial, sans-serif;
	color: #003366;
	margin-bottom: 7px;
}

.substeptitle {
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    color: #003366;
    margin: 2px 4px 4px 4px;
    padding: 2px 4px 1px 4px;
}

.stepdesc {
    font-family: Verdana, arial, sans-serif;
	font-size: 11px;
	line-height: 16px;
	font-weight: normal;
    color: #666666;
    margin-top: 7px;
    margin-bottom: 7px;
}

.steplabel {
    font-weight: bold;
    margin-right: 4px;
    color: black;
    float: left;
    width: 15%;
    text-align: right;
}

.stepfield {
    background: #f0f0f0;
    padding: 5px;
}

.submitButtons{
    margin-top:5px;
    text-align:right;
}

.formtitle {
	font-size: 12px;
	font-weight: bold;
	font-family: Arial, sans-serif;
	color: #003366;
}

.sectionbottom {
    border-bottom: 1px solid #3c78b5;
}

.topRow {
    border-top: 2px solid #3c78b5;
}

.tabletitle {
	font-size: 14px;
	font-weight: bold;
	font-family: Arial, sans-serif;
    padding: 3px 0px 2px 0px;
    margin: 8px 4px 2px 0px;
	color: #003366;
	border-bottom: 2px solid #3c78b5;
}
.pagesubheading {
    color: #666666;
    font-size: 10px;
    padding: 0px 0px 5px 0px;
}

HR {
	color: 3c78b5;
	height: 1;
}

A:link, A:visited, A:active, A:hover {
	color: #003366;
}

h1 A:link, h1 A:visited, h1 A:active {
	text-decoration: none;
}

h1 A:hover {
    border-bottom: 1px dotted #003366;
}

.wiki-content > :first-child, .commentblock > :first-child {
    margin-top: 3px;
}

.logocell {
    padding: 10px;
}

input {
	font-family: verdana, geneva, arial, sans-serif;
	font-size: 11px;
	color: #000000;
}

textarea, textarea.editor {
	font-family: verdana, geneva, arial, sans-serif;
	font-size: 11px;
	color: #333333;
}

/* use logoSpaceLink instead.
.spacenametitle {
	font: 21px/31px Impact, Arial, Helvetica;
    font-weight: 100;
    color: #999999;
	margin: 0px;
}
.spacenametitle img {
  margin: 0 0 -4px 0;
}
.spacenametitle a {
    text-decoration: none;
    color: #999999;
}
.spacenametitle a:visited {
    text-decoration: none;
    color: #999999;
}*/

.spacenametitle-printable {
	font: 20px/25px Impact, Arial, Helvetica;
    font-weight: 100;
    color: #999999;
	margin: 0px;
}
.spacenametitle-printable a {
    text-decoration: none;
    color: #999999;
}
.spacenametitle-printable a:visited {
    text-decoration: none;
    color: #999999;
}

.blogDate {
	font-weight: bold;
	text-decoration: none;
	color: black;
}

.blogSurtitle {
    background: #f0f0f0;
 	border: 1px solid #ddd;
	padding: 3px;
	margin: 1px 1px 10px 1px;
}

.blogHeading {
    font-size: 20px;
    line-height: normal;
    font-weight: bold;
    padding: 0px;
    margin: 0px;
}

.blogHeading a {
   text-decoration: none;
   color: black;
}

.endsection {
	align: right;
	color: #666666;
	margin-top: 10px;
}
.endsectionleftnav {
	align: right;
	color: #666666;
	margin-top: 10px;
}

h1 {
	font-size: 24px;
	line-height: normal;
	font-weight: bold;
	background-color: #f0f0f0;
	color: #003366;
 	border-bottom: 1px solid #3c78b5;
	padding: 2px;
	margin: 36px 0px 4px 0px;
}

h2 {
	font-size: 18px;
	line-height: normal;
	font-weight: bold;
	background-color: #f0f0f0;
 	border-bottom: 1px solid #3c78b5;
	padding: 2px;
	margin: 27px 0px 4px 0px;
}

h3 {
	font-size: 14px;
	line-height: normal;
	font-weight: bold;
	background-color: #f0f0f0;
	padding: 2px;
	margin: 21px 0px 4px 0px;
}

h4 {
	font-size: 12px;
	line-height: normal;
	font-weight: bold;
	background-color: #f0f0f0;
	padding: 2px;
	margin: 18px 0px 4px 0px;
}

h4.search {
	font-size: 12px;
	line-height: normal;
	font-weight: normal;
	background-color: #f0f0f0;
	padding: 4px;
	margin: 18px 0px 4px 0px;
}

h5 {
	font-size: 10px;
	line-height: normal;
	font-weight: bold;
	background-color: #f0f0f0;
	padding: 2px;
	margin: 14px 0px 4px 0px;
}

h6 {
	font-size: 8px;
	line-height: normal;
	font-weight: bold;
	background-color: #f0f0f0;
	padding: 2px;
	margin: 14px 0px 4px 0px;
}

.smallfont {
    font-size: 10px;
}
.descfont {
    font-size: 10px;
    color: #666666;
}
.smallerfont {
    font-size: 9px;
}
.smalltext {
    color: #666666;
    font-size: 10px;
}
.smalltext a {
    color: #666666;
}
.smalltext-blue {
    color: #3c78b5;
    font-size: 10px;
}
.surtitle {
    margin-left: 1px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666666;
}

/* css hack found here:  http://www.fo3nix.pwp.blueyonder.co.uk/tutorials/css/hacks/ */
.navItemOver { font-size: 10px; font-weight: bold; color: #ffffff; background-color: #003366; cursor: hand; voice-family: '\'}\''; voice-family:inherit; cursor: pointer;}
.navItemOver a { color: #ffffff; background-color:#003366; text-decoration: none; }
.navItemOver a:visited { color: #ffffff; background-color:#003366; text-decoration: none; }
.navItemOver a:hover { color: #ffffff; background-color:#003366; text-decoration: none; }
.navItem { font-size: 10px; font-weight: bold; color: #ffffff; background-color: #3c78b5; }
.navItem a { color: #ffffff; text-decoration: none; }
.navItem a:hover { color: #ffffff; text-decoration: none; }
.navItem a:visited { color: #ffffff; text-decoration: none; }

div.padded { padding: 4px; }
div.thickPadded { padding: 10px; }
h3.macrolibrariestitle {
    margin: 0px 0px 0px 0px;
}

div.centered { text-align: center; margin: 10px; }
div.centered table {margin: 0px auto; text-align: left; }

.tableview table {
    margin: 0;
}

.tableview th {
    text-align: left;
    color: #003366;
    font-size: 12px;
    padding: 5px 0px 0px 5px;
    border-bottom: 2px solid #3c78b5;
}
.tableview td {
    text-align: left;
    border-color: #ccc;
    border-width: 0px 0px 1px 0px;
    border-style: solid;
    margin: 0;
    padding: 4px 10px 4px 5px;
}

.grid {
    margin: 2px 0px 5px 0px;
    border-collapse: collapse;
}
.grid th  {
    border: 1px solid #ccc;
    padding: 2px 4px 2px 4px;
    background: #f0f0f0;
    text-align: center;
}
.grid td  {
    border: 1px solid #ccc;
    padding: 3px 4px 3px 4px;
}
.gridHover {
	background-color: #f9f9f9;
}

td.infocell {
    background-color: #f0f0f0;
}
.label {
	font-weight: bold;
	color: #003366;
}

label {
	font-weight: bold;
	color: #003366;
}

.error {
	background-color: #fcc;
}

.errorBox {
	background-color: #fcc;
    border: 1px solid #c00;
    padding: 5px;
    margin: 5px;
}

.errorMessage {
	color: #c00;
}

.success {
	background-color: #dfd;
}

.successBox {
	background-color: #dfd;
    border: 1px solid #090;
    padding: 5px;
    margin-top:5px;
    margin-bottom:5px;
}

blockquote {
	padding-left: 10px;
	padding-right: 10px;
	margin-left: 5px;
	margin-right: 0px;
	border-left: 1px solid #3c78b5;
}

table.confluenceTable
{
    margin: 5px;
    border-collapse: collapse;
}

/* Added as a temporary fix for CONF-4223. The table elements appear to be inheriting the border: none attribute from the sectionMacro class */
table.confluenceTable td.confluenceTd
{
    border-width: 1px;
    border-style: solid;
    border-color: #ccc;
    padding: 3px 4px 3px 4px;
}

/* Added as a temporary fix for CONF-4223. The table elements appear to be inheriting the border: none attribute from the sectionMacro class */
table.confluenceTable th.confluenceTh
{
    border-width: 1px;
    border-style: solid;
    border-color: #ccc;
    padding: 3px 4px 3px 4px;
    background-color: #f0f0f0;
    text-align: center;
}

td.confluenceTd
{
    border-width: 1px;
    border-style: solid;
    border-color: #ccc;
    padding: 3px 4px 3px 4px;
}

th.confluenceTh
{
    border-width: 1px;
    border-style: solid;
    border-color: #ccc;
    padding: 3px 4px 3px 4px;
    background-color: #f0f0f0;
    text-align: center;
}

DIV.small {
	font-size: 9px;
}

H1.pagename {
	margin-top: 0px;
}

IMG.inline  {}

.loginform {
    margin: 5px;
    border: 1px solid #ccc;
}

/* The text how the "This is a preview" comment should be shown. */
.previewnote { text-align: center;
                font-size: 11px;
                    color: red; }

/* How the preview content should be shown */
.previewcontent { background: #E0E0E0; }

/* How the system messages should be shown (DisplayMessage.jsp) */
.messagecontent { background: #E0E0E0; }

/* How the "This page has been modified..." -comment should be shown. */
.conflictnote { }

.createlink {
    color: maroon;
}
a.createlink {
    color: maroon;
}
.templateparameter {
    font-size: 9px;
    color: darkblue;
}

.diffadded {
    background: #ddffdd;
    padding: 1px 1px 1px 4px;
	border-left: 4px solid darkgreen;
}
.diffdeleted {
    color: #999;
    background: #ffdddd;
    padding: 1px 1px 1px 4px;
	border-left: 4px solid darkred;
}
.diffnochange {
    padding: 1px 1px 1px 4px;
	border-left: 4px solid lightgrey;
}
.differror {
    background: brown;
}
.diff {
    font-family: lucida console, courier new, fixed-width;
	font-size: 12px;
	line-height: 14px;
}
.diffaddedchars {
    background-color:#99ff99;
    font-weight:bolder;
}
.diffremovedchars {
    background-color:#ff9999;
    text-decoration: line-through;
    font-weight:bolder;
}

.greybackground {
    background: #f0f0f0
}

.greybox {
 	border: 1px solid #ddd;
	padding: 3px;
	margin: 1px 1px 10px 1px;
}

.borderedGreyBox {
    border: 1px solid #cccccc;
    background-color: #f0f0f0;
    padding: 10px;
}

.greyboxfilled {
 	border: 1px solid #ddd;
    background: #f0f0f0;
    padding: 3px;
	margin: 1px 1px 10px 1px;
}

.navBackgroundBox {
    padding: 5px 5px 5px 5px;
    font-size: 22px;
	font-weight: bold;
	font-family: Arial, sans-serif;
	color: white;
    background: #3c78b5;
    text-decoration: none;
}

.previewBoxTop {
	background-color: #f0f0f0;
    border-width: 1px 1px 0px 1px;
    border-style: solid;
    border-color: #3c78b5;
    padding: 5px;
    margin: 5px 0px 0px 0px;
    text-align: center;
}
.previewContent {
    background-color: #fff;
 	border-color: #3c78b5;
	border-width: 0px 1px 0px 1px;
	border-style: solid;
	padding: 10px;
	margin: 0px;
}
.previewBoxBottom {
	background-color: #f0f0f0;
    border-width: 0px 1px 1px 1px;
    border-style: solid;
    border-color: #3c78b5;
    padding: 5px;
    margin: 0px 0px 5px 0px;
    text-align: center;
}

.functionbox {
    background-color: #f0f0f0;
 	border: 1px solid #3c78b5;
	padding: 3px;
	margin: 1px 1px 10px 1px;
}

.functionbox-greyborder {
    background-color: #f0f0f0;
 	border: 1px solid #ddd;
	padding: 3px;
	margin: 1px 1px 10px 1px;
}

.search-highlight {
    background-color: #ffffcc;
}

/* normal (white) background */
.rowNormal {
    background-color: #ffffff;
 }

/* alternate (pale yellow) background */
.rowAlternate {
    background-color: #f7f7f7;
}

/* used in the list attachments table */
.rowAlternateNoBottomColor {
    background-color: #f7f7f7;
}

.rowAlternateNoBottomNoColor {
}

.rowAlternateNoBottomColor td {
    border-bottom: 0px;
}

.rowAlternateNoBottomNoColor td {
    border-bottom: 0px;
}

/* row highlight (grey) background */
.rowHighlight {
    background-color: #f0f0f0;

}

TD.greenbar {FONT-SIZE: 2px; BACKGROUND: #00df00; BORDER: 1px solid #9c9c9c; PADDING: 0px; }
TD.redbar {FONT-SIZE: 2px; BACKGROUND: #df0000; BORDER: 1px solid #9c9c9c; PADDING: 0px; }
TD.darkredbar {FONT-SIZE: 2px; BACKGROUND: #af0000; BORDER: 1px solid #9c9c9c; PADDING: 0px; }

TR.testpassed {FONT-SIZE: 2px; BACKGROUND: #ddffdd; PADDING: 0px; }
TR.testfailed {FONT-SIZE: 2px; BACKGROUND: #ffdddd; PADDING: 0px; }

.toolbar  {
    margin: 0px;
    border-collapse: collapse;
}

.toolbar td  {
    border: 1px solid #ccc;
    padding: 2px 2px 2px 2px;
    color: #ccc;
}

td.noformatting {
    border-width: 0px;
    border-style: none;
    text-align: center;
	padding: 0px;
}

.commentblock {
    margin: 12px 0 12px 0;
}

/*
 * Divs displaying the license information, if necessary.
 */
.license-eval, .license-none, .license-nonprofit {
    border-top: 1px solid #bbbbbb;
    text-align: center;
    font-size: 10px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
}

.license-eval, .license-none {
    background-color: #ffcccc;
}

.license-eval b, .license-none b {
    color: #990000
}

.license-nonprofit {
    background-color: #ffffff;
}

/*
 * The shadow at the bottom of the page between the main content and the
 * "powered by" section.
 */
.bottomshadow {
    height: 12px;
    background-image: url("$req.contextPath/images/border/border_bottom.gif");
    background-repeat: repeat-x;
}

/*
 * Styling of the operations box
 */
.navmenu .operations li, .navmenu .operations ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.navmenu .operations ul {
    margin-bottom: 9px;
}

.navmenu .label {
    font-weight: inherit;
}

/*
 * Styling of ops as a toolbar
 */
.toolbar div {
    display: none;
}

.toolbar .label {
    display: none;
}

.toolbar .operations {
    display: block;
}

.toolbar .operations ul {
    display: inline;
    list-style: none;
    margin-left: 10px;
    padding-left: 0;
}

.toolbar .operations li {
    list-style: none;
    display: inline;
}

/* list page navigational tabs */
#foldertab {
padding: 3px 0px 3px 8px;
margin-left: 0;
border-bottom: 1px solid #3c78b5;
font: bold 11px Verdana, sans-serif;
}

#foldertab li {
list-style: none;
margin: 0;
display: inline;
}

#foldertab li a {
padding: 3px 0.5em;
margin-left: 3px;
border: 1px solid #3c78b5;
border-bottom: none;
background: #3c78b5;
text-decoration: none;
}

#foldertab li a:link { color: #ffffff; }
#foldertab li a:visited { color: #ffffff; }

#foldertab li a:hover {
color: #ffffff;
background: #003366;
border-color: #003366;
}

#foldertab li a.current {
background: white;
border-bottom: 1px solid white;
color: black;
}

#foldertab li a.current:link { color: black; }
#foldertab li a.current:visited { color: black; }
#foldertab li a.current:hover {
background: white;
border-bottom: 1px solid white;
color: black;
}

/* alphabet list */
ul#squaretab {
margin-left: 0;
padding-left: 0;
white-space: nowrap;
font: bold 8px Verdana, sans-serif;
}

#squaretab li {
display: inline;
list-style-type: none;
}

#squaretab a {
padding: 2px 6px;
border: 1px solid #3c78b5;
}

#squaretab a:link, #squaretab a:visited {
color: #fff;
background-color: #3c78b5;
text-decoration: none;
}

#squaretab a:hover {
color: #ffffff;
background-color: #003366;
border-color: #003366;
text-decoration: none;
}

#squaretab li a#current {
background: white;
color: black;
}

.blogcalendar * {
    font-family:verdana, arial, sans-serif;
    font-size:x-small;
    font-weight:normal;
    line-height:140%;
    padding:2px;
}


table.blogcalendar {
    border: 1px solid #3c78b5;
}

.blogcalendar th.calendarhead, a.calendarhead {
    font-size:x-small;
    font-weight:bold;
    padding:2px;
    text-transform:uppercase;
    background-color: #3c78b5;
    color: #ffffff;
    letter-spacing: .3em;
    text-transform: uppercase;
}

.calendarhead:visited {color: white;}
.calendarhead:active {color: white;}
.calendarhead:hover {color: white;}

.blogcalendar th {
    font-size:x-small;
    font-weight:bold;
    padding:2px;
    background-color:#f0f0f0;
}

.blogcalendar td {
    font-size:x-small;
    font-weight:normal;
}

.searchGroup { padding: 0 0 10px 0; background: #f0f0f0; }
.searchGroupHeading { font-size: 10px; font-weight: bold; color: #ffffff; background-color: #3c78b5; padding: 2px 4px 1px 4px; }
.searchItem { padding: 1px 4px 1px 4px; }
.searchItemSelected { padding: 1px 4px 1px 4px; font-weight: bold; background: #ddd; }

/* permissions page styles */
.permissionHeading {
    border-bottom: #bbb; border-width: 0 0 1px 0; border-style: solid; font-size: 16px; text-align: left;
}
.permissionTab {
    border-width: 0 0 0 1px; border-style: solid; background: #3c78b5; color: #ffffff; font-size: 10px;
}
.permissionSuperTab {
    border-width: 0 0 0 1px; border-style: solid; background: #003366; color: #ffffff;
}
.permissionCell {
    border-left: #bbb; border-width: 0 0 0 1px; border-style: solid;
}

/* warning panel */
.warningPanel { background: #FFFFCE; border:#F0C000 1px solid; padding: 8px; margin: 10px; }
/* alert panel */
.alertPanel { background: #FFCCCC; border:#C00 1px solid; padding: 8px; margin: 10px; }
/* info panel */
.infoPanel { background: #D8E4F1; border:#3c78b5 1px solid; padding: 8px; margin: 10px; }

/* side menu highlighting (e.g. space content screen) */
.optionPadded { padding: 2px; }
.optionSelected { background-color: #ffffcc; padding: 2px; border: 1px solid #ddd; margin: -1px; }
.optionSelected a { font-weight: bold; text-decoration: none; color: black; }

/* information macros */
.noteMacro { border-style: solid; border-width: 1px; border-color: #F0C000; background-color: #FFFFCE; text-align:left; margin-top: 5px; margin-bottom: 5px}
.warningMacro { border-style: solid; border-width: 1px; border-color: #c00; background-color: #fcc; text-align:left; margin-top: 5px; margin-bottom: 5px}
.infoMacro { border-style: solid; border-width: 1px; border-color: #3c78b5; background-color: #D8E4F1; text-align:left; margin-top: 5px; margin-bottom: 5px}
.tipMacro { border-style: solid; border-width: 1px; border-color: #090; background-color: #dfd; text-align:left; margin-top: 5px; margin-bottom: 5px}
.informationMacroPadding { padding: 5px 0 0 5px; }

table.infoMacro td, table.warningMacro td, table.tipMacro td, table.noteMacro td, table.sectionMacro td {
    border: none;
}

table.sectionMacroWithBorder td.columnMacro { border-style: dashed; border-width: 1px; border-color: #cccccc;}

.pagecontent
{
    padding: 10px;
    text-align: left;
}

/* styles for links in the top bar */
.topBarDiv a:link {color: #ffffff;}
.topBarDiv a:visited {color: #ffffff;}
.topBarDiv a:active {color: #ffffff;}
.topBarDiv a:hover {color: #ffffff;}
.topBarDiv {color: #ffffff;}

.topBar {
    background-color: #003366;
}


/* styles for extended operations */
.greyLinks a:link {color: #666666; text-decoration:underline;}
.greyLinks a:visited {color: #666666; text-decoration:underline;}
.greyLinks a:active {color: #666666; text-decoration:underline;}
.greyLinks a:hover {color: #666666; text-decoration:underline;}
.greyLinks {color: #666666; display:block; padding: 10px}

.logoSpaceLink {color: #999999; text-decoration: none}
.logoSpaceLink a:link {color: #999999; text-decoration: none}
.logoSpaceLink a:visited {color: #999999; text-decoration: none}
.logoSpaceLink a:active {color: #999999; text-decoration: none}
.logoSpaceLink a:hover {color: #003366; text-decoration: none}

/* basic panel (basicpanel.vmd) style */
.basicPanelContainer {border: 1px solid #3c78b5; margin-top: 2px; margin-bottom: 8px; width: 100%}
.basicPanelTitle {padding: 5px; margin: 0px; background-color: #f0f0f0; color: black; font-weight: bold;}
.basicPanelBody {padding: 5px; margin: 0px}

.separatorLinks a:link {color: white}
.separatorLinks a:visited {color: white}
.separatorLinks a:active {color: white}

.greynavbar {background-color: #f0f0f0; border-top: 1px solid #3c78b5; margin-top: 2px}

div.headerField {
    float: left;
    width: auto;
    height: 100%;
}

.headerFloat {
    margin-left: auto;
    width: 50%;
}

.headerFloatLeft {
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
}

#headerRow {
    padding: 10px;
}

div.license-personal {
   background-color: #003366;
   color: #ffffff;
}

div.license-personal a {
   color: #ffffff;
}

.greyFormBox {
    border: 1px solid #cccccc;
    padding: 5px;
}

/* IE automatically adds a margin before and after form tags. Use this style to remove that */
.marginlessForm {
    margin: 0px;
}

.openPageHighlight {
    background-color: #ffffcc;
    padding: 2px;
    border: 1px solid #ddd;
}

.editPageInsertLinks, .editPageInsertLinks a
{
    color: #666666;
    font-weight: bold;
    font-size: 10px;
}

/* Style for label heatmap. */
.top10 a {
    font-weight: bold;
    font-size: 2em;
    color: #003366;
}
.top25 a {
    font-weight: bold;
    font-size: 1.6em;
    color: #003366;
}
.top50 a {
    font-size: 1.4em;
    color: #003366;
}
.top100 a {
    font-size: 1.2em;
    color: #003366;
}

.heatmap {
    list-style:none;
    width: 95%;
    margin: 0px auto;
}

.heatmap a {
    text-decoration:none;
}

.heatmap a:hover {
    text-decoration:underline;
}

.heatmap li {
    display: inline;
}

.minitab {
padding: 3px 0px 3px 8px;
margin-left: 0;
margin-top: 1px;
margin-bottom: 0px;
border-bottom: 1px solid #3c78b5;
font: bold 9px Verdana, sans-serif;
text-decoration: none;
float:none;
}
.selectedminitab {
padding: 3px 0.5em;
margin-left: 3px;
margin-top: 1px;
border: 1px solid #3c78b5;
background: white;
border-bottom: 1px solid white;
color: #000000;
text-decoration: none;
}
.unselectedminitab {
padding: 3px 0.5em;
margin-left: 3px;
margin-top: 1px;
border: 1px solid #3c78b5;
border-bottom: none;
background: #3c78b5;
color: #ffffff;
text-decoration: none;
}

a.unselectedminitab:hover {
color: #ffffff;
background: #003366;
border-color: #003366;
}

a.unselectedminitab:link { color: white; }
a.unselectedminitab:visited { color: white; }

a.selectedminitab:link { color: black; }
a.selectedminitab:visited { color: black; }

.linkerror { background-color: #fcc;}

a.labelOperationLink:link {text-decoration: underline}
a.labelOperationLink:active {text-decoration: underline}
a.labelOperationLink:visited {text-decoration: underline}
a.labelOperationLink:hover {text-decoration: underline}

a.newLabel:link {background-color: #ddffdd}
a.newLabel:active {background-color: #ddffdd}
a.newLabel:visited {background-color: #ddffdd}
a.newLabel:hover {background-color: #ddffdd}

ul.square {list-style-type: square}

.inline-control-link {
    background: #ffc;
    font-size: 9px;
    color: #666;
    padding: 2px;
    text-transform: uppercase;
    text-decoration: none;
}


.inline-control-link a:link {text-decoration: none}
.inline-control-link a:active {text-decoration: none}
.inline-control-link a:visited {text-decoration: none}
.inline-control-link a:hover {text-decoration: none}

.inline-control-link {
    background: #ffc;
    font-size: 9px;
    color: #666;
    padding: 2px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

div.auto_complete {
    width: 350px;
    background: #fff;
}
div.auto_complete ul {
    border: 1px solid #888;
    margin: 0;
    padding: 0;
    width: 100%;
    list-style-type: none;
}
div.auto_complete ul li {
    margin: 0;
    padding: 3px;
}
div.auto_complete ul li.selected {
    background-color: #ffb;
}
div.auto_complete ul strong.highlight {
    color: #800;
    margin: 0;
    padding: 0;
}

/******* Edit Page Styles *******/
.toogleFormDiv{
    border:1px solid #A7A6AA;
    background-color:white;
    padding:5px;
    margin-top: 5px;
}

.toogleInfoDiv{
    border:1px solid #A7A6AA;
    background-color:white;
    display:none;
    padding:5px;
    margin-top: 10px;
}

.inputSection{
    margin-bottom:20px;
}

#editBox{
   border:1px solid lightgray;
   background-color:#F0F0F0;
}

/******* Left Navigation Theme Styles ********/
.leftnav li a {
    text-decoration:none;
    color:white;
    margin:0px;
    display:block;
    padding:2px;
    padding-left:5px;
    background-color: #3c78b5;
    border-top:1px solid #3c78b5;
}

.leftnav li a:active {color:white;}
.leftnav li a:visited {color:white;}
.leftnav li a:hover {background-color: #003366; color:white;}

/* Added by Shaun during i18n */
.replaced
{
    background-color: #33CC66;
}

.topPadding
{
    margin-top: 20px;
}

/* new form style */
.form-block {
    padding: 6px;
}
.form-error-block {
    padding: 6px;
    background: #fcc;
    border-top: #f0f0f0 1px solid;
    border-bottom: #f0f0f0 1px solid;
    margin-bottom: 6px;
    padding: 0 12px 0 12px;
}
.form-element-large {
    font-size: 16px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    color: #003366;
}

.form-element-small {
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    color: #003366;
}

.form-header {
    background: lightyellow;
    border-top: #f0f0f0 1px solid;
    border-bottom: #f0f0f0 1px solid;
    margin-bottom: 6px;
    padding: 0 12px 0 12px;
}
.form-header p, .form-block p, .form-error-block p {
    line-height: normal;
    margin: 12px 0 12px 0;
}
.form-example {
    color: #888;
    font-size: 11px;
}
.form-divider {
    border-bottom: #ccc 1px solid;
    margin-bottom: 6px;
}
.form-buttons {
    margin-top: 6px;
    border-top: #ccc 1px solid;
    border-bottom: #ccc 1px solid;
    background: #f0f0f0;
    padding: 10px;
    text-align: center;
}
.form-buttons input {
    width: 100px;
}
.form-block .error {
    padding: 6px;
    margin-bottom: 6px;
}
    -->
    </style>
</head>
<body>

<div id="PageContent">
<table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%"><tr>
<td valign="top" class="pagebody">

    <div class="pageheader">
        <span class="pagetitle">
            Page Edited :
            <a href="http://cwiki.apache.org/confluence/display/FELIX">FELIX</a> :
            <a href="http://cwiki.apache.org/confluence/display/FELIX/Apache+Felix+Manifest+Generator+%28mangen%29">Apache Felix Manifest Generator (mangen)</a>
        </span>
    </div>

     <p>
        <a href="http://cwiki.apache.org/confluence/display/FELIX/Apache+Felix+Manifest+Generator+%28mangen%29">Apache Felix Manifest Generator (mangen)</a>
        has been edited by             <a href="http://cwiki.apache.org/confluence/display/~heavy@ungoverned.org">Richard S. Hall</a>
            <span class="smallfont">(Mar 09, 2008)</span>.
     </p>
    
     <p>
                 <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=19873&originalVersion=6&revisedVersion=7">(View changes)</a>
     </p>

    <span class="label">Content:</span><br/>
    <div class="greybox wiki-content"><h1><a name="ApacheFelixManifestGenerator%28mangen%29-%7B%7Bmangen%7D%7DOSGi"></a><tt>mangen</tt> - <span class="nobr"><a href="http://www.osgi.org" title="Visit page outside Confluence" rel="nofollow">OSGi<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> Bundle Manifest generator</h1>

<h1><a name="ApacheFelixManifestGenerator%28mangen%29-Introduction"></a>Introduction</h1>

<p>The <span class="nobr"><a href="http://www.osgi.org" title="Visit page outside Confluence" rel="nofollow">OSGi<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> model provides a very powerful and flexible framework for developing Java applications in a modular fashion with a high degree of control over classloading inter-dependencies between modules. Projects such as <span class="nobr"><a href="http://oscar.objectweb.org/" title="Visit page outside Confluence" rel="nofollow">Oscar<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> and <span class="nobr"><a href="http://incubator.apache.org/felix/" title="Visit page outside Confluence" rel="nofollow">Felix<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> have recognised this power and implemented open source implementations of the framework. Adding to this is a growing availability of open source application bundles such as those offered via the <span class="nobr"><a href="http://oscar-osgi.sourceforge.net/" title="Visit page outside Confluence" rel="nofollow">Oscar Bundle Repository<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> (aka OBR).</p>

<p>As an active developer of OSGi based application, <span class="nobr"><a href="http://www.ascert.com/" title="Visit page outside Confluence" rel="nofollow">Ascert's<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> technical staff  grappled with the cumbersome task of manually creating OSGi Bundle Manifests. This task is never particularly interesting and only gets bigger and nastier as applications grow in size and the number of bundles present.  To alleviate this chore the <tt>mangen</tt> tool has been created, with the following goals:</p>

<ul>
	<li>Provide automatic scanning of an OSGi bundle JAR to detect references to external classes which require imports and possible export packages</li>
	<li>Support scanning of multiple bundle JARs in a single pass, including any JAR files within a specified directory tree</li>
	<li>Detect the majority of common import and export cases and provide manual override mechanisms to include cases that are not detected</li>
	<li>Provide a simple, extensible, rule based mechansim to allow the required imports and possible exports sets to be refined e.g. removing un-needed packages, automatic resolving to packages in other JARs etc.</li>
	<li>Provide a simple, extensible, reporting mechanism of actions taken</li>
	<li>Automatic updating of each bundle JAR's Manifest, including a means to easily switch between either OSGi R3 or R4 compatible Manifest headers</li>
</ul>


<p>If you're not a Java developer, or you're not sure what OSGi is yet, then this tool is probably not for you!</p>

<h2><a name="ApacheFelixManifestGenerator%28mangen%29-Licensing"></a>Licensing</h2>

<p>The <tt>mangen</tt> utility was originally created as a copyrighted &copy; work of Ascert LLC, and released as <b>OSI Certified Open Source Software</b> for use under the under the terms of the <span class="nobr"><a href="http://www.opensource.org/licenses/cpl1.0.php" title="Visit page outside Confluence" rel="nofollow">Common Public License<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span></p>

<p>To promote wider use and enhancement, Ascert submitted version 1.0.1 of <tt>mangen</tt> to the <span class="nobr"><a href="http://incubator.apache.org/felix/" title="Visit page outside Confluence" rel="nofollow">Apache Felix<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> project, where it will be actively developed and maintained by Felix project team. Availability is now under an <span class="nobr"><a href="http://www.apache.org/licenses/LICENSE-2.0" title="Visit page outside Confluence" rel="nofollow">Apache 2.0 style license<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span></p>

<p>Included third-party libraries and contributions are copyrighted &copy; works of their respective owners and are provided under the terms of their specified licenses. </p>

<h1><a name="ApacheFelixManifestGenerator%28mangen%29-Using%7B%7Bmangen%7D%7D"></a>Using <tt>mangen</tt></h1>

<h2><a name="ApacheFelixManifestGenerator%28mangen%29-Basicoperation"></a>Basic operation</h2>

<p>Using mangen is very simple. Unpack the distribution file to an installation directory, change to this directory and type the following command:</p>

<div class="preformatted"><div class="preformattedContent">
<pre>    java -jar lib/mangen.jar &lt;file-list&gt;
</pre>
</div></div>

<p><em>Note: on Windows platforms you will need to use a '\' in place of the '/' file  separator</em></p>

<p>Where:</p>

<ul>
	<li><em>&lt;file-list&gt;</em> - is either a list of bundle JARs to be processed or a list of directories, or a mix of both. Each directory will be scanned and all JAR files in the directory, or any sub-directories will be included in the bundle JARs processed.</li>
</ul>


<p>The basic behaviour of <tt>mangen</tt> is to process the set of bundle JARs supplied and scan the classes within each JAR to build up a set of the possible exports and required imports for each JAR. Where inner jars are defined using the OSGi <tt>Bundle-ClassPath</tt> header the classes in these will also be scanned and the possible exports and required imports will be included in the sets generated for their enclosing JAR.</p>

<p>Two phases of process happen after JAR scanning has completed:</p>

<ul>
	<li>Rule execution - typically rules will process the sets of imports and exports determined by <tt>mangen</tt> for each JAR, refining them according to the rule types being executed and the specific rule options</li>
	<li>Report production - typically generating narrative reports on the bundles processed and the rules executed.</li>
</ul>


<p>Use of the word 'typically' is significant in the above descriptions. A basic set of <a href="#ApacheFelixManifestGenerator%28mangen%29-MangenRules" title="MangenRules on Apache Felix Manifest Generator (mangen)">rules</a> and <a href="#ApacheFelixManifestGenerator%28mangen%29-MangenReports" title="MangenReports on Apache Felix Manifest Generator (mangen)">reports</a> are included with <tt>mangen</tt> to perform various useful tasks. This set is infinitely extensible, however, and <tt>mangen</tt> places no restriction on the types of tasks that rules and reports can perform.</p>

<p>The exact rules and reports to be run are entirely controlled by user configurable properties as described below. If no properties are supplied <tt>mangen</tt> will simply run, process the specified JAR files and exit.</p>

<h2><a name="ApacheFelixManifestGenerator%28mangen%29-Configuring%7B%7Bmangen%7D%7DwithProperties"></a>Configuring <tt>mangen</tt> with Properties</h2>

<p>Properties to control <tt>mangen</tt> behaviour can either be supplied on the command line using the normal <tt>-D</tt> syntax or, for most cases in a <tt>mangen.properties</tt> file. If the same property name is specified in both then the <tt>-D</tt> command line property value will take precedence of the property file value.</p>

<p><a name="ApacheFelixManifestGenerator%28mangen%29-VariableExpansionSyntax"></a><br/>
For added flexibility a simple variable expansion syntax is provided to allow the value of one Property value to be used within another property. Every property value will be scanned for <tt>${property-name</tt>} markers. Where these are found the marker will be replaced with the value of the associated <tt>property-name</tt>.</p>

<p><em>Example:</em></p>

<div class="preformatted"><div class="preformattedContent">
<pre>
    mangen.osgi.level=3
    ...
    mangen.rulesets=mangen-rule-R${mangen.osgi.level}- 

</pre>
</div></div>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-mangen.properties"></a>mangen.properties</h3>

<p>The <tt>mangen.properties</tt> Property is used to instruct mangen where to find it's properties file. By default, <tt>mangen</tt> will look for a file named <tt>mangen.properties</tt> in the same directory in which <tt>mangen.jar</tt> was installed (i.e. <tt>lib/mangen.properties</tt>). By including a <tt>-Dmangen.properties</tt> setting on the command line a different properties file can be specified.</p>

<p><em>Example:</em></p>

<div class="preformatted"><div class="preformattedContent">
<pre>    java -jar lib/mangen.jar -Dmangen.properties=my_mangen.properties my_app.jar
</pre>
</div></div>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-mangen.osgi.level"></a>mangen.osgi.level</h3>

<p>There are two places in which the <tt>mangen.osgi.level</tt> Property is used:</p>

<ul>
	<li>internally within <tt>mangen</tt> to determine the correct format of Manifest headers to be processed and generated.</li>
	<li>as a means to guide which rulesets are executed, using the <a href="#ApacheFelixManifestGenerator%28mangen%29-VariableExpansionSyntax" title="VariableExpansionSyntax on Apache Felix Manifest Generator (mangen)">variable-expansion syntax</a></li>
</ul>


<p>At present, this Property should be set to a value of '3' or '4' (the default if not specified will be '3'); </p>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-mangen.rulesets"></a>mangen.rulesets</h3>

<p>Rules are the engine room of <tt>mangen</tt>, providing the basic means for refining the <tt>mangen</tt> detected import and export package sets e.g. removing un-needed or unused exports, supplying package version information, including undetectable package cases such as dynamic classloading.</p>

<p>Rulesets provide a simple means of organising the rules to be executed into groups of rule sets. The rulesets are specified as a list of comma-separated values, each value specifying the ruleset name prefix. The following example shows a ruleset definition for 2 rules:</p>

<div class="preformatted"><div class="preformattedContent">
<pre>
    mangen.rulesets=mangen-rule-first- , mangen-rule-final-
    ...
    mangen-rule-first-0=...
    mangen-rule-first-1=...
    mangen-rule-first-2=...
    ...
    mangen-rule-final-0=...
    mangen-rule-final-1=...
    
</pre>
</div></div>

<p>As shown in the example, <tt>mangen</tt> will take each ruleset name and look for sequentially numbered properties, starting from 0 and finishing when no property name is found. Each rule found will be executed to completion against the processed set of bundle JARs before the next rule property is processed.</p>

<p>Rulesets can be combined with <a href="#ApacheFelixManifestGenerator%28mangen%29-VariableExpansionSyntax" title="VariableExpansionSyntax on Apache Felix Manifest Generator (mangen)">variable-expansion</a> to provide OSGi version dependent rules as shown the following example.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>
    mangen.osgi.level=3
    mangen.rulesets=mangen-rule-R${mangen.osgi.level}-
    ...
    mangen-rule-R3-0=...
    ...
    mangen-rule-R4-0=...

</pre>
</div></div>

<p>Rules themselves are simply specified as a rule type followed by a space separate list of rule specific options e.g.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>
    mangen.R4.syspackages=java\\..*
    ...
    mangen-rule-basic-0=Ignore imports(${mangen.R4.syspackages})
    mangen-rule-basic-1=DontImportOwnExports

</pre>
</div></div>

<p>See the <a href="#ApacheFelixManifestGenerator%28mangen%29-MangenRules" title="MangenRules on Apache Felix Manifest Generator (mangen)">Rules</a> section for full details of the currently support rule types.</p>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-mangenreport"></a>mangen-report-</h3>

<p>Reports in <tt>mangen</tt> work in a similar fashion to rules but without the ruleset concept. The set of sequentially numbered <tt>mangen-report-</tt> properties will be scanned to determine which reports should be run e.g.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>
    mangen-report-0=RuleReport .*
    mangen-report-1=BundleReport .*

</pre>
</div></div>

<p>See the <a href="#ApacheFelixManifestGenerator%28mangen%29-MangenReports" title="MangenReports on Apache Felix Manifest Generator (mangen)">Reports</a> section for full details of the currently support report types.</p>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-mangen.failonerror"></a>mangen.failonerror</h3>

<p>If set <tt>on</tt> will cause <tt>mangen</tt> to exit with a <tt>System.exit()</tt> error status of 3 if any errors occured. Typical usage is to allow an external build tool, such as Ant, detect that there were errors. Additionally, any error messages will also be sent to <tt>stderr</tt> as well as <tt>stdout</tt> if this property is set.</p>

<p>Default is <tt>on</tt>.</p>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-mangen.failonwarning"></a>mangen.failonwarning</h3>

<p>If set <tt>on</tt> will cause <tt>mangen</tt> to exit with a <tt>System.exit()</tt> error status of 5 if any warnings occured. Typical usage is to allow an external build tool, such as Ant, detect that there were warnings. Additionally, any warning messages will also be sent to <tt>stderr</tt> as well as <tt>stdout</tt> if this property is set.</p>

<p>Default is <tt>off</tt>.</p>

<p><a name="ApacheFelixManifestGenerator%28mangen%29-MangenRules"></a></p>
<h2><a name="ApacheFelixManifestGenerator%28mangen%29-Rules"></a>Rules</h2>

<p>The Rule concept in <tt>mangen</tt> was adopted to avoid hard-coding the types of post-processing steps that a user would be able to perform on the <tt>mangen</tt> generated set of package imports and exports. The rule syntax is as follows:</p>

<div class="preformatted"><div class="preformattedContent">
<pre>    &lt;rule-type&gt; &lt;rule-options&gt;
</pre>
</div></div>

<p>Where:</p>

<ul>
	<li><em>&lt;rule-type&gt;</em> - must be the name of a valid existing rule type, details of which can be found in this section.</li>
	<li><em>&lt;rule-options&gt;</em> - will be a list of one or more of the standard options and/or rule specific options. The standard options are as follows:
	<ul>
		<li><tt>imports()</tt> - a comma seperated list of package patterns, using the JDK regex format. These will be matched against a bundle's own import packages during rule processing, the specific handling undertaken for each match being dependent on the <em>&lt;rule-type&gt;</em>. <em>Note: each pattern must be separated from the next by a comma (,) and the list must not contain any space characters.</em></li>
		<li><tt>exports()</tt> - a comma seperated list of package patterns, using the JDK regex format. These will be matched against a bundle's own export packages during rule processing, the specific handling undertaken for each match being dependent on the <em>&lt;rule-type&gt;</em>.</li>
		<li><tt>sys-packages()</tt> - a comma seperated list of standard 'system package' patterns, using the JDK regex format. The specific handling undertaken for each match being dependent on the <em>&lt;rule-type&gt;</em></li>
	</ul>
	</li>
</ul>


<p>Rules will can have either "global" scope, in which case every bundle JAR processed will have the rule appplied, or "local" scope meaning that they will only apply to a single bundle JAR. Global rules will be included in the <tt>mangen.properties</tt> file. Local rules are placed within the Manifest for the appropriate bundle in a special <tt>mangen</tt> attributes section e.g. </p>

<div class="preformatted"><div class="preformattedContent">
<pre>
    Bundle-Name: Help Component
    Bundle-ClassPath: .,help4.jar,oracle_ice.jar,ohj-jewt.jar
    Metadata-Location: metadata.xml

    Name: com/ascert/openosgi/mangen
    mangen-rule-0: Ignore imports(com\.adobe\.acrobat.*,webeq\..*,javax\.help,javax\.media)

</pre>
</div></div>

<p><em>Note: when creating regex patterns a single backslash (<br clear="all" />) is needed to escape literal characters when used in a Manifest, but a double backslash (\\\\) is needed in properties entries. This is because the JDK property scanning strips off one of the pair of double slashes in it's string handling.</em> </p>

<p>Details are included below showing whether a <em>&lt;rule-type&gt;</em> can be used in a global or a local context</p>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-AttributeStamp"></a>AttributeStamp</h3>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> <b>Usable globally</b> </td>
<td class='confluenceTd'> <tt>yes</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Usable locally</b> </td>
<td class='confluenceTd'> <tt>yes</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Standard options</b> </td>
<td class='confluenceTd'> <tt>imports</tt>, <tt>exports</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Rule specific options</b> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
</tbody></table>


<p>When processing a bundle JAR <tt>mangen</tt> can only detect the name of a required import package or a possible export package. Within an OSGi environment it's possible to also include qualifying information on a package name, such as versioning information. The AttributeStamp rule allows this information to be "stamped" over a detected package name. </p>

<p>The rule may be supplied locally, in which case it will only apply to instances of a package name match with a specific bundle JAR, or globally in which case it will be applied to all instances of a package name match across all JARs.</p>

<p>The <tt>imports</tt> or <tt>exports</tt> options allow stamping of attributes to either imported or exported packages respectively. The rule will perform a regex package name match against each entry in the list and if the name matches, will augment the matched package name with any additional attributes suppled. The following shows an example of this.</p>

<p><em>Example:</em></p>

<div class="preformatted"><div class="preformattedContent">
<pre>
    mangen-rule-1=AttributeStamp imports(org\\.osgi\\.framework;version="1.2.0") 

</pre>
</div></div>

<p>If the rule finds a package name pattern match and the package already has additional attributes an error will be thrown if the stamped attributes do not match the existing attributes. This could be the case as a result of either a previous AttributeStamp or Merge rule.</p>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-DontImportOwnExports"></a>DontImportOwnExports</h3>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> <b>Usable globally</b> </td>
<td class='confluenceTd'> <tt>yes</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Usable locally</b> </td>
<td class='confluenceTd'> <tt>yes</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Standard options</b> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <b>Rule specific options</b> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
</tbody></table>


<p>In many application cases it's not necessary for a bundle JAR to import it' own exports. This rule may be used locally or globally to remove from a bundle's import list any package which it also exports.</p>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-Ignore"></a>Ignore</h3>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> <b>Usable globally</b> </td>
<td class='confluenceTd'> <tt>yes</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Usable locally</b> </td>
<td class='confluenceTd'> <tt>yes</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Standard options</b> </td>
<td class='confluenceTd'> <tt>imports</tt>, <tt>exports</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Rule specific options</b> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
</tbody></table>


<p>There are several cases where a <tt>mangen</tt> detected possible export or required import may not actually be desired:</p>

<ul>
	<li>Standard JDK classes, particularly in an OSGi R3 environment where these packages are resolved without needing import statements</li>
	<li>Packages which <tt>mangen</tt> detects as needing imports but won't actually be used in a running environment. One example of these is third party JARs which include Ant tasks for use in a development environment but which would probably never be instantiated in a running application.</li>
</ul>


<p>The Ignore rule will remove matching package entries from either the import or export lists, or both, as specified in the options.</p>

<p><em>Example:</em></p>

<div class="preformatted"><div class="preformattedContent">
<pre>
    mangen.R4.syspackages=java\\..*
    mangen-rule-R4-0=Ignore imports(${mangen.R4.syspackages})

</pre>
</div></div>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-Merge"></a>Merge</h3>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> <b>Usable globally</b> </td>
<td class='confluenceTd'> <tt>yes</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Usable locally</b> </td>
<td class='confluenceTd'> <tt>yes</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Standard options</b> </td>
<td class='confluenceTd'> <tt>imports</tt>, <tt>exports</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Rule specific options</b> </td>
<td class='confluenceTd'> <tt>existing</tt>, <tt>fixed</tt> </td>
</tr>
</tbody></table>


<p>In some cases the simplest way to use <tt>mangen</tt> will be to provide a list of known imports and exports and then have <tt>mangen</tt> "merge" any remaining required imports and possible exports into these lists as needed. The Merge rule provides two mechanisms in which these known imports and exports can be supplied:</p>

<ul>
	<li>Using <tt>existing</tt> Manifest entries - in which case <tt>mangen</tt> will take any current Import-Package and Export-Package headers and merge them into the detected import and export package sets</li>
</ul>


<ul>
	<li>By specifying a set of <tt>fixed</tt> Manifest entries - allowing a limited set of pre-determined entries to be listed in the special <tt>mangen</tt> attributes of the Manifest which will be merged in.</li>
</ul>


<p><em>Example:</em></p>

<div class="preformatted"><div class="preformattedContent">
<pre>
    Manifest-Version: 1.0
    Bundle-Name: mybundle
    Export-Package: my.bundle.package

    Name: com/ascert/openosgi/mangen
    Import-Package: some.other.package

</pre>
</div></div>

<p>A <tt>Merge existing</tt> rule using the above example would ensure that <tt>my.bundle.package</tt> appeared in the list of packages to export. A <tt>Merge fixed</tt> would ensure that <tt>some.other.package</tt> appeared in the list of packages to import.</p>

<p>It's possible to use both <tt>Merge existing</tt> and <tt>Merge fixed</tt> within a given set of application rules although it's more likely that only one of these would be used to meet a given application build strategy.</p>

<p>The imports and exports options allow constraints on the packages to be merged based on regex package name pattern matches.</p>

<p>One other aspect to note with the Merge option is that it also provides an alternative way to "stamp" OSGi attributes on a <tt>mangen</tt> detected pakcage name, since if the package being merged was already in the set of <tt>mangen</tt> detected packages it's entry will be augmented with any additional attributes supplied from the package entry being merged.</p>

<p><a name="ApacheFelixManifestGenerator%28mangen%29-ProcessBundles"></a></p>
<h3><a name="ApacheFelixManifestGenerator%28mangen%29-ProcessBundles"></a>ProcessBundles</h3>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> <b>Usable globally</b> </td>
<td class='confluenceTd'> <tt>yes</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Usable locally</b> </td>
<td class='confluenceTd'> <tt>no</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Standard options</b> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <b>Rule specific options</b> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
</tbody></table>


<p>By default, <tt>mangen</tt> will not actually process any of the JAR files specified, it will simply create objects to access them. </p>

<p>Being able to skip <tt>mangen</tt> processing of bundle JARs is useful behaviour in a small number of instances, such as the <a href="#ApacheFelixManifestGenerator%28mangen%29-ObrReport" title="ObrReport on Apache Felix Manifest Generator (mangen)">ObrReport</a> that will generally be run against existing bundle Manifest headers rather than <tt>mangen</tt> generated sets of imports and exports.</p>

<p>For most cases, however, <tt>mangen</tt> import and export processing will be required and this Rule should be included.</p>

<p><em>Example:</em></p>

<div class="preformatted"><div class="preformattedContent">
<pre>
    mangen.rulesets=mangen-rule-initial- , mangen-rule-Ant- , mangen-rule-R${mangen.osgi.level}- , mangen-rule- , mangen-rule-final-

    mangen-rule-initial-0=ProcessBundles
    ...

</pre>
</div></div>


<h3><a name="ApacheFelixManifestGenerator%28mangen%29-ResolveImportsToExports"></a>ResolveImportsToExports</h3>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> <b>Usable globally</b> </td>
<td class='confluenceTd'> <tt>yes</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Usable locally</b> </td>
<td class='confluenceTd'> <tt>no</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Standard options</b> </td>
<td class='confluenceTd'> <tt>sys-packages</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Rule specific options</b> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
</tbody></table>


<p>Some OSGi developers use the framework as a basis for creating packaged applications, in fact it is just this usage which Ascert make of OSGi and Oscar and which motivated the creation of =mangen. In such cases, the simplest and possibly most powerful rule use case is  simply to supply <tt>mangen</tt> with a complete set of application bundles and let it work out the matrix of imports and exports required to resolve every bundle dependency. This is exactly what the ResolveImportsToExports does. </p>

<p>ResolveImportsToExports can only be used globally and will prune down the set of possible exports and required imports to just those required to satisfy every bundle dependency. It will generate <tt>*** WARNING ***</tt> report lines for the following cases:</p>

<ul>
	<li>duplicate exports where more than one bundle could be an exporter of the same package which is a necessary import of some other bundle. In these cases, at present, the first possible exporter found will be picked and all others removed and a warning generated</li>
	<li>missing exports i.e. packages required by one or more bundles that are never exported. Erroneous warnings for standard JDK packages can be avoided using the <tt>sys-packages</tt> option.</li>
</ul>


<p>At present, the known cases where this rule may fail to create a consistent and resolved set of bundle Manifests are:</p>

<ul>
	<li>cases of dynamic classloading</li>
	<li>certain third party JARs, such as Xerces, which use the awkaward-to-handle OSGi case of <tt>Thread.getContextClassLoader()</tt> to determine the classloader for dynamic classloading.</li>
</ul>


<h3><a name="ApacheFelixManifestGenerator%28mangen%29-UpdateBundles"></a>UpdateBundles</h3>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> <b>Usable globally</b> </td>
<td class='confluenceTd'> <tt>yes</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Usable locally</b> </td>
<td class='confluenceTd'> <tt>no</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <b>Standard options</b> </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> <b>Rule specific options</b> </td>
<td class='confluenceTd'> <tt>overwrite</tt> </td>
</tr>
</tbody></table>


<p>By default, <tt>mangen</tt> will only report on the generated list of imports and exports for each bundle processed. The UpdateBundles rule can be used to instruct <tt>mangen</tt> to update each bundle's Manifest wth the set of generated packages. </p>

<p>This rule can only be used globaly. If the <tt>overwrite</tt> option is specified, the bundle JAR will overwritten with a new bundle JAR containing the new Manifest. Without this option, the update will create new JARs of the same name as each existing JAR but with a suffix of <tt>.new.jar</tt>.</p>

<p><a name="ApacheFelixManifestGenerator%28mangen%29-MangenReports"></a></p>
<h2><a name="ApacheFelixManifestGenerator%28mangen%29-Reports"></a>Reports</h2>

<p>Reports are really like a simplified case of rules. At present only a couple of simple reports are included.</p>

<p>All reports at present send their output to <tt>System.out</tt>, which can of course be redirected to a text file if a persistent copy is desired.</p>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-RuleReport"></a>RuleReport</h3>

<p>This report will show any Rule generated output.</p>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-BundleReport"></a>BundleReport</h3>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> <b>Report options</b> </td>
<td class='confluenceTd'> <tt>show-differences</tt> <tt>show-local-rules</tt> </td>
</tr>
</tbody></table>

<p>This report will create a simple overview of the refined set of a bundle's imports and exports, together with a report of any local rules which have been run for the bundle. The following options are supported:</p>

<ul>
	<li><tt>show-differences</tt> - will show details of <em>ADDED</em> and <em>REMOVED</em> packages by comparing the generate set of import and export packages against the existing Import-Package and Export-Package attributes. If this option is omitted a simple list of generated imports and exports will be shown</li>
	<li><tt>show-local-rules</tt> - will show report output from any local rules run for each bundle JAR</li>
</ul>


<p><a name="ApacheFelixManifestGenerator%28mangen%29-ObrReport"></a></p>
<h3><a name="ApacheFelixManifestGenerator%28mangen%29-ObrReport"></a>ObrReport</h3>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> <b>Report options</b> </td>
<td class='confluenceTd'> <tt>skip-jars</tt> </td>
</tr>
</tbody></table>

<p>Produce a report for each bundle JAR that can be used as an OBR descriptor. </p>

<p>The <tt>skip-jars</tt> option can be used to specify a comma separated list of JAR name regex patterns for which OBR descriptors are not required (e.g. source JARs).</p>

<p>OBR descriptor production is a quite different aspect of <tt>mangen</tt> usage to import/export generation and so a separate example <tt>obr.properties</tt> file has been included to show typical settings for it's usage. The <tt>-Dmangen.properties</tt> setting can be used to run <tt>mangen</tt> with these settings e.g.</p>

<p><em>Example:</em></p>

<div class="preformatted"><div class="preformattedContent">
<pre>
    java -Dmangen.properties=lib\obr.properties -jar lib\mangen.jar e:\obr\repo\

</pre>
</div></div>

<p>The example <tt>obr.properties</tt> includes a number of features:</p>

<ul>
	<li>there is no <em>ProcessBundles</em> rule, meaning that <tt>mangen</tt> will not automatically generate imports and exports.</li>
	<li>there is a <em>Merge existing</em>  rule meaning <tt>mangen</tt> will use existing Manifest headers in each bundle JAR to generate the ObrReport</li>
	<li>there is an <tt>mangen.obr.ver</tt> property that can be used to control the format of the OBR descriptors produced</li>
	<li>text templates are included that allow the OBR version 1 and version 2 descriptors to be changed without needing to modify the ObrReport code.</li>
</ul>


<p>Whilst running, the ObrReport will look for a number of specific properties to aid it's processing:</p>

<ul>
	<li><tt>mangen.obr.ver</tt> - to determine which format of OBR descriptor to produce</li>
	<li><tt>mangen.obr.descr.&lt;obr-ver&gt;</tt> - the main text template used to produce the OBR descriptor for each bundle</li>
	<li><tt>mangen.obr.import.&lt;obr-ver&gt;</tt> - the template used to produce the descriptor text for each import.</li>
	<li><tt>mangen.obr.export.&lt;obr-ver&gt;</tt> - the template used to produce the descriptor text for each export.</li>
	<li><tt>mangen.obr.import.ver.&lt;obr-ver&gt;</tt> - the template used to produce a "version" descriptor for an import which has an explicit version specified.</li>
	<li><tt>mangen.obr.export.ver.&lt;obr-ver&gt;</tt> - the template used to produce a "version" descriptor for an export which has an explicit version specified.</li>
</ul>


<p>The templates include a simple "tag substitution" mechanism that will expand the following tags:</p>

<ul>
	<li><tt>@@hdr:&lt;header-name&gt;@@</tt> - include the attribute value of &lt;header-name&gt; from the bundle's Manifest. The <tt>mangen</tt> attributes will be searched first, followed by the Main attributes</li>
	<li><tt>@<input type="text" name="variableValues.imports" size="12" onkeyup="updateOthers(this)" />&nbsp;<span class="templateparameter">(imports)</span>@</tt> - process the list of imports and generate descriptor text based on the <tt>mangen.obr.import.&lt;obr-ver&gt;</tt> template</li>
	<li><tt>@<input type="text" name="variableValues.exports" size="12" onkeyup="updateOthers(this)" />&nbsp;<span class="templateparameter">(exports)</span>@</tt> - process the list of exports and generate descriptor text based on the <tt>mangen.obr.export.&lt;obr-ver&gt;</tt> template</li>
	<li><tt>@@import-ver@@</tt> - will be expanded using <tt>mangen.obr.import.ver.&lt;obr-ver&gt;</tt> if an explicit version was included for the import package</li>
	<li><tt>@@export-ver@@</tt> - will be expanded using <tt>mangen.obr.export.ver.&lt;obr-ver&gt;</tt> if an explicit version was included for the export package</li>
	<li><tt>@@pkg:name@@</tt> - name of the import or export package currently being processed</li>
	<li><tt>@@pkg:ver@@</tt> - version of the import or export package currently being processed</li>
</ul>


<h2><a name="ApacheFelixManifestGenerator%28mangen%29-Contentsofthedistributionfile"></a>Contents of the distribution file</h2>

<p>The current <tt>mangen</tt> distribution includes the following:</p>

<ul>
	<li>pre-compiled versions of <tt>mangen</tt> and libraries</li>
	<li>full source code and Ant build files</li>
	<li>this documentation in HTML format. The original documentation is maintained in TWiki format at Ascert's intranet set and a copy of the raw TWiki file is included.</li>
</ul>


<p>The following third party libraries are also included in the distribution:</p>

<ul>
	<li><span class="nobr"><a href="http://incubator.apache.org/felix/" title="Visit page outside Confluence" rel="nofollow">Felix<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> library JARs - required Felix library JARs, used by <tt>mangen</tt> in Manifest processing, and generation</li>
	<li><span class="nobr"><a href="http://asm.objectweb.org/" title="Visit page outside Confluence" rel="nofollow">ASM<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> - the ASM java bytecode parsing toolkit used by the <tt>ASMClassScanner</tt> class scanning implementation.</li>
	<li><span class="nobr"><a href="http://jakarta.apache.org/bcel/" title="Visit page outside Confluence" rel="nofollow">BCEL<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> - the BCEL java  bytecode parsing toolkit used by the <tt>BCELScanner</tt> class scanning implementation.</li>
</ul>


<p>Thanks also go to the following contributors:</p>

<ul>
	<li><span class="nobr"><a href="mailto:heavy@ungoverned.org" title="Send mail to Richard S. Hall" rel="nofollow">Richard S. Hall<sup><img class="rendericon" src="/confluence/images/icons/mail_small.gif" height="12" width="13" align="absmiddle" alt="" border="0"/></sup></a></span> - both for his assistance in the development and testing of <tt>mangen</tt> and for his contribution of the ASM based class scanning implementation.</li>
</ul>



<h1><a name="ApacheFelixManifestGenerator%28mangen%29-Extending%7B%7Bmangen%7D%7D"></a>Extending <tt>mangen</tt></h1>

<p>First things first. You need to be a reasonably proficient Java developer to undertake extending <tt>mangen</tt>. If you're not, then you should consider a Java programming course or tutorial of some kind.</p>

<p>Extensions to <tt>mangen</tt> can be performed in the following ways:</p>

<ul>
	<li>creating new or enhanced Rules</li>
	<li>creating new or enhanced Reports</li>
	<li>supporting alternative class scanning implementations</li>
	<li>Modifying the core source code</li>
</ul>


<p>The idea is that as <tt>mangen</tt> matures most extension cases will be possible via the first two means, with new class scanners and core modifications being the exception. </p>

<p>For detailed information, Javadoc API documentation for <tt>mangen</tt> can be found @@api-index-loc@@.</p>

<h2><a name="ApacheFelixManifestGenerator%28mangen%29-CreatingnewRuletypes"></a>Creating new Rule types</h2>

<p>A rule type is in fact just a Java class which implements the <tt>com.ascert.openosgi.Rule</tt> interface. If no package name is specified, these will be assumed to be in the <tt>com.ascert.openosgi.mangen.rules</tt> package. Although somewhat less readable, a fully-qualified class name can be supplied for rule types in other packages.</p>

<p>At present, the simplest way to learn about creating new rules is to look at the source code for existing rules to understand how they're put together and what can be done in them.</p>

<h2><a name="ApacheFelixManifestGenerator%28mangen%29-CreatingnewReporttypes"></a>Creating new Report types</h2>

<p>Reports are similar to rules. A Report type is a Java class which implements the <tt>com.ascert.openosgi.Report</tt> interface. Unqualified report types will be assumed to be in <tt>com.ascert.openosgi.mangen.reports</tt> package, with the option to use fully-qualified class names if desired. </p>

<p>As with rules, the source code for the existing reports is the best place to learn about creating new reports.</p>

<h2><a name="ApacheFelixManifestGenerator%28mangen%29-Alternativeclassscanners"></a>Alternative class scanners</h2>

<p>To parse the class files of an application <tt>mangen</tt> needs a class file bytecode scanning library. So that alternative scanning tools may be used <tt>mangen</tt> does not make direct usage of any library implementation. Instead a wrapper class is used which implements the <tt>ClassScanner</tt> interface, and hence insulates <tt>mangen</tt> from the specific details of different bytecode scanning tools. The <tt>mangen.scanner.class</tt> property can be used to control which scanner implementation class is used.</p>

<p>At present, implementations of the  <tt>ClassScanner</tt> interface have been include for the ObjectWeb <span class="nobr"><a href="http://asm.objectweb.org/" title="Visit page outside Confluence" rel="nofollow">ASM<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> toolkit and the  <span class="nobr"><a href="http://jakarta.apache.org/bcel/" title="Visit page outside Confluence" rel="nofollow">Apache BCEL<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> toolkit. </p>


<h1><a name="ApacheFelixManifestGenerator%28mangen%29-OngoingDevelopment"></a>Ongoing Development</h1>

<h2><a name="ApacheFelixManifestGenerator%28mangen%29-ChangeLog"></a>Change Log</h2>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-Version1.0.1"></a>Version 1.0.1</h3>

<ul>
	<li>Initial version submitted to Felix project.</li>
	<li>Package names changed and license headers changed to Apache license</li>
	<li><tt>OsgiPackage</tt> classes changed to use Felix manifest handling classes.</li>
	<li>ASM and BCEL sources removed and maven dependencies created to pull these in from repositories.</li>
	<li>Compiles and builds using normal maven build, but as yet doesn't create a standalone distribution which includes dependent jars and config <tt>.properties</tt> files.</li>
	<li>No analysis work has been performed to determine enhancements and additional rules desirable to integrate with Felix build and take advantage of <tt>mangen</tt> class scanning.</li>
</ul>



<h3><a name="ApacheFelixManifestGenerator%28mangen%29-0.1.xVersions"></a>0.1.x Versions</h3>

<p>The 0.1.x versions of <tt>mangen</tt> are the original versions developed to work with Oscar. The versions and documentation can still be downloaded from the <span class="nobr"><a href="http://oscar-osgi.sourceforge.net/mangen/" title="Visit page outside Confluence" rel="nofollow">OBR Sourceforge site<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span>. The change history has been maintained here for completeness.</p>

<h4><a name="ApacheFelixManifestGenerator%28mangen%29-Version0.1.2"></a>Version 0.1.2</h4>

<ul>
	<li>Inclusion of <a href="#ApacheFelixManifestGenerator%28mangen%29-ObrReport" title="ObrReport on Apache Felix Manifest Generator (mangen)">ObrReport</a> for generation of OBR descriptors <em>[ oscar-osgi-Feature Requests-1221468 ]</em></li>
	<li>Removed "default" processing of JARs. Now an explicit <a href="#ApacheFelixManifestGenerator%28mangen%29-ProcessBundles" title="ProcessBundles on Apache Felix Manifest Generator (mangen)">ProcessBundles</a> must be included to force JAR processing to take place. This allows reports, such as the new ObrReport to skip <tt>mangen</tt> import/export processing and just work from existing manifests.</li>
	<li>default <tt>mangen.properties</tt> now explicitly lists each non java.* package rather than using wildcards, proved safer and more reliable when creating OSGi R4 manifests</li>
</ul>


<h4><a name="ApacheFelixManifestGenerator%28mangen%29-Version0.1.1"></a>Version 0.1.1</h4>

<ul>
	<li>Support for errors and warnings to cause non-zero exit status to be returned</li>
	<li>Fix for occasional failures to update bundle JARs <em>[ oscar-osgi-Bugs-1218334 ]</em></li>
</ul>


<h4><a name="ApacheFelixManifestGenerator%28mangen%29-Version0.1.0"></a>Version 0.1.0</h4>

<ul>
	<li>First version</li>
	<li>Support for current OSGi Release 3 (R3) manifest headers, and basic support for proposed upcoming R4 headers</li>
	<li>Processing of JARs and directories containing JARs and parsing of contained classes using a subset of BCEL.</li>
	<li>Simple but extensible rule based engine for import and export set manipulation.</li>
	<li>Simple but extensible reporting engine</li>
	<li>Updating of process bundle JARs via an UpdateBundles rule</li>
	<li>Pluggable interface to allow alternative class byte code scanners to be used</li>
</ul>


<h2><a name="ApacheFelixManifestGenerator%28mangen%29-PossibleEnhancements"></a>Possible Enhancements</h2>

<p>As with any piece of software, there are always more things you'd like to do than time available in which to work on them. This library is no exception. </p>

<p>In it's present form it <tt>mangen</tt> is simple, reasonably fast, and usable. Ideas on some of the more significant areas where it could be enhanced or improved are described in the sections below.</p>

<p>Most <tt>mangen</tt> enhancement ideas have now been created as issues in the <span class="nobr"><a href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?component=12310910&amp;sorter/field=priority&amp;mode=hide&amp;reset=true&amp;pid=12310100&amp;sorter/order=ASC" title="Visit page outside Confluence" rel="nofollow">Apache JIRA list<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span>.</p>

<p>Those which are more speculative have been left below.</p>

<h3><a name="ApacheFelixManifestGenerator%28mangen%29-OnlineusagewithinanOSGienvironment"></a>Online usage within an OSGi environment</h3>

<p>Extending the concept of <a href="#ApacheFelixManifestGenerator%28mangen%29-ManifestLessUsage" title="ManifestLessUsage on Apache Felix Manifest Generator (mangen)">Manifest-less usage</a> comes an interesting possibility that a specific OSGi platform such as <span class="nobr"><a href="http://oscar.objectweb.org/" title="Visit page outside Confluence" rel="nofollow">Oscar<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> could be extended to load any JAR and automatically 'fix-up' a usable Manifest. This would require internal access/knowledge of the specific platform's implementation since the existing standard OSGi API would not supply sufficient details and access to the set of loaded bundle JARs. Additionally, it would probably need to be a "multi-step" process since until a largely complete set of bundle JARs were loaded it may not be possible to resolve all imports and exports. This perhaps implies some form of platform extension to allow a set of JARs to be passed to some form of "pre-load" mechanism capable of resolving their imports and exports within the JAR set, and possibly from existing loaded bundle JARs or even an external <span class="nobr"><a href="http://oscar-osgi.sourceforge.net/" title="Visit page outside Confluence" rel="nofollow">OBR<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span>.   </p>

<h1><a name="ApacheFelixManifestGenerator%28mangen%29-Acknowledgements"></a>Acknowledgements</h1>

<p>Ascert is pleased to acknowledge the following projects, organisations and individuals whose tools have been used in the creation of this software:</p>

<ul>
	<li><span class="nobr"><a href="http://asm.objectweb.org/" title="Visit page outside Confluence" rel="nofollow">ASM<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> - ObjectWeb's bytecode scanning and manipulation toolkit.</li>
	<li><span class="nobr"><a href="http://jakarta.apache.org/bcel/" title="Visit page outside Confluence" rel="nofollow">BCEL<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> - Apache's bytecode scanning and manipulation toolkit.</li>
	<li><span class="nobr"><a href="http://www.jedit.org" title="Visit page outside Confluence" rel="nofollow">jEdit<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> - home of the powerful and flexible jEdit<br/>
   editor</li>
	<li><span class="nobr"><a href="http://ant.apache.org" title="Visit page outside Confluence" rel="nofollow">Ant<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> - home of the Apache Ant build tool</li>
	<li><span class="nobr"><a href="http://www.bluemarsh.com/" title="Visit page outside Confluence" rel="nofollow">Blue Marsh Softworks<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> - authors of the excellent <span class="nobr"><a href="http://www.bluemarsh.com/java/jswat/index.html" title="Visit page outside Confluence" rel="nofollow">JSwat<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> Java debugger.</li>
	<li><span class="nobr"><a href="http://subversion.tigris.org/" title="Visit page outside Confluence" rel="nofollow">Subversion<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> - home of the Subversion (aka SVN) version control system, and <span class="nobr"><a href="http://www.regnis.de/" title="Visit page outside Confluence" rel="nofollow">Regnis<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> and <span class="nobr"><a href="http://tortoisesvn.tigris.org/" title="Visit page outside Confluence" rel="nofollow">TortoiseSVN<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span>, both of which are excellent SVN GUI clients</li>
	<li><span class="nobr"><a href="http://java.sun.com" title="Visit page outside Confluence" rel="nofollow">Sun Java<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> - home of all things Java and a place we love.</li>
</ul>


</div>


</td></tr></table></div>
<p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td height="12" background="http://cwiki.apache.org/confluence/images/border/border_bottom.gif"><img src="http://cwiki.apache.org/confluence/images/border/spacer.gif" width="1" height="1" border="0"/></td>
    </tr>
</table>

<div class="smalltext">
    Powered by
    <a href="http://www.atlassian.com/software/confluence/default.jsp?clicked=footer" class="smalltext">Atlassian Confluence</a>
    (Version: 2.2.9 Build:#527 Sep 07, 2006)
    -
    <a href="http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470" class="smalltext">Bug/feature request</a><br/>
    <br>
    <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action">Unsubscribe or edit your notifications preferences</a>

</div>

</body>
</html>


Mime
View raw message