Class Tasks

java.lang.Object
org.kissweb.builder.Tasks

public class Tasks extends Object
This class contains the tasks that are executed by the build system.

The build system finds the names of the tasks through reflection. It also does camelCase conversion. So a task named abcDef may be evoked as abc-def.

Each task must be declared as a public static method with no parameters.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Build the whole system

    1.
    static void
    Build the system into explodedDir
    static void
    Remove:
    -- all files that were built

    Do not remove:
    -- the downloaded jar files, tomcat
    -- the IDE files
    static void
    Build and run both the front-end and back-end

    1.
    static void
    Build and run the back-end only

    1.
    static void
    Remove:
    -- all files that were built
    -- the downloaded jar files, tomcat
    -- the IDE files
    static void
    jar()
    Build Kiss.jar

    This is a JAR file that can be used in other apps as a utility library.
    static void
    build the javdoc files
    static void
    This creates a command-line executable jar file that runs the org.kissweb.Main class.
    static void
    Create an executable JAR that includes Kiss, Groovy, and the PostgreSQL driver.
    static void
    Download needed foreign libraries
    static void
    Display a list of valid tasks.
    static void
    main(String[] args)
    Main entry point for the build system.
    static void
    Remove:
    -- all files that were built
    -- the downloaded jar files, tomcat

    Do not remove:
    -- the IDE files
    static void
    Unpack and install tomcat
    static void
    Build the system for unit testing.
    static void
    war()
    Build the system and create the deployable WAR file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Tasks

      public Tasks()
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Main entry point for the build system. It tells the build system what arguments were passed in and what class contains all the tasks.
      Parameters:
      args - the arguments to the program
      Throws:
      Exception - if exception is thrown
      InstantiationException - if the class cannot be instantiated
    • listTasks

      public static void listTasks()
      Display a list of valid tasks. It is called by the build system when the user selects the 'list-tasks' task.

      The build system expects this method to be named listTasks.
      See Also:
    • build

      public static void build()
      Build the whole system

      1. download needed jar files
      2. build the system into a deployable war file
      3. set up a local tomcat server
      4. deploy the war file to the local tomcat
      5. build JavaDocs
    • kisscmd

      public static void kisscmd()
      This creates a command-line executable jar file that runs the org.kissweb.Main class. You can put your custom code in the org.kissweb.Main class and build the runnable jar. For a possible better solution, see the KissGP target.
    • libs

      public static void libs()
      Download needed foreign libraries
    • jar

      public static void jar()
      Build Kiss.jar

      This is a JAR file that can be used in other apps as a utility library.
    • KissGP

      public static void KissGP()
      Create an executable JAR that includes Kiss, Groovy, and the PostgreSQL driver. It runs an arbitrary groovy file in the context of Kiss and PostgreSQL.

      All that is needed is KissGP.jar

      Usage: java -jar KissGP.jar [groovy-file] [args]...

      Other databases can be used also. See the manual.
    • unitTests

      public static void unitTests()
      Build the system for unit testing. (KissUnitTest.jar)
    • buildSystem

      public static void buildSystem()
      Build the system into explodedDir
    • war

      public static void war()
      Build the system and create the deployable WAR file.
    • setupTomcat

      public static void setupTomcat()
      Unpack and install tomcat
    • develop

      public static void develop()
      Build and run both the front-end and back-end

      1. download needed jar files
      2. build the system into a deployable war file
      3. set up a local tomcat server
      4. deploy the war file to the local tomcat
      5. build JavaDocs
      6. run the local tomcat
    • developBackend

      public static void developBackend()
      Build and run the back-end only

      1. download needed jar files
      2. build the system into a deployable war file
      3. set up a local tomcat server
      4. deploy the war file to the local tomcat
      5. build JavaDocs
      6. run the local tomcat
    • javadoc

      public static void javadoc()
      build the javdoc files
    • clean

      public static void clean()
      Remove:
      -- all files that were built

      Do not remove:
      -- the downloaded jar files, tomcat
      -- the IDE files
    • realclean

      public static void realclean()
      Remove:
      -- all files that were built
      -- the downloaded jar files, tomcat

      Do not remove:
      -- the IDE files
    • ideclean

      public static void ideclean()
      Remove:
      -- all files that were built
      -- the downloaded jar files, tomcat
      -- the IDE files