|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectaQute.bnd.osgi.Domain
aQute.bnd.osgi.Processor
aQute.bnd.build.Project
public class Project
This class is NOT threadsafe
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class aQute.bnd.osgi.Processor |
|---|
Processor.CL, Processor.FileLine |
| Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter |
|---|
Reporter.SetLocation |
| Nested classes/interfaces inherited from interface aQute.service.reporter.Report |
|---|
Report.Location |
| Field Summary | |
|---|---|
static String |
BNDCNF
|
static String |
BNDFILE
|
| Fields inherited from class aQute.bnd.osgi.Processor |
|---|
LIST_SPLITTER |
| Constructor Summary | |
|---|---|
Project(Workspace workspace,
File buildDir)
|
|
Project(Workspace workspace,
File projectDir,
File buildFile)
|
|
| Method Summary | |
|---|---|
String |
_findfile(String[] args)
|
String |
_help(String[] args)
|
String |
_ide(String[] args)
|
String |
_p_allsourcepath(String[] args)
|
String |
_p_bootclasspath(String[] args)
|
String |
_p_buildpath(String[] args)
|
String |
_p_dependson(String[] args)
|
String |
_p_output(String[] args)
|
String |
_p_sourcepath(String[] args)
|
String |
_p_testpath(String[] args)
|
String |
_project(String[] args)
|
String |
_repo(String[] args)
|
String |
_repos(String[] args)
|
void |
action(String command)
|
void |
action(String command,
Object... args)
|
void |
addClasspath(File f)
bnd maintains a class path that is set by the environment, i.e. |
void |
baseline()
Do a baseline for this project |
File[] |
build()
|
File[] |
build(boolean underTest)
This is the external method that will pre-build any dependencies if it is out of date. |
File[] |
buildLocal(boolean underTest)
Build without doing any dependency checking. |
void |
bump()
|
void |
bump(String mask)
Bump the version of this project. |
void |
clean()
|
void |
clearClasspath()
|
void |
compile(boolean test)
|
void |
deploy()
Deploy the current project to a repository |
void |
deploy(File file)
Deploy the file (which must be a bundle) into the repository. |
void |
deploy(String name,
File file)
Deploy the file (which must be a bundle) into the repository. |
void |
doMavenPom(Strategy strategyx,
List<Container> result,
String action)
The user selected pom in a path. |
void |
export(String runFilePath,
boolean keep,
File output)
|
void |
exportRunbundles(String runFilePath,
File outputDir)
|
void |
fillActions(Map<String,Action> all)
|
Map<String,Action> |
getActions()
|
Collection<File> |
getAllsourcepath()
|
Collection<Container> |
getBootclasspath()
|
Collection<String> |
getBsns()
|
ProjectBuilder |
getBuilder(ProjectBuilder parent)
Return a new builder that is nicely setup for this project. |
File[] |
getBuildFiles()
This method must only be called when it is sure that the project has been build before in the same session. |
File[] |
getBuildFiles(boolean buildIfAbsent)
|
Collection<Container> |
getBuildpath()
|
Container |
getBundle(String bsn,
String range,
Strategy strategy,
Map<String,String> attrs)
Get a bundle from one of the plugin repositories. |
List<Container> |
getBundles(Strategy strategyx,
String spec,
String source)
Analyze the header and return a list of files that should be on the build, test or some other path. |
int |
getChanged()
|
Collection<Container> |
getClasspath()
|
Packages |
getContained()
Get the contained packages calculated from all builders from the last build |
Container |
getDeliverable(String bsn,
Map<String,String> attrs)
Answer the container associated with a given bsn. |
Collection<Container> |
getDeliverables()
Returns containers for the deliverables of this project. |
Collection<Project> |
getDependson()
|
Packages |
getExports()
Get the exported packages form all builders calculated from the last build |
File[] |
getFiles()
Return the files |
Packages |
getImports()
Get the imported packages from all builders calculated from the last build |
protected Object[] |
getMacroDomains()
This should be overridden by subclasses to add extra macro command domains on the search list. |
String |
getName()
|
File |
getOutput()
|
File |
getOutputFile(String bsn)
|
File |
getOutputFile(String bsn,
String version)
Calculate the file for a JAR. |
Version |
getPackageInfo(String packageName)
|
ProjectLauncher |
getProjectLauncher()
Get a launcher. |
ProjectTester |
getProjectTester()
|
boolean |
getRunBuilds()
|
Collection<Container> |
getRunbundles()
|
Collection<Container> |
getRunFw()
Return the run framework |
Collection<Container> |
getRunpath()
|
Collection<String> |
getRunProgramArgs()
|
Map<String,String> |
getRunProperties()
|
File |
getRunStorage()
|
Collection<String> |
getRunVM()
|
Collection<File> |
getSourcePath()
|
File |
getSrc()
|
File |
getSrcOutput()
|
Builder |
getSubBuilder(File bndFile)
Return the builder associated with the give bnd file or null. |
ProjectBuilder |
getSubBuilder(String string)
Return a build that maps to the sub file. |
Collection<? extends Builder> |
getSubBuilders()
Get a list of the sub builders. |
File |
getTarget()
|
File |
getTargetDir()
|
File |
getTestOutput()
|
Collection<Container> |
getTestpath()
|
File |
getTestSrc()
|
static Project |
getUnparented(File propertiesFile)
|
Jar |
getValidJar(File f)
This methods attempts to turn any jar into a valid jar. |
Jar |
getValidJar(Jar jar,
String id)
|
Jar |
getValidJar(URL url)
|
Version |
getVersion(String bsn)
|
Map<String,Version> |
getVersions()
|
Workspace |
getWorkspace()
|
boolean |
isCnf()
|
boolean |
isNoBundles()
Answer if this project does not have any output |
boolean |
isStale()
Check if this project needs building. |
boolean |
isValid()
|
void |
junit()
Run JUnit |
protected Strategy |
overrideStrategy(Map<String,String> attrs,
Strategy useStrategy)
|
Jar |
pack(String profile)
|
void |
prepare()
Set up all the paths |
void |
propertiesChanged()
|
boolean |
refresh()
Refresh if we are based on stale data. |
void |
refreshAll()
|
void |
release()
|
void |
release(boolean test)
|
void |
release(String name)
Release. |
void |
release(String name,
boolean test)
Release |
File |
release(String jarName,
InputStream jarStream)
|
File |
release(String name,
String jarName,
InputStream jarStream)
Release |
URI |
releaseURI(String jarName,
InputStream jarStream)
|
URI |
releaseURI(String name,
String jarName,
InputStream jarStream)
|
void |
remove()
|
void |
report(Map<String,Object> table)
Report detailed info from this project |
protected void |
report(Map<String,Object> table,
boolean isProject)
|
void |
run()
|
void |
runLocal()
|
File |
saveBuild(Jar jar)
|
void |
script(String type,
String script)
|
void |
script(String type,
String script,
Object... args)
|
void |
setChanged()
|
void |
setDelayRunDependencies(boolean x)
Make this project delay the calculation of the run dependencies. |
void |
setPackageInfo(String packageName,
Version version)
Sets the package version on an exported package |
void |
test()
|
void |
test(List<String> tests)
|
protected Container |
toContainer(String bsn,
String range,
Map<String,String> attrs,
File result,
DownloadBlocker db)
|
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String BNDFILE
public static final String BNDCNF
| Constructor Detail |
|---|
public Project(Workspace workspace,
File projectDir,
File buildFile)
throws Exception
Exception
public Project(Workspace workspace,
File buildDir)
throws Exception
Exception| Method Detail |
|---|
public static Project getUnparented(File propertiesFile)
throws Exception
Exceptionpublic boolean isValid()
public ProjectBuilder getBuilder(ProjectBuilder parent)
throws Exception
parent - The project builder to use as parent, use this project if null
Exceptionpublic int getChanged()
public void setChanged()
public Workspace getWorkspace()
public String toString()
Processor
toString in class Processor
public void prepare()
throws Exception
Exceptionpublic File getSrc()
public File getSrcOutput()
public File getTestSrc()
public File getTestOutput()
public File getTargetDir()
public List<Container> getBundles(Strategy strategyx,
String spec,
String source)
throws Exception
strategy - STRATEGY_LOWEST or STRATEGY_HIGHESTspec - The header
Exception
public void doMavenPom(Strategy strategyx,
List<Container> result,
String action)
throws Exception
strategyx - the strategy to use.result - The list of result containersattrs - The attributes
Exception - anything goes wrong
public Collection<Project> getDependson()
throws Exception
Exception
public Collection<Container> getBuildpath()
throws Exception
Exception
public Collection<Container> getTestpath()
throws Exception
Exception
public Collection<Container> getRunpath()
throws Exception
Exception
public Collection<Container> getRunbundles()
throws Exception
Exception
public Collection<Container> getRunFw()
throws Exception
Exception
public File getRunStorage()
throws Exception
Exceptionpublic boolean getRunBuilds()
public Collection<File> getSourcePath()
throws Exception
Exception
public Collection<File> getAllsourcepath()
throws Exception
Exception
public Collection<Container> getBootclasspath()
throws Exception
Exception
public File getOutput()
throws Exception
Exception
public String _p_dependson(String[] args)
throws Exception
Exception
public String _p_buildpath(String[] args)
throws Exception
Exception
public String _p_testpath(String[] args)
throws Exception
Exception
public String _p_sourcepath(String[] args)
throws Exception
Exception
public String _p_allsourcepath(String[] args)
throws Exception
Exception
public String _p_bootclasspath(String[] args)
throws Exception
Exception
public String _p_output(String[] args)
throws Exception
Exceptionprotected Object[] getMacroDomains()
Processor
getMacroDomains in class Processor
public File release(String jarName,
InputStream jarStream)
throws Exception
Exception
public URI releaseURI(String jarName,
InputStream jarStream)
throws Exception
Exception
public File release(String name,
String jarName,
InputStream jarStream)
throws Exception
name - The repository namejarName - jarStream -
Exception
public URI releaseURI(String name,
String jarName,
InputStream jarStream)
throws Exception
Exception
public void release(boolean test)
throws Exception
Exception
public void release(String name,
boolean test)
throws Exception
name - The respository nametest - Run testcases
Exception
public Container getBundle(String bsn,
String range,
Strategy strategy,
Map<String,String> attrs)
throws Exception
bsn - The bundle symbolic namerange - The version rangelowest - set to LOWEST or HIGHEST
Exception - when something goes wrong
protected Strategy overrideStrategy(Map<String,String> attrs,
Strategy useStrategy)
attrs - useStrategy -
protected Container toContainer(String bsn,
String range,
Map<String,String> attrs,
File result,
DownloadBlocker db)
bsn - range - attrs - result -
public void deploy(String name,
File file)
throws Exception
name - The repository namefile - bundle
Exception
public void deploy(File file)
throws Exception
file - bundle
Exception
public void deploy()
throws Exception
Exception
public String _repo(String[] args)
throws Exception
Exception
public File getTarget()
throws Exception
Exception
public File[] build(boolean underTest)
throws Exception
underTest -
Exceptionpublic File[] getFiles()
public boolean isStale()
throws Exception
Exception
public File[] getBuildFiles()
throws Exception
Exception
public File[] getBuildFiles(boolean buildIfAbsent)
throws Exception
Exception
public File[] buildLocal(boolean underTest)
throws Exception
underTest -
Exceptionpublic boolean isNoBundles()
public File saveBuild(Jar jar)
throws Exception
Exception
public File getOutputFile(String bsn,
String version)
throws Exception
jar -
Exception
public File getOutputFile(String bsn)
throws Exception
Exceptionpublic boolean refresh()
refresh in class Processorpublic boolean isCnf()
public void propertiesChanged()
propertiesChanged in class Processorpublic String getName()
public Map<String,Action> getActions()
public void fillActions(Map<String,Action> all)
public void release()
throws Exception
Exception
public void export(String runFilePath,
boolean keep,
File output)
throws Exception
Exception
public void exportRunbundles(String runFilePath,
File outputDir)
throws Exception
Exception
public void release(String name)
throws Exception
name - The repository name
Exception
public void clean()
throws Exception
Exception
public File[] build()
throws Exception
Exception
public void run()
throws Exception
Exception
public void runLocal()
throws Exception
Exception
public void test()
throws Exception
Exception
public void test(List<String> tests)
throws Exception
Exception
public void junit()
throws Exception
Exception
public Jar getValidJar(File f)
throws Exception
descriptor - in -
Exception
public Jar getValidJar(URL url)
throws Exception
Exception
public Jar getValidJar(Jar jar,
String id)
throws Exception
Exceptionpublic String _project(String[] args)
public void bump(String mask)
throws Exception
mask - the mask for bumping, see Macro._version(String[])
Exception
public void bump()
throws Exception
Exception
public void action(String command)
throws Exception
Exception
public void action(String command,
Object... args)
throws Exception
Exceptionpublic String _findfile(String[] args)
public void refreshAll()
public void script(String type,
String script)
throws Exception
Exception
public void script(String type,
String script,
Object... args)
throws Exception
Exception
public String _repos(String[] args)
throws Exception
Exception
public String _help(String[] args)
throws Exception
Exception
public Collection<Container> getDeliverables()
throws Exception
Exception
public Builder getSubBuilder(File bndFile)
throws Exception
bndFile - A file pointing to a bnd file.
Exception
public ProjectBuilder getSubBuilder(String string)
throws Exception
string -
Exception
public Container getDeliverable(String bsn,
Map<String,String> attrs)
throws Exception
bndFile - A file pointing to a bnd file.
Exception
public Collection<? extends Builder> getSubBuilders()
throws Exception
Exceptionpublic Collection<String> getRunVM()
public Collection<String> getRunProgramArgs()
public Map<String,String> getRunProperties()
public ProjectLauncher getProjectLauncher()
throws Exception
Exception
public ProjectTester getProjectTester()
throws Exception
Exceptionpublic void setDelayRunDependencies(boolean x)
public void setPackageInfo(String packageName,
Version version)
packageName - The package nameversion - The new package version
public Version getPackageInfo(String packageName)
throws IOException
IOExceptionpublic void addClasspath(File f)
public void clearClasspath()
public Collection<Container> getClasspath()
public Jar pack(String profile)
throws Exception
Exception
public void baseline()
throws Exception
Exception
public void verifyDependencies(boolean test)
throws Exception
test - for test cases, also adds -testpath
Exception
public void report(Map<String,Object> table)
throws Exception
report in class ProcessorException
protected void report(Map<String,Object> table,
boolean isProject)
throws Exception
Exception
public void compile(boolean test)
throws Exception
Exception
public String _ide(String[] args)
throws IOException
IOException
public Map<String,Version> getVersions()
throws Exception
Exception
public Collection<String> getBsns()
throws Exception
Exception
public Version getVersion(String bsn)
throws Exception
Exceptionpublic Packages getExports()
public Packages getImports()
public Packages getContained()
public void remove()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||