Package Torello.Java.Build
Class RunBuild
- java.lang.Object
-
- Torello.Java.Build.RunBuild
-
public class RunBuild extends java.lang.Object
Executes a Build. Will run all stages that were requested according to theBuilderRecord
instance that was passed to this class.
Example:
public static void main(String[] argv) throws Exception { Config config = new Config(); // Perform as many assignments to the Configuration-Fields as is necessary! // Below are just a few lines that are used to build the Java-HTML JAR. // The configurations below are just a smaller-subset of all possibilities. config.LOCAL_JAVADOC_DIR = "javadoc/"; config.PROJECT_NAME = "ProjectNumeroUno"; config.VERSION_MAJOR_NUMBER = 1; config.VERSION_MINOR_NUMBER = 3; // Merge the Configurations from your "Config" class, with those provided by the final // End-User at the Command-Line (CLI), via the 'argv' parameter. BuilderRecord rec = config.createBuilder(argv); // Runs the Build. RunBuild.run(rec); }
- See Also:
BuilderRecord
,Config
Hi-Lited Source-Code:- View Here: Torello/Java/Build/RunBuild.java
- Open New Browser-Tab: Torello/Java/Build/RunBuild.java
File Size: 4,851 Bytes Line Count: 127 '\n' Characters Found
Stateless Class:This class neither contains any program-state, nor can it be instantiated. The@StaticFunctional
Annotation may also be called 'The Spaghetti Report'.Static-Functional
classes are, essentially, C-Styled Files, without any constructors or non-static member fields. It is a concept very similar to the Java-Bean's@Stateless
Annotation.
- 1 Constructor(s), 1 declared private, zero-argument constructor
- 1 Method(s), 1 declared static
- 0 Field(s)
-
-
Method Summary
Start a Build. Configured by: Config
. Selected by:String[] argv
Modifier and Type Method static void
run(BuilderRecord brec)
-
-
-
Method Detail
-
run
public static void run(BuilderRecord brec) throws java.io.IOException
Runs the build. Accepts ana instance ofBuilderRecord
in order to utilize the configurations needed to actually do a build.- Parameters:
brec
- Requires the instance ofBuilderRecord
that was generated by classConfig
methodConfig.createBuilder(String[])
.- Throws:
java.io.IOException
- There are many, many wonderful opportunities for this exception to throw- Code:
- Exact Method Body:
// Timers.start[0] is how the "Total Timer Count" is computed. So 'touch it', and things // can start counting right from here. brec.timers.touch(); if (brec.cli.compositeStep_RunStage1to4_OptionSelected) { S02_JavaDoc.javaDoc(brec); S03_Upgrade.upgrade(brec); S04_TarJar.compress(brec); } else if (brec.cli.sor.MENU_CHOICE.startsWith("cb")) { S02_JavaDoc.javaDoc(brec); S03_Upgrade.upgrade(brec); S04_TarJar.compress(brec); S05_SyncJavaDoc.sync(brec); S06_SyncTarJar.sync(brec); S07_SyncLogs.sync(brec); if (brec.cli.sma_NoBrowserCache_OptionSelected) S08_SetMaxAge.set(brec); } else if (brec.cli.sor.MENU_CHOICE.startsWith("pb")) { S02_JavaDoc.javaDoc(brec); S03_Upgrade.upgrade(brec); if (brec.cli.partialWithSync_OptionSelected) { if (brec.cli.sor.userProvidedNickNames.size() > 0) S05_SyncJavaDoc.syncPart(brec); else S05_SyncJavaDoc.sync(brec); } if (brec.cli.sma_NoBrowserCache_OptionSelected) S08_SetMaxAge.set(brec); } else switch (brec.cli.sor.MENU_CHOICE) { case "1" : S01_JavaCompiler.compile(brec); break; case "2" : S02_JavaDoc.javaDoc(brec); break; case "3" : S03_Upgrade.upgrade(brec); break; case "4" : S04_TarJar.compress(brec); break; case "5" : S05_SyncJavaDoc.sync(brec); break; case "6" : S06_SyncTarJar.sync(brec); break; case "7" : S07_SyncLogs.sync(brec); break; case "8" : S08_SetMaxAge.set(brec); break; // This works great, but has a minor bug which is not going to be fixed until the // CSS Project has completed. In the mean time there is a very wonderfully worded // "ToDoException" that shall throw instead. // // Though this is an "invaluable tool" for cleaning up the docs, CSS is an even neater // idea that has to be completed, first. I have checked my broken links many times, // and all of the links in my core-libraries are working. Java-Doc Pages that are // created from Torello.Java.Buil (and even Torello.CSS) likely have a broken // internal link somewhere in them. case "lc" : if (1 == 1) throw new Torello.Java.ToDoException(); S02_JavaDoc.javaDoc(brec); // I don't even have a 'WLC' method in Stage-03 Upgrade anymore! // S03_Upgrade.upgradeWLC(U, ES, OS); break; default : throw new UnreachableError(); } brec.timers.PRINT_TIMES();
-
-