Package aQute.bnd.build
Class Project
- java.lang.Object
-
- aQute.bnd.osgi.Domain
-
- aQute.bnd.osgi.Processor
-
- aQute.bnd.build.Project
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class aQute.bnd.osgi.Processor
Processor.CL, Processor.FileLine
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BNDCNF
static java.lang.String
BNDFILE
ProjectInstructions
instructions
static java.lang.String
SHA_256
java.util.Map<java.lang.String,Container>
unreferencedClasspathEntries
-
Fields inherited from class aQute.bnd.osgi.Processor
LIST_SPLITTER, log
-
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
_help(java.lang.String[] args)
java.lang.String
_ide(java.lang.String[] args)
java.lang.String
_p_allsourcepath(java.lang.String[] args)
java.lang.String
_p_bootclasspath(java.lang.String[] args)
java.lang.String
_p_buildpath(java.lang.String[] args)
java.lang.String
_p_dependson(java.lang.String[] args)
java.lang.String
_p_output(java.lang.String[] args)
java.lang.String
_p_sourcepath(java.lang.String[] args)
java.lang.String
_p_testpath(java.lang.String[] args)
java.lang.String
_project(java.lang.String[] args)
java.lang.String
_repo(java.lang.String[] args)
java.lang.String
_repos(java.lang.String[] args)
void
action(java.lang.String command)
void
action(java.lang.String command, java.lang.Object... args)
void
addClasspath(java.io.File f)
bnd maintains a class path that is set by the environment, i.e.void
baseline()
Do a baseline for this projectjava.io.File[]
build()
java.io.File[]
build(boolean underTest)
This is the external method that will pre-build any dependencies if it is out of date.java.io.File[]
buildLocal(boolean underTest)
Build without doing any dependency checking.void
bump()
void
bump(java.lang.String mask)
Bump the version of this project.void
clean()
void
clearClasspath()
void
compile(boolean test)
void
copy(RepositoryPlugin source, Instructions filter, RepositoryPlugin destination)
void
copy(RepositoryPlugin source, java.lang.String filter, RepositoryPlugin destination)
Copy a repository to another repositoryvoid
deploy()
Deploy the current project to a repositoryvoid
deploy(java.io.File file)
Deploy the file (which must be a bundle) into the repository.void
deploy(java.lang.String name, java.io.File file)
Deploy the file (which must be a bundle) into the repository.void
doMavenPom(Strategy strategyx, java.util.List<Container> result, java.lang.String action)
The user selected pom in a path.void
export(java.lang.String runFilePath, boolean keep, java.io.File output)
Deprecated.java.util.Map.Entry<java.lang.String,Resource>
export(java.lang.String type, java.util.Map<java.lang.String,java.lang.String> options)
Export this project via the exporters.void
exportRunbundles(java.lang.String runFilePath, java.io.File outputDir)
void
fillActions(java.util.Map<java.lang.String,Action> all)
java.util.Map<java.lang.String,Action>
getActions()
java.util.Collection<java.io.File>
getAllsourcepath()
java.util.Collection<Container>
getBootclasspath()
java.util.Collection<java.lang.String>
getBsns()
java.util.Set<Project>
getBuildDependencies()
Return the direct build dependencies of this project.ProjectBuilder
getBuilder(ProjectBuilder parent)
Return a new builder that is nicely setup for this project.java.io.File[]
getBuildFiles()
This method must only be called when it is sure that the project has been build before in the same session.java.io.File[]
getBuildFiles(boolean buildIfAbsent)
java.util.Collection<Container>
getBuildpath()
Container
getBundle(java.lang.String bsn, java.lang.String range, Strategy strategy, java.util.Map<java.lang.String,java.lang.String> attrs)
Get a bundle from one of the plugin repositories.Container
getBundle(org.osgi.resource.Resource r)
java.util.List<Container>
getBundles(Strategy strategyx, java.lang.String spec, java.lang.String source)
Analyze the header and return a list of files that should be on the build, test or some other path.java.util.List<Container>
getBundlesWildcard(java.lang.String bsnPattern, java.lang.String range, Strategy strategyx, java.util.Map<java.lang.String,java.lang.String> attrs)
Get all bundles matching a wildcard expression.int
getChanged()
java.lang.String
getChecksum()
A checksum based on the values of the propertiesjava.util.Collection<Container>
getClasspath()
Packages
getContained()
Get the contained packages calculated from all builders from the last buildContainer
getDeliverable(java.lang.String bsn, java.util.Map<java.lang.String,java.lang.String> attrs)
Answer the container associated with a given bsn.java.util.Collection<Container>
getDeliverables()
Returns containers for the deliverables of this project.java.util.Set<Project>
getDependents()
Return the full transitive dependents of this project.java.util.Collection<Project>
getDependson()
Return the full transitive dependencies of this project.Packages
getExports()
Get the exported packages form all builders calculated from the last buildjava.io.File[]
getFiles()
Return the filesProjectGenerate
getGenerate()
Get the object responsible for source code generation.Packages
getImports()
Get the imported packages from all builders calculated from the last buildParameters
getInstallRepositories()
protected java.lang.Object[]
getMacroDomains()
This should be overridden by subclasses to add extra macro command domains on the search list.java.lang.String
getName()
java.io.File
getOutput()
java.io.File
getOutputFile(java.lang.String bsn)
java.io.File
getOutputFile(java.lang.String bsn, java.lang.String version)
Calculate the file for a JAR.Version
getPackageInfo(java.lang.String packageName)
ProjectLauncher
getProjectLauncher()
Get a launcher.ProjectTester
getProjectTester()
java.util.List<org.osgi.resource.Resource>
getResources()
boolean
getRunBuilds()
java.util.Collection<Container>
getRunbundles()
java.util.Collection<Container>
getRunFw()
Return the run frameworkboolean
getRunKeep()
java.util.Collection<Container>
getRunpath()
java.util.Collection<java.lang.String>
getRunProgramArgs()
java.util.Map<java.lang.String,java.lang.String>
getRunProperties()
java.io.File
getRunStorage()
Parameters
getRunSystemCapabilities()
Parameters
getRunSystemPackages()
java.util.Collection<java.lang.String>
getRunVM()
java.util.Collection<java.io.File>
getSourcePath()
RunSpecification
getSpecification()
Return a basic type only specification of the run aspect of this projectjava.io.File
getSrc()
Deprecated.java.io.File
getSrcOutput()
Builder
getSubBuilder(java.io.File bndFile)
Return a builder associated with the give bnd file or null.ProjectBuilder
getSubBuilder(java.lang.String string)
Return a build that maps to the sub file.java.io.File
getTarget()
java.io.File
getTargetDir()
java.util.Set<Project>
getTestDependencies()
Return the direct test dependencies of this project.java.io.File
getTestOutput()
java.util.Collection<Container>
getTestpath()
java.io.File
getTestSrc()
static Project
getUnparented(java.io.File propertiesFile)
Jar
getValidJar(Jar jar, java.lang.String id)
Jar
getValidJar(java.io.File f)
This methods attempts to turn any jar into a valid jar.Jar
getValidJar(java.net.URL url)
Version
getVersion(java.lang.String bsn)
java.util.Map<java.lang.String,Version>
getVersions()
Workspace
getWorkspace()
boolean
isCnf()
boolean
isInteractive()
Return if this is an interactive environment like Eclipse or runs in batch mode.boolean
isNoBundles()
Answer if this project does not have any outputboolean
isRunTrace()
boolean
isStale()
Check if this project needs building.boolean
isStandalone()
boolean
isValid()
void
junit()
Run JUnitprotected Strategy
overrideStrategy(java.util.Map<java.lang.String,java.lang.String> attrs, Strategy useStrategy)
Jar
pack(java.lang.String profile)
Pack the project (could be a bndrun file) and save it on disk.protected aQute.bnd.build.Project.RepoFilter
parseRepoFilter(java.util.Map<java.lang.String,java.lang.String> attrs)
protected java.util.List<Container>
parseRunbundles(java.lang.String spec)
void
postRelease()
Actions to perform after a full workspace release.protected void
preBuildChecks()
Check prebuild things.void
prepare()
Set up all the pathsvoid
preRelease()
Actions to perform before a full workspace release.void
propertiesChanged()
boolean
refresh()
Refresh if we are based on stale data.void
refreshAll()
void
release()
void
release(boolean test)
void
release(java.lang.String name)
Release.void
release(java.lang.String name, boolean test)
Releasejava.io.File
release(java.lang.String jarName, java.io.InputStream jarStream)
java.io.File
release(java.lang.String name, java.lang.String jarName, java.io.InputStream jarStream)
Releasejava.net.URI
releaseURI(java.lang.String jarName, java.io.InputStream jarStream)
java.net.URI
releaseURI(java.lang.String name, java.lang.String jarName, java.io.InputStream jarStream)
void
remove()
void
report(java.util.Map<java.lang.String,java.lang.Object> table)
Report detailed info from this projectprotected void
report(java.util.Map<java.lang.String,java.lang.Object> table, boolean isProject)
void
run()
void
runLocal()
java.io.File
saveBuild(Jar jar)
void
script(java.lang.String type, java.lang.String script)
void
script(java.lang.String type, java.lang.String script, java.lang.Object... args)
void
setChanged()
void
setDelayRunDependencies(boolean x)
Make this project delay the calculation of the run dependencies.void
setPackageInfo(java.lang.String packageName, Version newVersion)
void
test()
void
test(java.io.File reportDir, java.util.List<java.lang.String> tests)
void
test(java.util.List<java.lang.String> tests)
protected Container
toContainer(java.lang.String bsn, java.lang.String range, java.util.Map<java.lang.String,java.lang.String> attrs, java.io.File result, DownloadBlocker db)
java.lang.String
toString()
Printout of the status of this processor for toString()void
verifyDependencies(boolean test)
Method to verify that the paths are correct, ie no missing dependencies-
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, begin, beginHandleErrors, check, clear, close, concat, customize, decorated, decorated, doAttrbutes, doIncludeFile, doIncludeFile, endHandleErrors, error, error, exception, exists, findHeader, findHeader, findHeader, forceRefresh, formatArrays, get, get, getBase, getBaseURI, getClass, getDuration, getErrors, getExecutor, getFile, getFile, getFlattenedProperties, getFlattenedProperties, getHeader, getHeader, getHeader, getHeader, getIncluded, getInfo, getInfo, getInstructions, getJarFromName, getJavaExecutable, getLine, getLoader, getLocation, getLogger, 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, isMissingPlugin, isOk, isPedantic, isPerfect, isTrace, isTrue, iterator, join, join, join, join, join, join, keySet, lastModified, loadProperties, 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, quote, read, removeBasicPlugin, removeClose, removeDuplicateMarker, replaceAll, replaceExtension, report, set, setBase, setExceptions, setFileMustExist, setForceLocal, setLocation, setParent, setPedantic, setProperties, setProperties, setProperties, setProperties, setPropertiesFile, setProperty, setTrace, setTypeSpecificPlugins, signal, since, split, split, split, spliterator, system, system, toFullHeaderPattern, trace, 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 Detail
-
BNDFILE
public static final java.lang.String BNDFILE
- See Also:
- Constant Field Values
-
BNDCNF
public static final java.lang.String BNDCNF
- See Also:
- Constant Field Values
-
SHA_256
public static final java.lang.String SHA_256
- See Also:
- Constant Field Values
-
unreferencedClasspathEntries
public java.util.Map<java.lang.String,Container> unreferencedClasspathEntries
-
instructions
public ProjectInstructions instructions
-
-
Method Detail
-
getUnparented
public static Project getUnparented(java.io.File propertiesFile) throws java.lang.Exception
- Throws:
java.lang.Exception
-
isValid
public boolean isValid()
-
getBuilder
public ProjectBuilder getBuilder(ProjectBuilder parent) throws java.lang.Exception
Return a new builder that is nicely setup for this project. Please close this builder after use.- Parameters:
parent
- The project builder to use as parent, use this project if null- Throws:
java.lang.Exception
-
getChanged
public int getChanged()
-
setChanged
public void setChanged()
-
getWorkspace
public Workspace getWorkspace()
-
toString
public java.lang.String toString()
Description copied from class:Processor
Printout of the status of this processor for toString()
-
prepare
public void prepare() throws java.lang.Exception
Set up all the paths- Throws:
java.lang.Exception
-
getSrc
@Deprecated public java.io.File getSrc() throws java.lang.Exception
Deprecated.This method is deprecated because this can handle only one source dir. Use getSourcePath. For backward compatibility we will return the first entry on the source path.- Returns:
- first entry on the
getSourcePath()
- Throws:
java.lang.Exception
-
getSrcOutput
public java.io.File getSrcOutput()
-
getTestSrc
public java.io.File getTestSrc()
-
getTestOutput
public java.io.File getTestOutput()
-
getTargetDir
public java.io.File getTargetDir()
-
parseRunbundles
protected java.util.List<Container> parseRunbundles(java.lang.String spec) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getBundles
public java.util.List<Container> getBundles(Strategy strategyx, java.lang.String spec, java.lang.String source) throws java.lang.Exception
Analyze the header and return a list of files that should be on the build, test or some other path. The list is assumed to be a list of bsns with a version specification. The special case of version=project indicates there is a project in the same workspace. The path to the output directory is calculated. The default directory ${bin} can be overridden with the output attribute.- Parameters:
strategyx
- STRATEGY_LOWEST or STRATEGY_HIGHESTspec
- The header- Throws:
java.lang.Exception
-
getBundlesWildcard
public java.util.List<Container> getBundlesWildcard(java.lang.String bsnPattern, java.lang.String range, Strategy strategyx, java.util.Map<java.lang.String,java.lang.String> attrs) throws java.lang.Exception
Get all bundles matching a wildcard expression.- Parameters:
bsnPattern
- A bsn wildcard, e.g. "osgi*" or just "*".range
- A range to narrow the versions of bundles found, or null to return any version.strategyx
- The version selection strategy, which may be 'HIGHEST' or 'LOWEST' only -- 'EXACT' is not permitted.attrs
- Additional search attributes.- Throws:
java.lang.Exception
-
doMavenPom
public void doMavenPom(Strategy strategyx, java.util.List<Container> result, java.lang.String action) throws java.lang.Exception
The user selected pom in a path. This will place the pom as well as its dependencies on the list- Parameters:
strategyx
- the strategy to use.result
- The list of result containers- Throws:
java.lang.Exception
- anything goes wrong
-
getDependson
public java.util.Collection<Project> getDependson() throws java.lang.Exception
Return the full transitive dependencies of this project.- Returns:
- A set of the full transitive dependencies of this project.
- Throws:
java.lang.Exception
-
getBuildDependencies
public java.util.Set<Project> getBuildDependencies() throws java.lang.Exception
Return the direct build dependencies of this project.- Returns:
- A set of the direct build dependencies of this project.
- Throws:
java.lang.Exception
-
getTestDependencies
public java.util.Set<Project> getTestDependencies() throws java.lang.Exception
Return the direct test dependencies of this project.The result includes the direct build dependencies of this project as well, so the result is a super set of
getBuildDependencies()
.- Returns:
- A set of the test build dependencies of this project.
- Throws:
java.lang.Exception
-
getDependents
public java.util.Set<Project> getDependents() throws java.lang.Exception
Return the full transitive dependents of this project.The result includes projects which have build and test dependencies on this project.
Since the full transitive dependents of this project is updated during the computation of other project dependencies, until all projects are prepared, the dependents result may be partial.
- Returns:
- A set of the transitive set of projects which depend on this project.
- Throws:
java.lang.Exception
-
getBuildpath
public java.util.Collection<Container> getBuildpath() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getTestpath
public java.util.Collection<Container> getTestpath() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getRunpath
public java.util.Collection<Container> getRunpath() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getRunbundles
public java.util.Collection<Container> getRunbundles() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getRunFw
public java.util.Collection<Container> getRunFw() throws java.lang.Exception
Return the run framework- Throws:
java.lang.Exception
-
getRunStorage
public java.io.File getRunStorage() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getRunBuilds
public boolean getRunBuilds()
-
getSourcePath
public java.util.Collection<java.io.File> getSourcePath() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getAllsourcepath
public java.util.Collection<java.io.File> getAllsourcepath() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getBootclasspath
public java.util.Collection<Container> getBootclasspath() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getOutput
public java.io.File getOutput() throws java.lang.Exception
- Throws:
java.lang.Exception
-
_p_dependson
public java.lang.String _p_dependson(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
_p_buildpath
public java.lang.String _p_buildpath(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
_p_testpath
public java.lang.String _p_testpath(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
_p_sourcepath
public java.lang.String _p_sourcepath(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
_p_allsourcepath
public java.lang.String _p_allsourcepath(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
_p_bootclasspath
public java.lang.String _p_bootclasspath(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
_p_output
public java.lang.String _p_output(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getMacroDomains
protected java.lang.Object[] getMacroDomains()
Description copied from class:Processor
This should be overridden by subclasses to add extra macro command domains on the search list.- Overrides:
getMacroDomains
in classProcessor
-
release
public java.io.File release(java.lang.String jarName, java.io.InputStream jarStream) throws java.lang.Exception
- Throws:
java.lang.Exception
-
releaseURI
public java.net.URI releaseURI(java.lang.String jarName, java.io.InputStream jarStream) throws java.lang.Exception
- Throws:
java.lang.Exception
-
release
public java.io.File release(java.lang.String name, java.lang.String jarName, java.io.InputStream jarStream) throws java.lang.Exception
Release- Parameters:
name
- The repository namejarName
-jarStream
-- Throws:
java.lang.Exception
-
releaseURI
public java.net.URI releaseURI(java.lang.String name, java.lang.String jarName, java.io.InputStream jarStream) throws java.lang.Exception
- Throws:
java.lang.Exception
-
release
public void release(boolean test) throws java.lang.Exception
- Throws:
java.lang.Exception
-
release
public void release(java.lang.String name, boolean test) throws java.lang.Exception
Release- Parameters:
name
- The respository nametest
- Run testcases- Throws:
java.lang.Exception
-
getBundle
public Container getBundle(java.lang.String bsn, java.lang.String range, Strategy strategy, java.util.Map<java.lang.String,java.lang.String> attrs) throws java.lang.Exception
Get a bundle from one of the plugin repositories. If an exact version is required we just return the first repository found (in declaration order in the build.bnd file).- Parameters:
bsn
- The bundle symbolic namerange
- The version rangestrategy
- set to LOWEST or HIGHEST- Returns:
- the file object that points to the bundle or null if not found
- Throws:
java.lang.Exception
- when something goes wrong
-
overrideStrategy
protected Strategy overrideStrategy(java.util.Map<java.lang.String,java.lang.String> attrs, Strategy useStrategy)
- Parameters:
attrs
-useStrategy
-
-
parseRepoFilter
protected aQute.bnd.build.Project.RepoFilter parseRepoFilter(java.util.Map<java.lang.String,java.lang.String> attrs)
-
toContainer
protected Container toContainer(java.lang.String bsn, java.lang.String range, java.util.Map<java.lang.String,java.lang.String> attrs, java.io.File result, DownloadBlocker db)
- Parameters:
bsn
-range
-attrs
-result
-
-
deploy
public void deploy(java.lang.String name, java.io.File file) throws java.lang.Exception
Deploy the file (which must be a bundle) into the repository.- Parameters:
name
- The repository namefile
- bundle- Throws:
java.lang.Exception
-
deploy
public void deploy(java.io.File file) throws java.lang.Exception
Deploy the file (which must be a bundle) into the repository.- Parameters:
file
- bundle- Throws:
java.lang.Exception
-
deploy
public void deploy() throws java.lang.Exception
Deploy the current project to a repository- Throws:
java.lang.Exception
-
_repo
public java.lang.String _repo(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getTarget
public java.io.File getTarget() throws java.lang.Exception
- Throws:
java.lang.Exception
-
build
public java.io.File[] build(boolean underTest) throws java.lang.Exception
This is the external method that will pre-build any dependencies if it is out of date.- Parameters:
underTest
-- Throws:
java.lang.Exception
-
getInstallRepositories
public Parameters getInstallRepositories()
-
getFiles
public java.io.File[] getFiles()
Return the files
-
isStale
public boolean isStale() throws java.lang.Exception
Check if this project needs building. This is defined as:- Throws:
java.lang.Exception
-
getBuildFiles
public java.io.File[] getBuildFiles() throws java.lang.Exception
This method must only be called when it is sure that the project has been build before in the same session. It is a bit yucky, but ant creates different class spaces which makes it hard to detect we already build it. This method remembers the files in the appropriate instance vars.- Throws:
java.lang.Exception
-
getBuildFiles
public java.io.File[] getBuildFiles(boolean buildIfAbsent) throws java.lang.Exception
- Throws:
java.lang.Exception
-
buildLocal
public java.io.File[] buildLocal(boolean underTest) throws java.lang.Exception
Build without doing any dependency checking. Make sure any dependent projects are built first.- Parameters:
underTest
-- Throws:
java.lang.Exception
-
isNoBundles
public boolean isNoBundles()
Answer if this project does not have any output
-
saveBuild
public java.io.File saveBuild(Jar jar) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getOutputFile
public java.io.File getOutputFile(java.lang.String bsn, java.lang.String version) throws java.lang.Exception
Calculate the file for a JAR. The default name is bsn.jar, but this can be overridden with an- Throws:
java.lang.Exception
-
getOutputFile
public java.io.File getOutputFile(java.lang.String bsn) throws java.lang.Exception
- Throws:
java.lang.Exception
-
refresh
public boolean refresh()
Refresh if we are based on stale data. This also implies our workspace.
-
isCnf
public boolean isCnf()
-
propertiesChanged
public void propertiesChanged()
- Overrides:
propertiesChanged
in classProcessor
-
getName
public java.lang.String getName()
-
getActions
public java.util.Map<java.lang.String,Action> getActions()
-
fillActions
public void fillActions(java.util.Map<java.lang.String,Action> all)
-
release
public void release() throws java.lang.Exception
- Throws:
java.lang.Exception
-
export
public java.util.Map.Entry<java.lang.String,Resource> export(java.lang.String type, java.util.Map<java.lang.String,java.lang.String> options) throws java.lang.Exception
Export this project via the exporters. The return is the calculated name (can be overridden with the option `name`, which must be the basename since the extension is defined by the exporter)- Parameters:
type
- an exporter type like `bnd.executablejar` or null as default `bnd.executablejar.pack`, the original export functionoptions
- parameters to the exporters- Returns:
- and entry with the name and resource for the export
- Throws:
java.lang.Exception
-
export
@Deprecated public void export(java.lang.String runFilePath, boolean keep, java.io.File output) throws java.lang.Exception
Deprecated.The keep flag is really awkward since it overrides the -runkeep flag in the file. Use doExport instead- Throws:
java.lang.Exception
-
exportRunbundles
public void exportRunbundles(java.lang.String runFilePath, java.io.File outputDir) throws java.lang.Exception
- Throws:
java.lang.Exception
- Since:
- 2.4
-
release
public void release(java.lang.String name) throws java.lang.Exception
Release.- Parameters:
name
- The repository name- Throws:
java.lang.Exception
-
clean
public void clean() throws java.lang.Exception
- Throws:
java.lang.Exception
-
build
public java.io.File[] build() throws java.lang.Exception
- Throws:
java.lang.Exception
-
run
public void run() throws java.lang.Exception
- Throws:
java.lang.Exception
-
isRunTrace
public boolean isRunTrace()
-
runLocal
public void runLocal() throws java.lang.Exception
- Throws:
java.lang.Exception
-
test
public void test() throws java.lang.Exception
- Throws:
java.lang.Exception
-
test
public void test(java.util.List<java.lang.String> tests) throws java.lang.Exception
- Throws:
java.lang.Exception
-
test
public void test(java.io.File reportDir, java.util.List<java.lang.String> tests) throws java.lang.Exception
- Throws:
java.lang.Exception
-
junit
public void junit() throws java.lang.Exception
Run JUnit- Throws:
java.lang.Exception
-
getValidJar
public Jar getValidJar(java.io.File f) throws java.lang.Exception
This methods attempts to turn any jar into a valid jar. If this is a bundle with manifest, a manifest is added based on defaults. If it is a bundle, but not r4, we try to add the r4 headers.- Throws:
java.lang.Exception
-
getValidJar
public Jar getValidJar(java.net.URL url) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getValidJar
public Jar getValidJar(Jar jar, java.lang.String id) throws java.lang.Exception
- Throws:
java.lang.Exception
-
_project
public java.lang.String _project(java.lang.String[] args)
-
bump
public void bump(java.lang.String mask) throws java.lang.Exception
Bump the version of this project. First check the main bnd file. If this does not contain a version, check the include files. If they still do not contain a version, then check ALL the sub builders. If not, add a version to the main bnd file.- Parameters:
mask
- the mask for bumping, seeMacro._version(String[])
- Throws:
java.lang.Exception
-
bump
public void bump() throws java.lang.Exception
- Throws:
java.lang.Exception
-
action
public void action(java.lang.String command) throws java.lang.Exception
- Throws:
java.lang.Exception
-
action
public void action(java.lang.String command, java.lang.Object... args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
refreshAll
public void refreshAll()
-
script
public void script(java.lang.String type, java.lang.String script) throws java.lang.Exception
- Throws:
java.lang.Exception
-
script
public void script(java.lang.String type, java.lang.String script, java.lang.Object... args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
_repos
public java.lang.String _repos(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
_help
public java.lang.String _help(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getDeliverables
public java.util.Collection<Container> getDeliverables() throws java.lang.Exception
Returns containers for the deliverables of this project. The deliverables is the project builder for this project if no -sub is specified. Otherwise it contains all the sub bnd files.- Returns:
- A collection of containers
- Throws:
java.lang.Exception
-
getSubBuilder
public Builder getSubBuilder(java.io.File bndFile) throws java.lang.Exception
Return a builder associated with the give bnd file or null. The bnd.bnd file can contain -sub option. This option allows specifying files in the same directory that should drive the generation of multiple deliverables. This method figures out if the bndFile is actually one of the bnd files of a deliverable.- Parameters:
bndFile
- A file pointing to a bnd file.- Returns:
- null or a builder for a sub file, the caller must close this builder
- Throws:
java.lang.Exception
-
getSubBuilder
public ProjectBuilder getSubBuilder(java.lang.String string) throws java.lang.Exception
Return a build that maps to the sub file.- Parameters:
string
-- Throws:
java.lang.Exception
-
getDeliverable
public Container getDeliverable(java.lang.String bsn, java.util.Map<java.lang.String,java.lang.String> attrs) throws java.lang.Exception
Answer the container associated with a given bsn.- Throws:
java.lang.Exception
-
getRunVM
public java.util.Collection<java.lang.String> getRunVM()
-
getRunProgramArgs
public java.util.Collection<java.lang.String> getRunProgramArgs()
-
getRunProperties
public java.util.Map<java.lang.String,java.lang.String> getRunProperties()
-
getProjectLauncher
public ProjectLauncher getProjectLauncher() throws java.lang.Exception
Get a launcher.- Throws:
java.lang.Exception
-
getProjectTester
public ProjectTester getProjectTester() throws java.lang.Exception
- Throws:
java.lang.Exception
-
setDelayRunDependencies
public void setDelayRunDependencies(boolean x)
Make this project delay the calculation of the run dependencies. The run dependencies calculation can be done in prepare or until the dependencies are actually needed.
-
addClasspath
public void addClasspath(java.io.File f)
bnd maintains a class path that is set by the environment, i.e. bnd is not in charge of it.
-
clearClasspath
public void clearClasspath()
-
getClasspath
public java.util.Collection<Container> getClasspath()
-
pack
public Jar pack(java.lang.String profile) throws java.lang.Exception
Pack the project (could be a bndrun file) and save it on disk. Report errors if they happen. Caller must close this JAR- Parameters:
profile
-- Returns:
- a jar with the executable code
- Throws:
java.lang.Exception
-
baseline
public void baseline() throws java.lang.Exception
Do a baseline for this project- Throws:
java.lang.Exception
-
verifyDependencies
public void verifyDependencies(boolean test) throws java.lang.Exception
Method to verify that the paths are correct, ie no missing dependencies- Parameters:
test
- for test cases, also adds -testpath- Throws:
java.lang.Exception
-
report
public void report(java.util.Map<java.lang.String,java.lang.Object> table) throws java.lang.Exception
Report detailed info from this project
-
report
protected void report(java.util.Map<java.lang.String,java.lang.Object> table, boolean isProject) throws java.lang.Exception
- Throws:
java.lang.Exception
-
compile
public void compile(boolean test) throws java.lang.Exception
- Throws:
java.lang.Exception
-
_ide
public java.lang.String _ide(java.lang.String[] args) throws java.io.IOException
- Throws:
java.io.IOException
-
getVersions
public java.util.Map<java.lang.String,Version> getVersions() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getBsns
public java.util.Collection<java.lang.String> getBsns() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getVersion
public Version getVersion(java.lang.String bsn) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getExports
public Packages getExports()
Get the exported packages form all builders calculated from the last build
-
getImports
public Packages getImports()
Get the imported packages from all builders calculated from the last build
-
getContained
public Packages getContained()
Get the contained packages calculated from all builders from the last build
-
remove
public void remove() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getRunKeep
public boolean getRunKeep()
-
setPackageInfo
public void setPackageInfo(java.lang.String packageName, Version newVersion) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getPackageInfo
public Version getPackageInfo(java.lang.String packageName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
preRelease
public void preRelease()
Actions to perform before a full workspace release. This is executed for projects that describe the distribution
-
postRelease
public void postRelease()
Actions to perform after a full workspace release. This is executed for projects that describe the distribution
-
copy
public void copy(RepositoryPlugin source, java.lang.String filter, RepositoryPlugin destination) throws java.lang.Exception
Copy a repository to another repository- Throws:
java.lang.Exception
-
copy
public void copy(RepositoryPlugin source, Instructions filter, RepositoryPlugin destination) throws java.lang.Exception
- Throws:
java.lang.Exception
-
isInteractive
public boolean isInteractive()
Description copied from class:Processor
Return if this is an interactive environment like Eclipse or runs in batch mode. If interactive, things can get refreshed.- Overrides:
isInteractive
in classProcessor
-
getSpecification
public RunSpecification getSpecification()
Return a basic type only specification of the run aspect of this project
-
getRunSystemPackages
public Parameters getRunSystemPackages()
-
getRunSystemCapabilities
public Parameters getRunSystemCapabilities()
-
preBuildChecks
protected void preBuildChecks()
Check prebuild things.
-
getBundle
public Container getBundle(org.osgi.resource.Resource r) throws java.lang.Exception
- Throws:
java.lang.Exception
-
isStandalone
public boolean isStandalone()
-
getChecksum
public java.lang.String getChecksum()
Description copied from class:Processor
A checksum based on the values of the properties- Overrides:
getChecksum
in classProcessor
- Returns:
- A checksum based on the values of the properties
-
getGenerate
public ProjectGenerate getGenerate()
Get the object responsible for source code generation. This object should not be stored, a new one is created if the properties of this project change.- Returns:
- a fresh ProjectGenerate object
-
getResources
public java.util.List<org.osgi.resource.Resource> getResources()
-
-