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 Modifier and Type Class Description (package private) classProject.RefreshDataprivate static classProject.RepoFilter-
Nested classes/interfaces inherited from class aQute.bnd.osgi.Processor
Processor.CL, Processor.FileLine
-
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
Fields Modifier and Type Field Description (package private) static java.lang.String_repoHelpMacro access to the repository ${repo;[; [; ]]} (package private) java.util.Collection<java.io.File>allsourcepathstatic java.lang.StringBNDCNFstatic java.lang.StringBNDFILE(package private) static java.nio.file.PathBNDPATH(package private) java.util.Collection<Container>bootclasspath(package private) java.util.Collection<Container>buildpath(package private) java.util.Collection<Container>classpath(package private) PackagescontainedPackagesprivate Project.RefreshDatadata(package private) static java.lang.StringDEFAULT_ACTIONS(package private) booleandelayRunDependenciesprivate java.util.Set<Project>dependenciesBuildprivate java.util.Set<Project>dependenciesFullprivate java.util.Set<Project>dependenciesTestprivate java.util.Set<Project>dependents(package private) PackagesexportedPackagesprivate java.io.File[]filesprivate java.util.Propertieside(package private) PackagesimportedPackagesProjectInstructionsinstructionsprivate static org.slf4j.Loggerloggerprivate Makefilemakefile(package private) ProjectMessagesmsgs(package private) java.io.Fileoutput(package private) PackageInfopackageInfoprivate java.util.concurrent.atomic.AtomicBooleanpreparedPathsprivate Memoize<java.util.List<org.osgi.resource.Resource>>resourcesprivate java.util.concurrent.atomic.AtomicIntegerrevision(package private) java.util.Collection<Container>runbundles(package private) java.util.Collection<Container>runfw(package private) java.util.Collection<Container>runpath(package private) java.io.Filerunstoragestatic java.lang.StringSHA_256(package private) java.util.Map<java.io.File,Attrs>sourcepath(package private) java.io.Filetarget(package private) java.util.Collection<Container>testpathjava.util.Map<java.lang.String,Container>unreferencedClasspathEntries(package private) java.util.Map<java.lang.String,Version>versionMap(package private) Workspaceworkspace-
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, 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, BUILDPACKAGES, 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, CACHEDIR, CARDINALITY_DIRECTIVE, CDIANNOTATIONS, CHECK, CLASS_ATTRIBUTE, CLASSPATH, COMMAND_DIRECTIVE, COMPILER_SOURCE, COMPILER_TARGET, COMPONENT_ACTIVATE, COMPONENT_CONFIGURATION_POLICY, COMPONENT_DEACTIVATE, COMPONENT_DESCRIPTORS, COMPONENT_DESIGNATE, COMPONENT_DESIGNATEFACTORY, 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, componentDirectives, COMPRESSION, CONDITIONAL_PACKAGE, CONDITIONALPACKAGE, CONDUIT, CONNECTION_SETTINGS, CONSUMER_POLICY, CONTRACT, CREATED_BY, CURRENT_BUNDLESYMBOLICNAME, CURRENT_BUNDLEVERSION, CURRENT_PACKAGE, CURRENT_USES, CURRENT_VERSION, DEBUG, 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, EMPTY_HEADER, EXCLUDE_DIRECTIVE, EXECUTABLE, EXPERIMENTS, 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_VERSION_DIRECTIVE, INTERNAL_OPEN_TO_MODULES_DIRECTIVE, 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, 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, PACKAGE, 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, RESOURCEONLY, RUNBLACKLIST, RUNBUILDS, RUNBUNDLES, RUNBUNDLES_STARTLEVEL_ATTRIBUTE, RUNEE, RUNENV, RUNFRAMEWORK, RUNFRAMEWORK_NONE, RUNFRAMEWORK_SERVICES, RUNFRAMEWORKRESTART, RUNFW, RUNJDB, RUNKEEP, RUNNOREFERENCES, RUNOPTIONS, RUNOPTIONS_EAGER, RUNPATH, RUNPATH_LAUNCHER_DIRECTIVE, RUNPATH_MAIN_DIRECTIVE, RUNPROGRAMARGS, RUNPROPERTIES, RUNPROVIDEDCAPABILITIES, RUNREMOTE, RUNREPOS, RUNREQUIRE, 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, SET_COMPONENT_DIRECTIVES, SET_COMPONENT_DIRECTIVES_1_1, SET_COMPONENT_DIRECTIVES_1_2, 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, TESTREPORT, TESTSOURCES, TESTSUITES, TESTUNRESOLVED, TOOL, TRANSITIVE_ATTRIBUTE, TSTAMP, UNDERTEST, UPTO, USES_DIRECTIVE, USES_USES, VALID_PROPERTY_TYPES, VERBOSE, VERSION_ATTR_HASH, VERSION_ATTR_LATEST, VERSION_ATTR_PROJECT, VERSION_ATTR_SNAPSHOT, VERSION_ATTRIBUTE, VERSION_FILTER, 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)voidaction(java.lang.String command)voidaction(java.lang.String command, java.lang.Object... args)private voidadd(java.util.List<java.lang.String> paths, Container container)voidaddClasspath(java.io.File f)bnd maintains a class path that is set by the environment, i.e.(package private) static voidaddToPackageList(Container container, java.lang.String newPackageNames)(package private) voidafter(Project p, java.lang.String a, java.lang.Throwable t)Run all after command pluginsvoidbaseline()Do a baseline for this project(package private) voidbefore(Project p, java.lang.String a)Run all before command pluginsjava.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.private voidbuiltFiles(java.util.Collection<java.io.File> files)voidbump()voidbump(java.lang.String mask)Bump the version of this project.voidclean()(package private) voidclean(java.io.File dir, java.lang.String type)(package private) voidclean(java.io.File dirOrFile, java.lang.String type, boolean recreate)voidclearClasspath()voidcompile(boolean test)private voidcompile(Command javac, java.lang.String what)voidcopy(RepositoryPlugin source, Instructions filter, RepositoryPlugin destination)voidcopy(RepositoryPlugin source, java.lang.String filter, RepositoryPlugin destination)Copy a repository to another repositoryvoiddeploy()Deploy the current project to a repositoryvoiddeploy(java.io.File file)Deploy the file (which must be a bundle) into the repository.voiddeploy(java.lang.String name, java.io.File file)Deploy the file (which must be a bundle) into the repository.private voiddoEclipseClasspath()voiddoMavenPom(Strategy strategyx, java.util.List<Container> result, java.lang.String action)The user selected pom in a path.private voiddoPath(java.util.Collection<Container> resultpath, java.util.Collection<Project> projects, java.util.Collection<Container> entries, java.util.Collection<Container> bootclasspath, boolean noproject, java.lang.String name)Iterate over the entries and place the projects on the projects list and all the files of the entries on the resultpath.voidexport(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.voidexportRunbundles(java.lang.String runFilePath, java.io.File outputDir)voidfillActions(java.util.Map<java.lang.String,Action> all)(package private) static java.lang.Stringflatten(java.util.Set<java.lang.String> names)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.ProjectBuildergetBuilder(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()ContainergetBundle(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.ContainergetBundle(org.osgi.resource.Resource r)private ContainergetBundleByHash(java.lang.String bsn, java.util.Map<java.lang.String,java.lang.String> attrs)private ContainergetBundleFromProject(java.lang.String bsn, java.util.Map<java.lang.String,java.lang.String> attrs)Look for the bundle in the workspace.(package private) java.util.Collection<Container>getBundles(Strategy strategy, java.lang.String spec)Just calls a new method with a default parm.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.intgetChanged()java.lang.StringgetChecksum()A checksum based on the values of the propertiesjava.util.Collection<Container>getClasspath()private CommandgetCommonJavac(boolean test)PackagesgetContained()Get the contained packages calculated from all builders from the last buildContainergetDeliverable(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.private ExportergetExporter(java.lang.String type)PackagesgetExports()Get the exported packages form all builders calculated from the last buildjava.io.File[]getFiles()Return the filesProjectGenerategetGenerate()Get the object responsible for source code generation.private <T> TgetHandler(java.lang.Class<T> target, java.util.Collection<Container> containers, java.lang.String header, java.lang.String defaultHandler)PackagesgetImports()Get the imported packages from all builders calculated from the last buildParametersgetInstallRepositories()protected java.lang.Object[]getMacroDomains()This should be overridden by subclasses to add extra macro command domains on the search list.private MakefilegetMakefile()java.lang.StringgetName()java.io.FilegetOutput()java.io.FilegetOutputFile(java.lang.String bsn)java.io.FilegetOutputFile(java.lang.String bsn, java.lang.String version)Calculate the file for a JAR.VersiongetPackageInfo(java.lang.String packageName)ProjectLaunchergetProjectLauncher()Get a launcher.ProjectTestergetProjectTester()private java.util.List<RepositoryPlugin>getReleaseRepos(java.lang.String names)java.util.List<org.osgi.resource.Resource>getResources()booleangetRunBuilds()java.util.Collection<Container>getRunbundles()java.util.Collection<Container>getRunFw()Return the run frameworkbooleangetRunKeep()java.util.Collection<Container>getRunpath()java.util.Collection<java.lang.String>getRunProgramArgs()java.util.Map<java.lang.String,java.lang.String>getRunProperties()java.io.FilegetRunStorage()ParametersgetRunSystemCapabilities()ParametersgetRunSystemPackages()java.util.Collection<java.lang.String>getRunVM()java.util.Collection<java.io.File>getSourcePath()RunSpecificationgetSpecification()Return a basic type only specification of the run aspect of this projectjava.io.FilegetSrc()Deprecated.java.io.FilegetSrcOutput()private java.io.FilegetSrcOutput0()BuildergetSubBuilder(java.io.File bndFile)Return a builder associated with the give bnd file or null.ProjectBuildergetSubBuilder(java.lang.String string)Return a build that maps to the sub file.java.util.Collection<? extends Builder>getSubBuilders()Deprecated.As of 3.4.java.io.FilegetTarget()private java.io.FilegetTarget0()java.io.FilegetTargetDir()java.util.Set<Project>getTestDependencies()Return the direct test dependencies of this project.java.io.FilegetTestOutput()java.util.Collection<Container>getTestpath()java.io.FilegetTestSrc()static ProjectgetUnparented(java.io.File propertiesFile)JargetValidJar(Jar jar, java.lang.String id)JargetValidJar(java.io.File f)This methods attempts to turn any jar into a valid jar.JargetValidJar(java.net.URL url)VersiongetVersion(java.lang.String bsn)java.util.Map<java.lang.String,Version>getVersions()WorkspacegetWorkspace()private voidinstall(RepositoryPlugin repo, Processor context, java.io.File f, Attrs value)private voidinstall(java.io.File[] files)booleanisCnf()booleanisInteractive()Return if this is an interactive environment like Eclipse or runs in batch mode.booleanisNoBundles()Answer if this project does not have any outputbooleanisRunTrace()booleanisStale()Check if this project needs building.(package private) booleanisStale(java.util.Set<Project> visited)booleanisStandalone()booleanisValid()voidjunit()Run JUnitprivate voidjustInTime(java.util.Collection<Container> path, java.util.List<Container> entries, boolean noproject, java.lang.String name)Handle dependencies for paths that are calculated on demand.private java.lang.Stringlist(java.lang.String[] args, java.util.Collection<?> list)(package private) static voidmergeNames(java.lang.String names, java.util.Set<java.lang.String> set)protected StrategyoverrideStrategy(java.util.Map<java.lang.String,java.lang.String> attrs, Strategy useStrategy)Jarpack(java.lang.String profile)Pack the project (could be a bndrun file) and save it on disk.private java.util.List<Container>parseBuildpath()Parse the list of bundles that are a prerequisite to this project.private java.util.List<org.osgi.resource.Resource>parseBuildResources()private ParametersparseReleaseRepos(java.lang.String names)protected Project.RepoFilterparseRepoFilter(java.util.Map<java.lang.String,java.lang.String> attrs)private java.util.List<Container>parseRunbundles()protected java.util.List<Container>parseRunbundles(java.lang.String spec)private java.util.List<Container>parseRunFw()private java.util.List<Container>parseRunpath()private java.util.List<Container>parseTestpath()voidpostRelease()Actions to perform after a full workspace release.protected voidpreBuildChecks()Check prebuild things.voidprepare()Set up all the pathsvoidpreRelease()Actions to perform before a full workspace release.voidpropertiesChanged()private voidreadBuildProperties()booleanrefresh()Refresh if we are based on stale data.voidrefreshAll()private voidrefreshData()voidrelease()voidrelease(boolean test)voidrelease(java.lang.String name)Release.voidrelease(java.lang.String name, boolean test)Releasejava.io.Filerelease(java.lang.String jarName, java.io.InputStream jarStream)java.io.Filerelease(java.lang.String name, java.lang.String jarName, java.io.InputStream jarStream)Releaseprivate java.net.URIreleaseRepo(RepositoryPlugin releaseRepo, Processor context, java.lang.String jarName, java.io.InputStream jarStream)java.net.URIreleaseURI(java.lang.String jarName, java.io.InputStream jarStream)java.net.URIreleaseURI(java.lang.String name, java.lang.String jarName, java.io.InputStream jarStream)voidremove()(package private) booleanreplace(java.io.File f, java.lang.String pattern, java.lang.String replacement)voidreport(java.util.Map<java.lang.String,java.lang.Object> table)Report detailed info from this projectprotected voidreport(java.util.Map<java.lang.String,java.lang.Object> table, boolean isProject)private voidreportNewer(long lastModified, Jar jar)voidrun()voidrunLocal()java.io.FilesaveBuild(Jar jar)private java.io.FilesaveBuildWithoutClose(Jar jar)voidscript(java.lang.String type, java.lang.String script)voidscript(java.lang.String type, java.lang.String script, java.lang.Object... args)voidsetChanged()voidsetDelayRunDependencies(boolean x)Make this project delay the calculation of the run dependencies.voidsetPackageInfo(java.lang.String packageName, Version newVersion)private voidstaleCheck(java.lang.String src, ProjectInstructions.StaleTest st)voidtest()voidtest(java.io.File reportDir, java.util.List<java.lang.String> tests)voidtest(java.util.List<java.lang.String> tests)protected ContainertoContainer(java.lang.String bsn, java.lang.String range, java.util.Map<java.lang.String,java.lang.String> attrs, java.io.File result, DownloadBlocker db)(package private) java.util.Collection<java.io.File>toFile(java.util.Collection<Container> containers)Calculate the classpath.private java.util.Collection<?>toFiles(java.util.Collection<Project> projects)java.lang.StringtoString()Printout of the status of this processor for toString()private voidtraverse(java.util.Set<Project> dependencies, Project dependent, java.util.Set<Project> visited)voidverifyDependencies(boolean test)Method to verify that the paths are correct, ie no missing dependenciesprivate voidverifyDependencies(java.lang.String title, java.util.Collection<Container> path)private java.io.Filewrite(ConsumerWithException<java.io.File> jar, java.io.File outputFile)-
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, loadPlugins, 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, 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
-
logger
private static final org.slf4j.Logger logger
-
DEFAULT_ACTIONS
static final java.lang.String DEFAULT_ACTIONS
- See Also:
- Constant Field Values
-
BNDFILE
public static final java.lang.String BNDFILE
- See Also:
- Constant Field Values
-
BNDPATH
static final java.nio.file.Path BNDPATH
-
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
-
workspace
final Workspace workspace
-
preparedPaths
private final java.util.concurrent.atomic.AtomicBoolean preparedPaths
-
dependenciesFull
private final java.util.Set<Project> dependenciesFull
-
dependenciesBuild
private final java.util.Set<Project> dependenciesBuild
-
dependenciesTest
private final java.util.Set<Project> dependenciesTest
-
dependents
private final java.util.Set<Project> dependents
-
classpath
final java.util.Collection<Container> classpath
-
buildpath
final java.util.Collection<Container> buildpath
-
testpath
final java.util.Collection<Container> testpath
-
runpath
final java.util.Collection<Container> runpath
-
runbundles
final java.util.Collection<Container> runbundles
-
runfw
final java.util.Collection<Container> runfw
-
runstorage
java.io.File runstorage
-
sourcepath
final java.util.Map<java.io.File,Attrs> sourcepath
-
allsourcepath
final java.util.Collection<java.io.File> allsourcepath
-
bootclasspath
final java.util.Collection<Container> bootclasspath
-
versionMap
final java.util.Map<java.lang.String,Version> versionMap
-
output
java.io.File output
-
target
java.io.File target
-
revision
private final java.util.concurrent.atomic.AtomicInteger revision
-
files
private java.io.File[] files
-
delayRunDependencies
boolean delayRunDependencies
-
msgs
final ProjectMessages msgs
-
ide
private java.util.Properties ide
-
exportedPackages
final Packages exportedPackages
-
importedPackages
final Packages importedPackages
-
containedPackages
final Packages containedPackages
-
packageInfo
final PackageInfo packageInfo
-
makefile
private Makefile makefile
-
resources
private volatile Memoize<java.util.List<org.osgi.resource.Resource>> resources
-
data
private volatile Project.RefreshData data
-
unreferencedClasspathEntries
public java.util.Map<java.lang.String,Container> unreferencedClasspathEntries
-
instructions
public ProjectInstructions instructions
-
_repoHelp
static java.lang.String _repoHelp
Macro access to the repository ${repo;[; [; ]]}
-
-
Method Detail
-
readBuildProperties
private void readBuildProperties()
-
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:ProcessorPrintout of the status of this processor for toString()
-
prepare
public void prepare() throws java.lang.ExceptionSet up all the paths- Throws:
java.lang.Exception
-
getSrcOutput0
private java.io.File getSrcOutput0() throws java.io.IOException- Throws:
java.io.IOException
-
getTarget0
private java.io.File getTarget0() throws java.io.IOException- Throws:
java.io.IOException
-
getSrc
@Deprecated public java.io.File getSrc() throws java.lang.ExceptionDeprecated.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()
-
traverse
private void traverse(java.util.Set<Project> dependencies, Project dependent, java.util.Set<Project> visited) throws java.lang.Exception
- Throws:
java.lang.Exception
-
doPath
private void doPath(java.util.Collection<Container> resultpath, java.util.Collection<Project> projects, java.util.Collection<Container> entries, java.util.Collection<Container> bootclasspath, boolean noproject, java.lang.String name)
Iterate over the entries and place the projects on the projects list and all the files of the entries on the resultpath.- Parameters:
resultpath- The list that gets all the filesprojects- The list that gets any projects that are entriesentries- The input list of classpath entries
-
parseBuildpath
private java.util.List<Container> parseBuildpath() throws java.lang.Exception
Parse the list of bundles that are a prerequisite to this project. Bundles are listed in repo specific names. So we just let our repo plugins iterate over the list of bundles and we get the highest version from them.- Throws:
java.lang.Exception
-
parseRunpath
private java.util.List<Container> parseRunpath() throws java.lang.Exception
- Throws:
java.lang.Exception
-
parseRunbundles
private java.util.List<Container> parseRunbundles() throws java.lang.Exception
- Throws:
java.lang.Exception
-
parseRunbundles
protected java.util.List<Container> parseRunbundles(java.lang.String spec) throws java.lang.Exception
- Throws:
java.lang.Exception
-
parseRunFw
private java.util.List<Container> parseRunFw() throws java.lang.Exception
- Throws:
java.lang.Exception
-
parseTestpath
private java.util.List<Container> parseTestpath() 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
-
getBundles
java.util.Collection<Container> getBundles(Strategy strategy, java.lang.String spec) throws java.lang.Exception
Just calls a new method with a default parm.- 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
-
mergeNames
static void mergeNames(java.lang.String names, java.util.Set<java.lang.String> set)
-
flatten
static java.lang.String flatten(java.util.Set<java.lang.String> names)
-
addToPackageList
static void addToPackageList(Container container, java.lang.String newPackageNames)
-
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
-
justInTime
private void justInTime(java.util.Collection<Container> path, java.util.List<Container> entries, boolean noproject, java.lang.String name)
Handle dependencies for paths that are calculated on demand.
-
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
-
doEclipseClasspath
private void doEclipseClasspath() 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
-
toFiles
private java.util.Collection<?> toFiles(java.util.Collection<Project> projects)
-
_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
-
list
private java.lang.String list(java.lang.String[] args, java.util.Collection<?> list)
-
getMacroDomains
protected java.lang.Object[] getMacroDomains()
Description copied from class:ProcessorThis should be overridden by subclasses to add extra macro command domains on the search list.- Overrides:
getMacroDomainsin 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.ExceptionRelease- 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
-
releaseRepo
private java.net.URI releaseRepo(RepositoryPlugin releaseRepo, Processor context, java.lang.String jarName, java.io.InputStream jarStream) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getReleaseRepos
private java.util.List<RepositoryPlugin> getReleaseRepos(java.lang.String names)
-
parseReleaseRepos
private Parameters parseReleaseRepos(java.lang.String names)
-
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.ExceptionRelease- 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 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-
-
getBundleFromProject
private Container getBundleFromProject(java.lang.String bsn, java.util.Map<java.lang.String,java.lang.String> attrs) throws java.lang.Exception
Look for the bundle in the workspace. The premise is that the bsn must start with the project name.- Parameters:
bsn- The bsnattrs- Any attributes- Throws:
java.lang.Exception
-
getBundleByHash
private Container getBundleByHash(java.lang.String bsn, java.util.Map<java.lang.String,java.lang.String> attrs) throws java.lang.Exception
- Throws:
java.lang.Exception
-
deploy
public void deploy(java.lang.String name, java.io.File file) throws java.lang.ExceptionDeploy 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.ExceptionDeploy the file (which must be a bundle) into the repository.- Parameters:
file- bundle- Throws:
java.lang.Exception
-
deploy
public void deploy() throws java.lang.ExceptionDeploy 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
-
add
private void add(java.util.List<java.lang.String> paths, Container container) 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.ExceptionThis is the external method that will pre-build any dependencies if it is out of date.- Parameters:
underTest-- Throws:
java.lang.Exception
-
install
private void install(java.io.File[] files) throws java.lang.Exception- Throws:
java.lang.Exception
-
getInstallRepositories
public Parameters getInstallRepositories()
-
install
private void install(RepositoryPlugin repo, Processor context, java.io.File f, Attrs value) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getFiles
public java.io.File[] getFiles()
Return the files
-
isStale
public boolean isStale() throws java.lang.ExceptionCheck if this project needs building. This is defined as:- Throws:
java.lang.Exception
-
isStale
boolean isStale(java.util.Set<Project> visited) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getBuildFiles
public java.io.File[] getBuildFiles() throws java.lang.ExceptionThis 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.ExceptionBuild without doing any dependency checking. Make sure any dependent projects are built first.- Parameters:
underTest-- Throws:
java.lang.Exception
-
builtFiles
private void builtFiles(java.util.Collection<java.io.File> files)
-
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
-
saveBuildWithoutClose
private java.io.File saveBuildWithoutClose(Jar jar) throws java.lang.Exception
- Throws:
java.lang.Exception
-
write
private java.io.File write(ConsumerWithException<java.io.File> jar, java.io.File outputFile) throws java.io.IOException, java.lang.InterruptedException, java.lang.Exception
- Throws:
java.io.IOExceptionjava.lang.InterruptedExceptionjava.lang.Exception
-
getOutputFile
public java.io.File getOutputFile(java.lang.String bsn, java.lang.String version) throws java.lang.ExceptionCalculate 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
-
reportNewer
private void reportNewer(long lastModified, Jar jar)
-
refresh
public boolean refresh()
Refresh if we are based on stale data. This also implies our workspace.
-
refreshData
private void refreshData()
-
isCnf
public boolean isCnf()
-
propertiesChanged
public void propertiesChanged()
- Overrides:
propertiesChangedin 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
-
getExporter
private Exporter getExporter(java.lang.String type)
-
export
@Deprecated public void export(java.lang.String runFilePath, boolean keep, java.io.File output) throws java.lang.ExceptionDeprecated.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.ExceptionRelease.- Parameters:
name- The repository name- Throws:
java.lang.Exception
-
clean
public void clean() throws java.lang.Exception- Throws:
java.lang.Exception
-
clean
void clean(java.io.File dir, java.lang.String type) throws java.io.IOException- Throws:
java.io.IOException
-
clean
void clean(java.io.File dirOrFile, java.lang.String type, boolean recreate) throws java.io.IOException- Throws:
java.io.IOException
-
build
public java.io.File[] build() throws java.lang.Exception- Throws:
java.lang.Exception
-
getMakefile
private Makefile getMakefile()
-
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.ExceptionRun 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.ExceptionBump 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
-
replace
boolean replace(java.io.File f, java.lang.String pattern, java.lang.String replacement) throws java.io.IOException- Throws:
java.io.IOException
-
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
-
before
void before(Project p, java.lang.String a)
Run all before command plugins
-
after
void after(Project p, java.lang.String a, java.lang.Throwable t)
Run all after command plugins
-
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
-
getSubBuilders
@Deprecated public java.util.Collection<? extends Builder> getSubBuilders() throws java.lang.Exception
Deprecated.As of 3.4. Replace withtry (ProjectBuilder pb = getBuilder(null)) { for (Builder b : pb.getSubBuilders()) { ... } }Get a list of the sub builders. A bnd.bnd file can contain the -sub option. This will generate multiple deliverables. This method returns the builders for each sub file. If no -sub option is present, the list will contain a builder for the bnd.bnd file.- Returns:
- A list of builders.
- Throws:
java.lang.Exception
-
toFile
java.util.Collection<java.io.File> toFile(java.util.Collection<Container> containers) throws java.lang.Exception
Calculate the classpath. We include our own runtime.jar which includes the test framework and we include the first of the test frameworks specified.- 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
-
getHandler
private <T> T getHandler(java.lang.Class<T> target, java.util.Collection<Container> containers, java.lang.String header, java.lang.String defaultHandler) 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.ExceptionDo a baseline for this project- Throws:
java.lang.Exception
-
verifyDependencies
public void verifyDependencies(boolean test) throws java.lang.ExceptionMethod to verify that the paths are correct, ie no missing dependencies- Parameters:
test- for test cases, also adds -testpath- Throws:
java.lang.Exception
-
verifyDependencies
private void verifyDependencies(java.lang.String title, java.util.Collection<Container> path) throws java.lang.Exception- Throws:
java.lang.Exception
-
report
public void report(java.util.Map<java.lang.String,java.lang.Object> table) throws java.lang.ExceptionReport 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
-
compile
private void compile(Command javac, java.lang.String what) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getCommonJavac
private Command getCommonJavac(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:ProcessorReturn if this is an interactive environment like Eclipse or runs in batch mode. If interactive, things can get refreshed.- Overrides:
isInteractivein 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.
-
staleCheck
private void staleCheck(java.lang.String src, ProjectInstructions.StaleTest st)
-
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:ProcessorA checksum based on the values of the properties- Overrides:
getChecksumin 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()
-
parseBuildResources
private java.util.List<org.osgi.resource.Resource> parseBuildResources()
-
-