|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectprotoj.core.ProjectLayout
public final class ProjectLayout
Contains the locations of the various project directories. A typical project looks something like this:
˜/dev/myproj/
|
|____bin/ shell scripts should go here
|
|____classes/ java source files get compiled into here (auto-created)
|
|____conf/ configuration files should go here
| |
| |____profile/ configuration profiles should go here
|
|____docs/ documentation files should go here
|
|____lib/ third party libs should go here
|
|____log/ log files should go here
|
|____src/
| |
| |____java/ .java and .aj source files should go here
| |
| |____manifest/ manifest.mf files should go here, one per jar file
| |
| |____resources/ additional content for the classes directory and/or jar files should go here
|
|____target/ all-purpose project temp directory (auto-created)
|
|____archive/ java archives get generated here (auto-created)
|
|____junit-reports/ junit test reports get generated here (auto-created)
Here is some insight into the directory structure:
This is an immutable value object that is usually aggregated within a StandardProject parent, but can also be created in its own right - especially for tests that need to check details about directory structures.
| Field Summary | |
|---|---|
java.lang.String |
sourcePostfix
See getSourcePostfix(). |
java.lang.String |
srcPostfix
See getSrcPostfix(). |
| Constructor Summary | |
|---|---|
ProjectLayout(java.io.File rootDir,
java.lang.String scriptName)
Calculates all project paths under the given rootDir. |
|
| Method Summary | |
|---|---|
void |
clean()
Deletes the classes and target directories. |
void |
createPhysicalLayout()
Creates the project layout on the filing system. |
java.io.File |
getArchiveDir()
The directory where archives are generated. |
java.io.File |
getBinDir()
The directory containing the files such as shell scripts. |
java.io.File |
getClassesDir()
The directory containing .class compilation units, e.g. |
ArgRunnable<org.apache.tools.ant.types.Path> |
getClasspathConfig()
The object used to configure classpaths. |
java.io.File |
getConfDir()
The directory containing configuration files, e.g. |
java.io.File |
getDocsDir()
The directory containing documentation |
java.io.File |
getJar(java.lang.String jarName)
Convenience method that returns the fully qualified jar file given just its name. |
java.io.File |
getJavaDir()
The directory containing compilation sources, e.g. |
java.lang.String |
getJavadocPostfix()
Forms part of the name of each javadocArchive archive. |
java.io.File |
getJunitReportsDir()
The directory containing junit reports, e.g. |
java.io.File |
getLibDir()
The directory containing java libraries, e.g. |
java.io.File |
getLogDir()
The directory containing log files, e.g. |
java.io.File |
getLogFile()
The file used for logging, e.g. |
java.io.File |
getManifest(java.lang.String name)
Convenience method that returns the fully qualified manifest file given just its name. |
java.io.File |
getManifestDir()
The directory containing manifest files, e.g. |
java.io.File |
getProfileDir()
The directory that contains profile subdirectories as defined by the user. |
java.io.File |
getPropertiesFile()
The file that contains all the application properties when the config command is used with interpolation. |
java.lang.String |
getRelativePath(java.io.File child)
Calculates the relative path string of the child to the layout root dir. |
java.io.File |
getResourcesDir()
The directory containing resources, e.g. |
java.io.File |
getRootDir()
The directory where all the project files are located, e.g. |
java.lang.String |
getRootName()
Convenience method that returns the name of the root project directory. |
java.lang.String |
getRootPath()
|
java.lang.String |
getScriptName()
Convenience method that returns the name of the shell script. |
java.io.File |
getShellScript()
The script responsible for executing the project. |
java.lang.String |
getSourcePostfix()
Forms part of the name of each sourceArchive archive. |
java.io.File |
getSrcDir()
The directory containing the source files. |
java.lang.String |
getSrcPostfix()
Some archives contain the string "src" to indicate they are jar files that contain source. |
java.io.File |
getTargetDir()
The directory used for temporary files, e.g. |
java.lang.String |
loadLog()
Loads the log from disk and reads its content into a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.lang.String sourcePostfix
getSourcePostfix().
public java.lang.String srcPostfix
getSrcPostfix().
| Constructor Detail |
|---|
public ProjectLayout(java.io.File rootDir,
java.lang.String scriptName)
rootDir. An
exception is thrown if any of the physical mandatory directories are
missing.
rootDir - the project root directoryscriptName - the name of the launch script with optional extension - see
createScriptName(String).| Method Detail |
|---|
public void createPhysicalLayout()
public java.lang.String getRootPath()
public java.io.File getRootDir()
public java.lang.String getRootName()
public java.io.File getBinDir()
public java.io.File getShellScript()
public java.lang.String getScriptName()
public java.io.File getDocsDir()
public java.io.File getArchiveDir()
public java.io.File getSrcDir()
public java.io.File getLogDir()
public java.io.File getLogFile()
public java.io.File getPropertiesFile()
public java.io.File getConfDir()
public java.io.File getProfileDir()
public java.io.File getJavaDir()
public java.io.File getResourcesDir()
public java.io.File getManifestDir()
public java.io.File getLibDir()
public java.io.File getTargetDir()
public java.io.File getClassesDir()
public java.io.File getJunitReportsDir()
public java.io.File getJar(java.lang.String jarName)
jarName -
public java.io.File getManifest(java.lang.String name)
name -
public ArgRunnable<org.apache.tools.ant.types.Path> getClasspathConfig()
public java.lang.String getSourcePostfix()
public java.lang.String getSrcPostfix()
public java.lang.String getJavadocPostfix()
public java.lang.String getRelativePath(java.io.File child)
child -
public java.lang.String loadLog()
public void clean()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||