|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.dpml.tools.impl.DefaultContext
Default implementation of a project context.
Constructor Summary | |
DefaultContext(Project project)
Creation of a new project build context. |
|
DefaultContext(Resource resource,
Project project)
Creation of a new project build context. |
Method Summary | |
File |
createFile(String path)
Create a file relative to the resource basedir. |
Path |
createPath(Resource[] resources)
Utility operation to construct a new path using a supplied array of resources. |
Path |
createPath(Resource[] resources,
boolean resolve,
boolean filter)
Utility operation to construct a new path using a supplied array of resources. |
Path |
createPath(Scope scope)
Utility operation to construct a new classpath path instance. |
File |
getEtcDataDirectory()
Return the project etc/resources directory. |
File |
getEtcDirectory()
Return the project etc directory. |
File |
getEtcMainDirectory()
Return the project etc/main directory. |
File |
getEtcTestDirectory()
Return the project etc/test directory. |
String |
getLayoutBase(String id)
Return the directory path representing the module structure and type using the layout strategy employed by the cache. |
String |
getLayoutFilename(String id)
Return a filename using the layout strategy employed by the cache. |
String |
getLayoutPath(String id)
Return the full path to an artifact using the layout employed by the cache. |
Library |
getLibrary()
Return the resource library. |
Path |
getPath(Scope scope)
Return an Ant path suitable for comile or runtime usage. |
Project |
getProject()
Return the associated project. |
String |
getProperty(String key)
Return the value of a property. |
String |
getProperty(String key,
String value)
Return the value of a property. |
Resource |
getResource()
Return the active resource. |
File |
getSrcDirectory()
Return the project source directory. |
File |
getSrcDocsDirectory()
Return the project source docs directory. |
File |
getSrcMainDirectory()
Return the project source main directory. |
File |
getSrcTestDirectory()
Return the project source test directory. |
File |
getTargetBuildDirectory()
Return the project target build directory. |
File |
getTargetBuildDocsDirectory()
Return the project target build docs directory. |
File |
getTargetBuildMainDirectory()
Return the project target build main directory. |
File |
getTargetBuildTestDirectory()
Return the project target build test directory. |
File |
getTargetClassesDirectory()
Return the project target root classes directory. |
File |
getTargetClassesMainDirectory()
Return the project target main classes directory. |
File |
getTargetClassesTestDirectory()
Return the project target test classes directory. |
File |
getTargetDeliverable(String type)
Return the project target deliverables directory. |
File |
getTargetDeliverablesDirectory()
Return the project target deliverables directory. |
File |
getTargetDirectory()
Return the project target directory. |
File |
getTargetDirectory(String path)
Return a directory within the target directory. |
File |
getTargetDocsDirectory()
Return the project target reports docs directory. |
File |
getTargetReportsDirectory()
Return the project target reports directory. |
File |
getTargetReportsJavadocDirectory()
Return the project target javadoc reports directory. |
File |
getTargetReportsMainDirectory()
Return the project target main reports directory. |
File |
getTargetReportsTestDirectory()
Return the project target test reports directory. |
File |
getTargetTempDirectory()
Return the project target temp directory. |
File |
getTargetTestDirectory()
Return the project target test directory. |
void |
init()
Initialize the context during which runtime and test path objects are established as project references. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultContext(Project project) throws Exception
project
- the unconfigured Ant project
Exception
- if an error occurs during context extablishmentpublic DefaultContext(Resource resource, Project project) throws Exception
resource
- the resource definitionproject
- the Ant project
Exception
- if an error occurs during context extablishmentMethod Detail |
public void init()
init
in interface Context
public Project getProject()
getProject
in interface Context
public String getProperty(String key)
getProperty
in interface Context
key
- the property key
public String getProperty(String key, String value)
getProperty
in interface Context
key
- the property keyvalue
- the default value
public Path getPath(Scope scope)
getPath
in interface Context
scope
- the build scope
public Resource getResource()
getResource
in interface Context
public Library getLibrary()
getLibrary
in interface Context
public File getSrcDirectory()
getSrcDirectory
in interface Context
public File getSrcMainDirectory()
getSrcMainDirectory
in interface Context
public File getSrcTestDirectory()
getSrcTestDirectory
in interface Context
public File getSrcDocsDirectory()
getSrcDocsDirectory
in interface Context
public File getEtcDirectory()
getEtcDirectory
in interface Context
public File getEtcMainDirectory()
getEtcMainDirectory
in interface Context
public File getEtcTestDirectory()
getEtcTestDirectory
in interface Context
public File getEtcDataDirectory()
getEtcDataDirectory
in interface Context
public File getTargetDirectory()
getTargetDirectory
in interface Context
public File getTargetDirectory(String path)
getTargetDirectory
in interface Context
path
- the path
public File getTargetTempDirectory()
getTargetTempDirectory
in interface Context
public File getTargetBuildDirectory()
getTargetBuildDirectory
in interface Context
public File getTargetBuildMainDirectory()
getTargetBuildMainDirectory
in interface Context
public File getTargetBuildTestDirectory()
getTargetBuildTestDirectory
in interface Context
public File getTargetBuildDocsDirectory()
getTargetBuildDocsDirectory
in interface Context
public File getTargetClassesDirectory()
getTargetClassesDirectory
in interface Context
public File getTargetClassesMainDirectory()
getTargetClassesMainDirectory
in interface Context
public File getTargetClassesTestDirectory()
getTargetClassesTestDirectory
in interface Context
public File getTargetReportsDirectory()
getTargetReportsDirectory
in interface Context
public File getTargetReportsTestDirectory()
getTargetReportsTestDirectory
in interface Context
public File getTargetReportsMainDirectory()
getTargetReportsMainDirectory
in interface Context
public File getTargetReportsJavadocDirectory()
getTargetReportsJavadocDirectory
in interface Context
public File getTargetDocsDirectory()
getTargetDocsDirectory
in interface Context
public File getTargetTestDirectory()
getTargetTestDirectory
in interface Context
public File getTargetDeliverablesDirectory()
getTargetDeliverablesDirectory
in interface Context
public File getTargetDeliverable(String type)
getTargetDeliverable
in interface Context
type
- the deliverable type
public File createFile(String path)
createFile
in interface Context
path
- the relative path
public String getLayoutFilename(String id)
getLayoutFilename
in interface Context
id
- the artifact type
public String getLayoutBase(String id)
getLayoutBase
in interface Context
id
- the artifact type
public String getLayoutPath(String id)
getLayoutPath
in interface Context
id
- the artifact type
public Path createPath(Scope scope)
createPath
in interface Context
scope
- the build scope
public Path createPath(Resource[] resources)
createPath
in interface Context
resources
- the resource to use in path construction
public Path createPath(Resource[] resources, boolean resolve, boolean filter)
createPath
in interface Context
resources
- the resources to use in path constructionresolve
- if true force local caching of the artifactfilter
- if true restrict path entries to resources that produce jars
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |