Package aQute.bnd.osgi
Class Builder
java.lang.Object
aQute.bnd.osgi.Domain
aQute.bnd.osgi.Processor
aQute.bnd.osgi.Analyzer
aQute.bnd.osgi.Builder
- All Implemented Interfaces:
Constants
,Registry
,Report
,Reporter
,Closeable
,AutoCloseable
,Iterable<String>
- Direct Known Subclasses:
JUnitFramework.BundleBuilder
,ProjectBuilder
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.27 $
-
Nested Class Summary
Nested classes/interfaces inherited from class aQute.bnd.osgi.Analyzer
Analyzer.Check
Nested classes/interfaces inherited from class aQute.bnd.osgi.Processor
Processor.CL, Processor.FileLine, Processor.SetLocationImpl
Nested classes/interfaces inherited from interface aQute.service.reporter.Report
Report.Location
Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter
Reporter.SetLocation
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final String
private BuilderInstructions
(package private) static CDIAnnotations
private Instructions
private final DiffPluginImpl
(package private) static DSAnnotations
(package private) boolean
private static final String[]
private static final Pattern
private static final Pattern
#388 Manifest header to get GIT head Get the head commit number.private static final Pattern
private static final org.slf4j.Logger
private final Make
(package private) static MakeBnd
(package private) static MakeCopy
(package private) static MetatypeAnnotations
(package private) static JPMSAnnotations
(package private) static JPMSModuleInfoPlugin
(package private) static ServiceComponent
(package private) static SPIDescriptorGenerator
private static final int
private static final int
private static final int
private static final int
private static final int
private Tree
private Pattern
Fields inherited from class aQute.bnd.osgi.Analyzer
_classesHelp, _md5Help, _packagesHelp, _sha1Help, DEFAULT_CONSUMER_POLICY, DEFAULT_PROVIDER_POLICY, fuzzyModifier, fuzzyVersion, fuzzyVersionRange, msgs, OBJECT_REFERENCE, OLD_PACKAGEINFO_SYNTAX_P
Fields inherited from class aQute.bnd.osgi.Processor
_frangeHelp, _uriHelp, BUFFER_SIZE, current, errors, exceptions, fileMustExist, filter, fixupMessages, LIST_SPLITTER, locations, log, pedantic, profile, properties, strict, trace, upto, warnings
Fields inherited from class aQute.bnd.osgi.Domain
translation
Fields inherited from interface aQute.bnd.osgi.Constants
ACCESS_ATTRIBUTE, AUGMENT, AUGMENT_CAPABILITY_DIRECTIVE, AUGMENT_RANGE_ATTRIBUTE, AUGMENT_REQUIREMENT_DIRECTIVE, AUTOMATIC_MODULE_NAME, BASELINE, BASELINEREPO, BLUEPRINT_TIMEOUT_ATTRIBUTE, BLUEPRINT_WAIT_FOR_DEPENDENCIES_ATTRIBUTE, BND_ADDXMLTOTEST, BND_LASTMODIFIED, BND_USE_ATTRIBUTES, BNDDRIVER, BNDDRIVER_ANT, BNDDRIVER_BND, BNDDRIVER_ECLIPSE, BNDDRIVER_GRADLE, BNDDRIVER_GRADLE_NATIVE, BNDDRIVER_INTELLIJ, BNDDRIVER_MAVEN, BNDDRIVER_OSMORC, BNDDRIVER_SBT, BSN_SOURCE_SUFFIX, BUILDERIGNORE, BUILDFILES, BUILDPATH, BUILDREPO, BUMPPOLICY, BUNDLE_ACTIVATIONPOLICY, BUNDLE_ACTIVATOR, BUNDLE_BLUEPRINT, BUNDLE_CATEGORY, BUNDLE_CLASSPATH, BUNDLE_CONTACTADDRESS, BUNDLE_CONTRIBUTORS, BUNDLE_COPYRIGHT, BUNDLE_DESCRIPTION, BUNDLE_DEVELOPERS, BUNDLE_DOCURL, BUNDLE_ICON, BUNDLE_LICENSE, BUNDLE_LOCALIZATION, BUNDLE_MANIFESTVERSION, BUNDLE_NAME, BUNDLE_NATIVECODE, BUNDLE_REQUIREDEXECUTIONENVIRONMENT, BUNDLE_SCM, BUNDLE_SPECIFIC_HEADERS, BUNDLE_SYMBOLIC_NAME_ATTRIBUTE, BUNDLE_SYMBOLICNAME, BUNDLE_UPDATELOCATION, BUNDLE_VENDOR, BUNDLE_VERSION, BUNDLE_VERSION_ATTRIBUTE, BUNDLEANNOTATIONS, CARDINALITY_DIRECTIVE, CDIANNOTATIONS, CHECK, CLASS_ATTRIBUTE, CLASSPATH, COMMAND_DIRECTIVE, COMPONENT_ACTIVATE, COMPONENT_CONFIGURATION_POLICY, COMPONENT_DEACTIVATE, COMPONENT_DESCRIPTORS, COMPONENT_DESIGNATE, COMPONENT_DESIGNATEFACTORY, COMPONENT_DIRECTIVES, COMPONENT_DIRECTIVES_1_1, COMPONENT_DIRECTIVES_1_2, COMPONENT_DYNAMIC, COMPONENT_ENABLED, COMPONENT_FACTORY, COMPONENT_GREEDY, COMPONENT_IMMEDIATE, COMPONENT_IMPLEMENTATION, COMPONENT_MODIFIED, COMPONENT_MULTIPLE, COMPONENT_NAME, COMPONENT_NAMESPACE, COMPONENT_OPTIONAL, COMPONENT_PROPERTIES, COMPONENT_PROVIDE, COMPONENT_SERVICEFACTORY, COMPONENT_VERSION, COMPRESSION, CONDITIONAL_PACKAGE, CONDITIONALPACKAGE, CONDUIT, CONNECTION_SETTINGS, CONSUMER_POLICY, CONTRACT, CREATED_BY, CURRENT_BUNDLESYMBOLICNAME, CURRENT_BUNDLEVERSION, CURRENT_PACKAGE, CURRENT_USES, CURRENT_VERSION, DEFAULT_BAR_EXTENSION, DEFAULT_BND_EXTENSION, DEFAULT_BNDRUN_EXTENSION, DEFAULT_CHARSET, DEFAULT_DO_NOT_COPY, DEFAULT_JAR_EXTENSION, DEFAULT_LAUNCHER_BSN, DEFAULT_PREPROCESSS_MATCHERS, DEFAULT_PROP_BIN_DIR, DEFAULT_PROP_SRC_DIR, DEFAULT_PROP_TARGET_DIR, DEFAULT_PROP_TESTBIN_DIR, DEFAULT_PROP_TESTSRC_DIR, DEFAULT_TESTER_BSN, DEFINE_CONTRACT, DEPENDSON, DEPLOY, DEPLOYREPO, DESCRIPTION_ATTRIBUTE, DIFFIGNORE, DIFFPACKAGES, DIGESTS, directives, DISTRO, DONOTCOPY, DSANNOTATIONS, DSANNOTATIONS_OPTIONS, DUPLICATE_MARKER, DYNAMICIMPORT_PACKAGE, EE_ATTRIBUTE, EEPROFILE, EEPROFILE_AUTO_ATTRIBUTE, EFFECTIVE_DIRECTIVE, EMBEDDED_REPO, EMPTY_HEADER, EXCLUDE_DIRECTIVE, EXECUTABLE, EXPORT, EXPORT_APIGUARDIAN, EXPORT_BSN, EXPORT_CONTENTS, EXPORT_NAME, EXPORT_PACKAGE, EXPORT_SERVICE, EXPORT_TYPE, EXPORT_VERSION, EXPORTS_ATTRIBUTE, EXPORTTYPE, EXTENSION, EXTENSION_DIRECTIVE, FAIL_OK, FILTER_DIRECTIVE, FIXUPMESSAGES, FIXUPMESSAGES_IS_DIRECTIVE, FIXUPMESSAGES_IS_ERROR, FIXUPMESSAGES_IS_IGNORE, FIXUPMESSAGES_IS_WARNING, FIXUPMESSAGES_REPLACE_DIRECTIVE, FIXUPMESSAGES_RESTRICT_DIRECTIVE, FRAGMENT_ATTACHMENT_DIRECTIVE, FRAGMENT_HOST, FROM_DIRECTIVE, GENERATE, GESTALT, GESTALT_BATCH, GESTALT_CI, GESTALT_INTERACTIVE, GESTALT_OFFLINE, GESTALT_SHELL, GROUPID, headers, IDENTITY_INITIAL_RESOURCE, IDENTITY_SYSTEM_RESOURCE, IGNORE_ATTRIBUTE, IGNORE_PACKAGE, IGNORE_STANDALONE, IMPORT_DIRECTIVE, IMPORT_PACKAGE, IMPORT_PRIVATE, IMPORT_REFERENCE, IMPORT_SERVICE, importDirectives, INCLUDE, INCLUDE_DIRECTIVE, INCLUDE_RESOURCE, INCLUDEPACKAGE, INCLUDERESOURCE, INIT, INTERNAL_BUNDLESYMBOLICNAME_DIRECTIVE, INTERNAL_BUNDLEVERSION_DIRECTIVE, INTERNAL_EXPORT_TO_MODULES_DIRECTIVE, INTERNAL_EXPORTED_DIRECTIVE, INTERNAL_MODULE_DIRECTIVE, INTERNAL_MODULE_VERSION_DIRECTIVE, INTERNAL_OPEN_TO_MODULES_DIRECTIVE, INTERNAL_PREFIX, INTERNAL_SOURCE_DIRECTIVE, INVALIDFILENAMES, JAVA, JAVA_DEBUG, JAVAAGENT, JAVAC, JAVAC_ENCODING, JAVAC_PROFILE, JAVAC_SOURCE, JAVAC_TARGET, JIDENTIFIER, JPMS_MODULE_INFO, JPMS_MODULE_INFO_OPTIONS, KEYSTORE_LOCATION_DIRECTIVE, KEYSTORE_PASSWORD_DIRECTIVE, KEYSTORE_PROVIDER_DIRECTIVE, LANGUAGE_ATTRIBUTE, LAUNCH_ACTIVATION_EAGER, LAUNCH_ACTIVATORS, LAUNCH_RUNBUNDLES_ATTRS, LAUNCH_STARTLEVEL_DEFAULT, LAUNCH_TRACE, LAUNCHER_PLUGIN, LIB_DIRECTIVE, LIBRARY, LINK_ATTRIBUTE, LITERAL_ATTRIBUTE, MAIN_CLASS, MAKE, MANDATORY_DIRECTIVE, MANIFEST, MANIFEST_NAME, MAVEN_DEPENDENCIES, MAVEN_RELEASE, MAVEN_SCOPE, META_PERSISTENCE, METAPACKAGES, METATYPE, METATYPE_ANNOTATIONS, METATYPE_ANNOTATIONS_OPTIONS, MIME_TYPE_BUNDLE, MIME_TYPE_JAR, MODULE_INFO_CLASS, MODULES_ATTRIBUTE, NAME_ATTRIBUTE, NAMESECTION, NAMESPACE_STEM, NO_IMPORT_DIRECTIVE, NOANNOTATIONS, NOBUILDINCACHE, NOBUNDLES, NOCLASSFORNAME, NODEFAULTVERSION, NOEE, NOEXTRAHEADERS, NOIMPORTJAVA, NOJUNIT, NOJUNITOSGI, NOMANIFEST, NONE, NOT_A_BUNDLE_S, NOUSES, OPTIONAL, options, OSGI_SYNTAX_HEADERS, OSNAME_ATTRIBUTE, OSVERSION_ATTRIBUTE, OUTPUT, OUTPUTMASK, PACKAGEINFOTYPE, PATH_DIRECTIVE, PEDANTIC, PLUGIN, PLUGINPATH, PLUGINPATH_SHA1_ATTR, PLUGINPATH_URL_ATTR, POM, PREPROCESSMATCHERS, PRESENCE_DIRECTIVE, PRIVATE_DIRECTIVE, PRIVATE_PACKAGE, PRIVATEPACKAGE, PROCESSOR_ATTRIBUTE, PROFILE, PROVIDE_CAPABILITY, PROVIDE_DIRECTIVE, PROVIDER_POLICY, PROVIDER_TYPE_DIRECTIVE, RELEASEREPO, REMOTEWORKSPACE, REMOVE_ATTRIBUTE_DIRECTIVE, REMOVEHEADERS, REPORTNEWER, REPOSITORIES, REPRODUCIBLE, REQUIRE_BND, REQUIRE_BUNDLE, REQUIRE_CAPABILITY, RESOLUTION, RESOLUTION_DIRECTIVE, RESOLUTION_DYNAMIC, RESOLVE, RESOLVE_EFFECTIVE, RESOLVE_EXCLUDESYSTEM, RESOLVE_PREFERENCES, RESOLVEDEBUG, RESOURCEONLY, RUNBLACKLIST, RUNBUILDS, RUNBUNDLES, RUNBUNDLES_STARTLEVEL_ATTRIBUTE, RUNEE, RUNENV, RUNFRAMEWORK, RUNFRAMEWORK_NONE, RUNFRAMEWORK_SERVICES, RUNFRAMEWORKRESTART, RUNFW, RUNJDB, RUNKEEP, RUNNOREFERENCES, RUNOPTIONS, RUNOPTIONS_EAGER, RUNPATH, RUNPROGRAMARGS, RUNPROPERTIES, RUNPROVIDEDCAPABILITIES, RUNREMOTE, RUNREPOS, RUNREQUIRES, RUNSTARTLEVEL, RUNSTARTLEVEL_BEGIN, RUNSTARTLEVEL_ORDER, RUNSTARTLEVEL_STEP, RUNSTORAGE, RUNSYSTEMCAPABILITIES, RUNSYSTEMPACKAGES, RUNTIMEOUT, RUNTRACE, RUNVM, SAVEMANIFEST, SELECTION_FILTER_ATTRIBUTE, SERVICE_COMPONENT, SERVICELOADER_NAMESPACE, SERVICELOADER_REGISTER_DIRECTIVE, SIGN, SIGN_PASSWORD_DIRECTIVE, SIGNATURE_TEST, SINGLETON_DIRECTIVE, SIZE_ATTRIBUTE, SNAPSHOT, SOURCEPATH, SOURCES, SPECIFICATION_VERSION, SPLIT_PACKAGE_DIRECTIVE, STALECHECK, STANDALONE, STATIC_ATTRIBUTE, STRICT, SUB, SUBSTITUTE_ATTRIBUTE, SYSTEMPROPERTIES, TESTCASES, TESTCONTINUOUS, TESTER, TESTER_PLUGIN, TESTPACKAGES, TESTPATH, TESTSOURCES, TESTTERMINATE, TESTUNRESOLVED, TOOL, TRANSITIVE_ATTRIBUTE, TSTAMP, UNDERTEST, UPTO, USES_DIRECTIVE, USES_USES, VALID_PROPERTY_TYPES, VERSION_ATTR_HASH, VERSION_ATTR_LATEST, VERSION_ATTR_PROJECT, VERSION_ATTR_SNAPSHOT, VERSION_ATTRIBUTE, VERSION_FILTER, VERSIONDEFAULTS, VISIBILITY_DIRECTIVE, WAB, WABLIB, WORKINGSET, WORKINGSET_MEMBER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_maven_version
(String[] args) A macro to convert a maven version to an OSGi version_permissions
(String[] args) boolean
addAll
(Jar to, Jar sub, Instruction filter) Add all the resources in the given jar that match the given filter.boolean
addAll
(Jar to, Jar sub, Instruction filter, String destination) Add all the resources in the given jar that match the given filter.private boolean
private void
void
addSourcepath
(File cp) void
addSourcepath
(Collection<File> sourcepath) private void
addSources
(Jar dot) private void
Add a wab lib to the jar.void
analyze()
Intercept the call to analyze and cleanup versions after we have analyzed the setup.build()
Jar[]
builds()
Build Multiple jars.protected void
changedFile
(File f) void
cleanupVersion
(Packages packages, String defaultVersion) void
cleanupVersion
(Packages packages, String defaultVersion, String what) private void
Copyprivate void
private void
private void
copyPackage
(Jar dest, List<Jar> providers, String path, int splitStrategy) Copy the package from the providers based on the split package strategy.private String
diagnostic
(String pack, List<Jar> culprits) Analyze the classpath for a split packageprotected void
doBaseline
(Jar dot) Base line against a previous version.private void
doClassAttribute
(Jar jar, String name, Map<String, String> extra, Instructions preprocess, boolean absentIsOk) private void
doCommand
(Jar jar, String source, String destination, Map<String, String> extra, Instructions preprocess, boolean absentIsOk) It is possible in Include-Resource to use a system command that generates the contents, this is indicated withcmd
attribute.void
Diff this bundle to another bundle for the given packages.private void
Check if we need to calculate any checksums.private void
private Set<Instruction>
Destructively filter the packages from the build up index.private void
doIncludeResource
(Jar jar, Parameters clauses) private void
doIncludeResource
(Jar jar, String includes) private void
private void
doIncludeResources
(Jar jar) Parse the Bundle-Includes header.protected void
Called when we're done with a builderboolean
boolean
doNotCopy The doNotCopy variable maintains a patter for files that should not be copied.(package private) void
private String
doResourceDirectory
(Jar jar, Map<String, String> extra, Instructions preprocess, File sourceFile, String destinationPath) private void
doSaveManifest
(Jar dot) Get the manifest and write it out separately if -savemanifest is setprivate String
doSnapshot
(String version) private void
private Jar
Turn this normal bundle in a web and add any resources.private void
extractFromJar
(Jar jar, String source, String destination, boolean absentIsOk, Map<String, String> extra) Extra resources from a Jar and add them to the given jar.filterFrom
(Instruction from, List<Jar> providers) private long
findLastModifiedWhileOlder
(File file, long lastModified) Check if a file or directory is older than the given time.from
(BuilderSpecification spec) Collect the information from theBuilderSpecification
private Jar
getClasspathEntrySuffix
(File resource) Answer the string of the resource that it has in the container.protected Jar
getExtra()
Answer extra packages.Extra the paths for the directories and files that are used in the Include-Resource header.private Instructions
getPreProcessMatcher
(Map<String, String> extra) private int
getSplitStrategy
(String type) getSubBuilder
(File file) Answer a list of builders that represent this file or a list of files specified in -sub.boolean
void
init()
Allow any local initialization by subclasses before we build.boolean
isInScope
(Collection<File> resources) Check if the given resource is in scope of this bundle.private Instruction
matches
(Instructions instructions, String pack, Set<Instruction> unused, String source) Matches the instructions against a package.private void
private static boolean
pathStartsWith
(String path, String prefix) void
void
Create a report of the settingsprivate void
resolveFiles
(File dir, FileFilter filter, boolean recursive, String path, Map<String, File> files, boolean flatten) void
setSourcepath
(File[] files) protected void
setTypeSpecificPlugins
(PluginsContainer pluginsContainer) private void
Show the diff recursively(package private) void
Sign the jar file.protected void
startBuild
(Builder builder) Called when we start to build a builderWe override system so that, for the duration of a build operation, we may cache the result of a given system call.private void
Methods inherited from class aQute.bnd.osgi.Analyzer
_bsn, _classes, _ee, _exporters, _exports, _findname, _findpath, _imports, _md5, _packageattribute, _packages, _sha1, addClasspath, addClasspath, addClasspath, applyVersionPolicy, assignable, assignable, assignable, assignable, augmentExports, augmentImports, begin, calcManifest, calculateExportsFromContents, calculateVersionRange, check, cleanupModifier, cleanupUses, cleanupVersion, clear, close, divideRegularAndDynamicImports, doExportsToImports, doNameSection, doRequireBnd, doUses, doUses, filter, findClass, findClasspathEntry, findPath, findProvidedPackages, findResource, findResources, fixupAttributes, forceRefresh, getAPIUses, getBndInfo, getBndLastModified, getBndVersion, getBsn, getBundleClassPathEntry, getBundleClassPathTypes, getClasses, getClasspath, getClasspathExports, getClassSignature, getClassspace, getClassspace, getContained, getDescriptor, getEEs, getExports, getFieldSignature, getHighestEE, getHostPackages, getImports, getJar, getJarFromName, getJarsFromName, getLowestEE, getManifest, getMethodSignature, getName, getOutputFile, getPackageInfo, getPackageRef, getPackages, getPrivates, getReferred, getRequireBundlePackages, getSourceFileFor, getSourceFileFor, getTarget, getTypeRef, getTypeRefFromFQN, getTypeRefFromPath, getUnreachable, getUses, getVersion, getVersionPolicy, getXRef, isImported, isNoBundle, isResourceOnly, mergeManifest, nonClassReferTo, parsePackageinfo, putAll, referred, referTo, referToByBinaryName, removeAttributes, removeDynamicImports, removeTransitive, save, setBase, setClasspath, setClasspath, setClasspath, setClasspath, setDefaults, setDiagnostics, setJar, setJar, setTypeLocation, validResourcePath, verifyManifestHeadersCase
Methods inherited from class aQute.bnd.osgi.Processor
_basedir, _fileuri, _findfile, _frange, _native_capability, _propertiesdir, _propertiesname, _random, _thisfile, _uri, addBasicPlugin, addClose, addExtensions, addIncluded, addProperties, addProperties, append, appendPath, beginHandleErrors, check, concat, customize, decorated, decorated, doAttrbutes, doIncludeFile, doIncludeFile, endHandleErrors, error, error, exception, exists, findHeader, findHeader, findHeader, formatArrays, get, get, getBase, getBaseURI, getChecksum, getClass, getDuration, getErrors, getExecutor, getFile, getFile, getFlattenedProperties, getFlattenedProperties, getHeader, getHeader, getHeader, getHeader, getIncluded, getInfo, getInfo, getInstructions, getJavaExecutable, getLine, getLoader, getLocation, getLogger, getMacroDomains, getManifestAsProperties, getMergedParameters, getParameters, getParent, getPlugin, getPlugins, getPlugins, getProfile, getPromiseFactory, getProperties, getPropertiesFile, getProperty, getProperty, getProperty, getPropertyKeys, getReplacer, getScheduledExecutor, getSelfAndAncestors, getSettings, getTop, getUnexpandedProperty, getUnprocessedProperty, getWarnings, is, isDuplicate, isExceptions, isFailOk, isInteractive, isMissingPlugin, isOk, isPedantic, isPerfect, isStrict, isTrace, isTrue, iterator, join, join, join, join, join, join, keySet, lastModified, loadProperties, loadProperties0, makePrintable, merge, mergeLocalProperties, mergeProperties, mergeProperties, mergeProperties, mergeProperties, newHashMap, newList, newList, newMap, newMap, newSet, newSet, normalize, normalize, parseHeader, parseHeader, printClause, printClauses, printClauses, printExceptionSummary, printStackTrace, progress, progress, propertiesChanged, quote, read, refresh, removeBasicPlugin, removeClose, removeDuplicateMarker, replaceAll, replaceExtension, report, set, setExceptions, setFileMustExist, setForceLocal, setLocation, setParent, setPedantic, setProperties, setProperties, setProperties, setProperties, setPropertiesFile, setProperty, setTrace, signal, since, split, split, split, spliterator, stream, system, toFullHeaderPattern, toString, trace, tree, unsetProperty, updateModified, use, warning
Methods inherited from class aQute.bnd.osgi.Domain
copyFrom, domain, domain, domain, domain, domain, domain, domain, getBundleActivator, getBundleCategory, getBundleClasspath, getBundleClassPath, getBundleContactAddress, getBundleCopyright, getBundleDescription, getBundleDocURL, getBundleName, getBundleNative, getBundleRequiredExecutionEnvironment, getBundleSymbolicName, getBundleVendor, getBundleVersion, getDynamicImportPackage, getExportContents, getExportPackage, getFragmentHost, getIcon, getImportPackage, getIncludeResource, getParameters, getParameters, getParameters, getParameters, getPrivatePackage, getProvideCapability, getRequireBundle, getRequireCapability, getRunblacklist, getRunee, isSources, normalizeKey, setAugment, setBundleActivator, setBundleClasspath, setBundleRequiredExecutionEnvironment, setBundleSymbolicName, setBundleVersion, setBundleVersion, setConditionalPackage, setExportContents, setExportPackage, setFailOk, setImportPackage, setIncludePackage, setIncludeResource, setPrivatePackage, setRunblacklist, setRunee, setRunfw, setRunRequires, setSources, setTranslation, translate, translate
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
IR_PATTERN
-
differ
-
xdoNotCopy
-
SPLIT_MERGE_LAST
private static final int SPLIT_MERGE_LAST- See Also:
-
SPLIT_MERGE_FIRST
private static final int SPLIT_MERGE_FIRST- See Also:
-
SPLIT_ERROR
private static final int SPLIT_ERROR- See Also:
-
SPLIT_FIRST
private static final int SPLIT_FIRST- See Also:
-
SPLIT_DEFAULT
private static final int SPLIT_DEFAULT- See Also:
-
sourcePath
-
make
-
defaultPreProcessMatcher
-
buildInstrs
-
cachedSystemCalls
-
fixed
-
firstUse
boolean firstUse -
tree
-
makeBnd
-
makeCopy
-
serviceComponent
-
cdiAnnotations
-
dsAnnotations
-
metatypeAnnotations
-
moduleAnnotations
-
moduleInfoPlugin
-
spiDescriptorGenerator
-
GITREF_P
#388 Manifest header to get GIT head Get the head commit number. Look for a .git/HEAD file, going up in the file hierarchy. Then get this file, and resolve any symbolic reference. -
GIT_WORKTREES_P
-
_githeadHelp
- See Also:
-
-
Constructor Details
-
Builder
-
Builder
-
Builder
public Builder()
-
-
Method Details
-
build
- Throws:
Exception
-
getBuildJar
-
doPom
- Throws:
Exception
IOException
-
doDigests
Check if we need to calculate any checksums.- Parameters:
dot
-- Throws:
Exception
-
init
Allow any local initialization by subclasses before we build.- Throws:
Exception
-
doWab
Turn this normal bundle in a web and add any resources.- Throws:
Exception
-
pathStartsWith
-
addWabLib
Add a wab lib to the jar.- Parameters:
f
-- Throws:
Exception
-
doSaveManifest
Get the manifest and write it out separately if -savemanifest is set- Parameters:
dot
-- Throws:
Exception
-
changedFile
-
sign
Sign the jar file. -sign :[ ';' 'password:=' ] [ ';' 'keystore:=' ] [ ';' 'sign-password:=' ] ( ',' ... )* - Throws:
Exception
-
hasSources
public boolean hasSources() -
getExtra
Answer extra packages. In this case we implement conditional package. Any -
analyze
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. -
doSnapshot
-
cleanupVersion
-
cleanupVersion
-
addSources
- Throws:
IOException
Exception
-
getSourcePath
-
doVerify
- Throws:
Exception
-
doExpand
- Throws:
Exception
-
doExpand
private Set<Instruction> doExpand(Jar jar, MultiMap<String, Jar> index, Instructions filter) throws ExceptionDestructively filter the packages from the build up index. This index is used by the Export Package as well as the Private Package- Throws:
Exception
-
filterFrom
- Parameters:
from
-
-
copyPackage
Copy the package from the providers based on the split package strategy. -
copy
Copy -
diagnostic
Analyze the classpath for a split package -
getSplitStrategy
-
matches
private Instruction matches(Instructions instructions, String pack, Set<Instruction> unused, String source) Matches the instructions against a package.- Parameters:
instructions
- The list of instructionspack
- The name of the packageunused
- The total list of patterns, matched patterns are removedsource
- The name of the source container, can be filtered upon with the from: directive.
-
doIncludeResources
Parse the Bundle-Includes header. Files in the bundles Include header are included in the jar. The source can be a directory or a file. -
doIncludeResource
- Throws:
Exception
-
doIncludeResource
private void doIncludeResource(Jar jar, Parameters clauses) throws ZipException, IOException, Exception - Throws:
ZipException
IOException
Exception
-
doIncludeResource
private void doIncludeResource(Jar jar, String name, Map<String, String> extra) throws ZipException, IOException, Exception- Throws:
ZipException
IOException
Exception
-
doClassAttribute
private void doClassAttribute(Jar jar, String name, Map<String, String> extra, Instructions preprocess, boolean absentIsOk) throws Exception- Throws:
Exception
-
addExtra
-
getPreProcessMatcher
-
doCommand
private void doCommand(Jar jar, String source, String destination, Map<String, String> extra, Instructions preprocess, boolean absentIsOk) throws ExceptionIt is possible in Include-Resource to use a system command that generates the contents, this is indicated withcmd
attribute. The command can be repeated for a number of source files with thefor
attribute which indicates a list of repetitions, often down with theMacro._lsa(String[])
orMacro#_lsb(String[])
macro. The repetition will repeat the given command for each item. The @} macro can be used to replace the current item. If nofor
is given, the source is used as the only item. If the destination contains a macro, each iteration will create a new file, otherwise the destination name is used.- Parameters:
jar
-source
-destination
-extra
-preprocess
-absentIsOk
-- Throws:
Exception
-
traverse
-
findLastModifiedWhileOlder
Check if a file or directory is older than the given time.- Parameters:
file
-lastModified
-
-
doResourceDirectory
private String doResourceDirectory(Jar jar, Map<String, String> extra, Instructions preprocess, File sourceFile, String destinationPath) throws Exception- Throws:
Exception
-
resolveFiles
-
noSuchFile
private void noSuchFile(Jar jar, String clause, Map<String, String> extra, String source, String destinationPath) throws Exception- Throws:
Exception
-
extractFromJar
private void extractFromJar(Jar jar, String source, String destination, boolean absentIsOk, Map<String, String> extra) throws ZipException, IOExceptionExtra resources from a Jar and add them to the given jar.- Parameters:
extra
-- Throws:
ZipException
IOException
-
addAll
Add all the resources in the given jar that match the given filter.- Parameters:
sub
- the jarfilter
- a pattern that should match the resoures in sub to be added
-
addAll
Add all the resources in the given jar that match the given filter.- Parameters:
sub
- the jarfilter
- a pattern that should match the resoures in sub to be added
-
addAll
-
copy
private void copy(Jar jar, String path, File from, Instructions preprocess, Map<String, String> extra) throws Exception- Throws:
Exception
-
copy
-
setSourcepath
-
addSourcepath
-
builds
Build Multiple jars. If the -sub command is set, we filter the file with the given patterns.- Throws:
Exception
-
startBuild
Called when we start to build a builder- Throws:
Exception
-
doneBuild
Called when we're done with a builder- Throws:
Exception
-
getSubBuilders
Answer a list of builders that represent this file or a list of files specified in -sub. This list can be empty. These builders represents to be created artifacts and are each scoped to such an artifacts. The builders can be used to build the bundles or they can be used to find out information about the to be generated bundles.- Returns:
- List of 0..n builders representing artifacts.
- Throws:
Exception
-
getSubBuilder
- Throws:
Exception
-
getSubBuilder
- Throws:
Exception
-
_maven_version
A macro to convert a maven version to an OSGi version -
_permissions
-
removeBundleSpecificHeaders
public void removeBundleSpecificHeaders() -
isInScope
Check if the given resource is in scope of this bundle. That is, it checks if the Include-Resource includes this resource or if it is a class file it is on the class path and the Export-Package or Private-Package include this resource.- Throws:
Exception
-
getIncludedResourcePrefixes
Extra the paths for the directories and files that are used in the Include-Resource header. -
getClasspathEntrySuffix
Answer the string of the resource that it has in the container. It is possible that the resource is a classpath entry. In that case an empty string is returned.- Parameters:
resource
- The resource to look for- Returns:
- A suffix on the classpath or "" if the resource is a class path entry
- Throws:
Exception
-
doNotCopy
doNotCopy The doNotCopy variable maintains a patter for files that should not be copied. There is a defaultConstants.DEFAULT_DO_NOT_COPY
but this ca be overridden with theConstants.DONOTCOPY
property. -
doNotCopy
-
getDoNotCopy
-
setTypeSpecificPlugins
- Overrides:
setTypeSpecificPlugins
in classAnalyzer
-
doDiff
Diff this bundle to another bundle for the given packages.- Throws:
Exception
-
show
Show the diff recursively -
addSourcepath
-
doBaseline
Base line against a previous version. Should be overridden in the ProjectBuilder where we have access to the repos- Throws:
Exception
-
_githead
- Throws:
IOException
-
report
Create a report of the settings -
from
Collect the information from theBuilderSpecification
- Throws:
IOException
-
system
public String system(boolean allowFail, String command, String input) throws IOException, InterruptedException We override system so that, for the duration of a build operation, we may cache the result of a given system call. In a large build with many 'make' build jars, such as some OSGi CT build projects, we may call system hundreds of time to compute headers based upon git information such as 'git describe'. Since this information will not change during the course of a single build operation, we cache results to only call once.- Overrides:
system
in classProcessor
- Throws:
IOException
InterruptedException
-