|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectaQute.lib.osgi.Processor
aQute.bnd.build.Project
public class Project
This class is NOT threadsafe
Field Summary | |
---|---|
static String |
BNDCNF
|
static String |
BNDFILE
|
Fields inherited from class aQute.lib.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 |
_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)
Macro access to the repository ${repo; |
String |
_repos(String[] args)
|
void |
action(String command)
|
void |
appendPackages(RepositoryPlugin.Strategy strategyx,
String spec,
List<Container> resolvedBundles,
ResolverMode mode)
Calculates the containers required to fulfil the -buildpackages
instruction, and appends them to the existing list of containers. |
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)
|
void |
clean()
|
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(RepositoryPlugin.Strategy strategyx,
List<Container> result,
String action)
The user selected pom in a path. |
void |
fillActions(Map<String,Action> all)
|
Map<String,Action> |
getActions()
|
Collection<File> |
getAllsourcepath()
|
Collection<Container> |
getBootclasspath()
|
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,
RepositoryPlugin.Strategy strategy,
Map<String,String> attrs)
Get a bundle from one of the plugin repositories. |
List<Container> |
getBundles(RepositoryPlugin.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()
|
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()
|
File[] |
getFiles()
Return the files |
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)
|
Container |
getPackage(String packageName,
String range,
RepositoryPlugin.Strategy strategyx,
Map<String,String> attrs,
ResolverMode mode)
Find a container to fulfil a package requirement |
ProjectLauncher |
getProjectLauncher()
Get a launcher. |
ProjectTester |
getProjectTester()
|
boolean |
getRunBuilds()
|
Collection<Container> |
getRunbundles()
|
Collection<Container> |
getRunpath()
|
Map<String,String> |
getRunProperties()
|
File |
getRunStorage()
|
Collection<String> |
getRunVM()
|
Collection<File> |
getSourcePath()
|
File |
getSrc()
|
Builder |
getSubBuilder(File bndFile)
Return the builder associated with the give bnd file or null. |
Collection<? extends Builder> |
getSubBuilders()
Get a list of the sub builders. |
File |
getTarget()
|
Collection<Container> |
getTestpath()
|
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)
|
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()
|
boolean |
lock(String reason)
|
protected RepositoryPlugin.Strategy |
overrideStrategy(Map<String,String> attrs,
RepositoryPlugin.Strategy useStrategy)
|
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)
|
File |
release(Jar jar)
|
void |
release(String name)
Release. |
void |
release(String name,
boolean test)
Release |
File |
release(String name,
Jar jar)
Release |
void |
run()
|
File |
saveBuild(Jar jar)
|
void |
script(String type,
String script)
|
void |
setChanged()
|
void |
setDelayRunDependencies(boolean x)
Make this project delay the calculation of the run dependencies. |
void |
test()
|
protected Container |
toContainer(String bsn,
String range,
Map<String,String> attrs,
File result)
|
String |
toString()
|
void |
unlock()
|
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
Exception
public boolean isValid()
public ProjectBuilder getBuilder(ProjectBuilder parent) throws Exception
parent
- The project builder to use as parent, use this project if null
Exception
public int getChanged()
public void setChanged()
public Workspace getWorkspace()
public String toString()
toString
in class Object
public void prepare() throws Exception
Exception
public File getSrc()
public List<Container> getBundles(RepositoryPlugin.Strategy strategyx, String spec, String source) throws Exception
strategy
- STRATEGY_LOWEST or STRATEGY_HIGHESTspec
- The header
Exception
public void appendPackages(RepositoryPlugin.Strategy strategyx, String spec, List<Container> resolvedBundles, ResolverMode mode) throws Exception
-buildpackages
instruction, and appends them to the existing list of containers.
strategyx
- The package-version disambiguation strategy.spec
- The value of the @{code -buildpackages} instruction.
Exception
public Container getPackage(String packageName, String range, RepositoryPlugin.Strategy strategyx, Map<String,String> attrs, ResolverMode mode) throws Exception
packageName
- The package requiredrange
- The package version range requiredstrategyx
- The package-version disambiguation strategyattrs
- Other attributes specified by the search.
Exception
public void doMavenPom(RepositoryPlugin.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 wrongpublic 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 File getRunStorage() throws Exception
Exception
public 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
Exception
protected Object[] getMacroDomains()
Processor
getMacroDomains
in class Processor
public File release(Jar jar) throws Exception
Exception
public File release(String name, Jar jar) throws Exception
name
- The repository namejar
-
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, RepositoryPlugin.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 wrongprotected RepositoryPlugin.Strategy overrideStrategy(Map<String,String> attrs, RepositoryPlugin.Strategy useStrategy)
attrs
- useStrategy
-
protected Container toContainer(String bsn, String range, Map<String,String> attrs, File result)
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
-
Exception
public 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
-
Exception
public boolean isNoBundles()
public File saveBuild(Jar jar) throws Exception
Exception
public File getOutputFile(String bsn) throws Exception
Exception
public boolean refresh()
refresh
in class Processor
public boolean isCnf()
public void propertiesChanged()
propertiesChanged
in class Processor
public String getName()
public Map<String,Action> getActions()
public void fillActions(Map<String,Action> all)
public void release() 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 test() 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
Exception
public String _project(String[] args)
public void bump(String mask) throws IOException
IOException
public void bump() throws IOException
IOException
public void action(String command) throws Throwable
Throwable
public String _findfile(String[] args)
public void refreshAll()
public void script(String type, String script) 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 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
Exception
public Collection<String> getRunVM()
public Map<String,String> getRunProperties()
public ProjectLauncher getProjectLauncher() throws Exception
Exception
public ProjectTester getProjectTester() throws Exception
Exception
public boolean lock(String reason) throws InterruptedException
InterruptedException
public void unlock()
public void setDelayRunDependencies(boolean x)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |