aQute.lib.osgi
Class Builder

java.lang.Object
  extended by aQute.lib.osgi.Processor
      extended by aQute.lib.osgi.Analyzer
          extended by aQute.lib.osgi.Builder
All Implemented Interfaces:
Constants, Reporter, Closeable
Direct Known Subclasses:
ProjectBuilder

public class Builder
extends Analyzer

Include-Resource: ( [name '=' ] file )+ Private-Package: package-decl ( ',' package-decl )* Export-Package: package-decl ( ',' package-decl )* Import-Package: package-decl ( ',' package-decl )*

Version:
$Revision: 1.22 $

Field Summary
 
Fields inherited from class aQute.lib.osgi.Processor
DEFAULT_PLUGINS, LIST_SPLITTER
 
Fields inherited from interface aQute.lib.osgi.Constants
BLUEPRINT_TIMEOUT_ATTRIBUTE, BLUEPRINT_WAIT_FOR_DEPENDENCIES_ATTRIBUTE, BND_LASTMODIFIED, BUILDFILES, BUILDPATH, BUMPPOLICY, BUNDLE_ACTIVATIONPOLICY, BUNDLE_ACTIVATOR, BUNDLE_BLUEPRINT, BUNDLE_CATEGORY, BUNDLE_CLASSPATH, BUNDLE_CONTACTADDRESS, BUNDLE_COPYRIGHT, BUNDLE_DESCRIPTION, BUNDLE_DOCURL, BUNDLE_ICON, BUNDLE_LICENSE, BUNDLE_LOCALIZATION, BUNDLE_MANIFESTVERSION, BUNDLE_NAME, BUNDLE_NATIVECODE, BUNDLE_REQUIREDEXECUTIONENVIRONMENT, BUNDLE_SPECIFIC_HEADERS, BUNDLE_SYMBOLIC_NAME_ATTRIBUTE, BUNDLE_SYMBOLICNAME, BUNDLE_UPDATELOCATION, BUNDLE_VENDOR, BUNDLE_VERSION, BUNDLE_VERSION_ATTRIBUTE, CLASSPATH, COMMAND_DIRECTIVE, CONDITIONAL_PACKAGE, CONDUIT, CREATED_BY, CURRENT_PACKAGE, CURRENT_USES, CURRENT_VERSION, DEBUG, DEFAULT_BAR_EXTENSION, DEFAULT_BND_EXTENSION, DEFAULT_JAR_EXTENSION, DEPENDSON, DEPLOYREPO, DESCRIPTION_ATTRIBUTE, directives, DONOTCOPY, DUPLICATE_MARKER, DYNAMICIMPORT_PACKAGE, EXCLUDE_DIRECTIVE, EXPORT_CONTENTS, EXPORT_PACKAGE, EXPORT_SERVICE, EXTENSION_DIRECTIVE, FAIL_OK, FRAGMENT_ATTACHMENT_DIRECTIVE, FRAGMENT_HOST, headers, IGNORE_PACKAGE, IMPORT_DIRECTIVE, IMPORT_PACKAGE, IMPORT_PRIVATE, IMPORT_REFERENCE, IMPORT_SERVICE, importDirectives, INCLUDE, INCLUDE_DIRECTIVE, INCLUDE_RESOURCE, INCLUDERESOURCE, KEYSTORE_LOCATION_DIRECTIVE, KEYSTORE_PASSWORD_DIRECTIVE, KEYSTORE_PROVIDER_DIRECTIVE, LANGUAGE_ATTRIBUTE, LINK_ATTRIBUTE, MAKE, MANDATORY_DIRECTIVE, MANIFEST, METAPACKAGES, NAME_ATTRIBUTE, NO_IMPORT_DIRECTIVE, NOEXTRAHEADERS, NOMANIFEST, NONE, NOPE, NOUSES, options, OSNAME_ATTRIBUTE, OSVERSION_ATTRIBUTE, PATH_DIRECTIVE, PEDANTIC, PLUGIN, POM, PRESENCE_DIRECTIVE, PRIVATE_PACKAGE, PROCESSOR_ATTRIBUTE, RELEASEREPO, REMOVE_ATTRIBUTE_DIRECTIVE, REMOVE_HEADERS, REPORTNEWER, REQUIRE_BUNDLE, RESOLUTION_DIRECTIVE, RESOURCEONLY, RUNBUNDLES, RUNPATH, RUNPROPERTIES, RUNSYSTEMPACKAGES, RUNVM, SELECTION_FILTER_ATTRIBUTE, SERVICE_COMPONENT, SIGN, SIGN_PASSWORD_DIRECTIVE, SIGNATURE_TEST, SINGLETON_DIRECTIVE, SIZE_ATTRIBUTE, SOURCEPATH, SOURCES, SPLIT_PACKAGE_DIRECTIVE, STRATEGY_HIGHEST, STRATEGY_LOWEST, SUB, TESTBUNDLES, TESTCASES, TESTPACKAGES, TESTREPORT, TOOL, UNDERTEST, USES_DIRECTIVE, USES_USES, VALID_PROPERTY_TYPES, VERBOSE, VERSION_ATTRIBUTE, VERSIONPOLICY, VISIBILITY_DIRECTIVE
 
Constructor Summary
Builder()
           
Builder(Processor parent)
           
 
Method Summary
 String _maven_version(String[] args)
          A macro to convert a maven version to an OSGi version
 String _permissions(String[] args)
           
 void addSourcepath(File cp)
           
 void analyze()
          Intercept the call to analyze and cleanup versions after we have analyzed the setup.
 Jar build()
           
 Jar[] builds()
          Build Multiple jars.
 void cleanupVersion(Map<String,Map<String,String>> mapOfMap)
           
 void close()
           
 void doPom(Jar dot)
          Create a POM reseource for Maven containing as much information as possible from the manifest.
protected  String getImportPackages()
          Analyzer has an empty default but the builder has a * as default.
 Collection<File> getSourcePath()
           
 Builder getSubBuilder()
           
 boolean hasSources()
           
 void removeBundleSpecificHeaders()
           
 void setSourcepath(File[] files)
           
 
Methods inherited from class aQute.lib.osgi.Analyzer
_bsn, _classes, _exporters, _findname, _findpath, addClasspath, addClasspath, analyzeBundleClasspath, begin, calcManifest, calculateExportsFromContents, checkClass, cleanupVersion, clear, getBndInfo, getBndLastModified, getBsn, getBundleClasspath, getClasses, getClasspath, getClassspace, getContained, getExports, getImports, getJar, getManifest, getPackage, getReferred, getTarget, getUnreachable, getUses, getVersion, getVersionPolicy, mergeManifest, putAll, setBase, setClasspath, setClasspath, setClasspath, setJar, setJar
 
Methods inherited from class aQute.lib.osgi.Processor
_basedir, addClose, addIncluded, addProperties, appendPath, error, error, exists, getBase, getErrors, getFile, getFile, getFlattenedProperties, getInfo, getInfo, getMacroDomains, getManifestAsProperties, getParent, getPlugins, getPlugins, getProperties, getPropertiesFile, getProperty, getProperty, getReplacer, getTop, getWarnings, isDuplicate, isExceptions, isFailOk, isMissingPlugin, isOk, isPedantic, isPerfect, isTrue, join, join, join, lastModified, loadProperties, merge, mergeProperties, mergeProperties, newHashMap, newList, newList, newMap, newMap, newSet, newSet, normalize, normalize, parseHeader, parseHeader, printClause, printClauses, printClauses, progress, propertiesChanged, read, refresh, removeDuplicateMarker, replaceAll, replaceWitInstruction, setExceptions, setFileMustExist, setForceLocal, setParent, setPedantic, setProperties, setProperties, setProperties, setProperty, setTrace, split, split, split, trace, unsetProperty, updateModified, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Builder

public Builder(Processor parent)

Builder

public Builder()
Method Detail

build

public Jar build()
          throws Exception
Throws:
Exception

hasSources

public boolean hasSources()

getImportPackages

protected String getImportPackages()
Description copied from class: Analyzer
Analyzer has an empty default but the builder has a * as default.

Overrides:
getImportPackages in class Analyzer
Returns:

analyze

public void analyze()
             throws IOException
Intercept the call to analyze and cleanup versions after we have analyzed the setup. We do not want to cleanup if we are going to verify.

Overrides:
analyze in class Analyzer
Throws:
IOException

cleanupVersion

public void cleanupVersion(Map<String,Map<String,String>> mapOfMap)

getSourcePath

public Collection<File> getSourcePath()

setSourcepath

public void setSourcepath(File[] files)

addSourcepath

public void addSourcepath(File cp)

doPom

public void doPom(Jar dot)
           throws FileNotFoundException,
                  IOException
Create a POM reseource for Maven containing as much information as possible from the manifest.

Parameters:
output -
builder -
Throws:
FileNotFoundException
IOException

close

public void close()
Specified by:
close in interface Closeable
Overrides:
close in class Analyzer

builds

public Jar[] builds()
             throws Exception
Build Multiple jars. If the -sub command is set, we filter the file with the given patterns.

Returns:
Throws:
Exception

getSubBuilder

public Builder getSubBuilder()
                      throws Exception
Throws:
Exception

_maven_version

public String _maven_version(String[] args)
A macro to convert a maven version to an OSGi version


_permissions

public String _permissions(String[] args)
                    throws IOException
Throws:
IOException

removeBundleSpecificHeaders

public void removeBundleSpecificHeaders()


Copyright © 2010 aQute SARL. All Rights Reserved.