Building a Module

A Platform Module is built and deployed using Ant. The default target, build, will compile all code and deploy the module into the Platform server directory.


  1. To build and deploy the module, we need to open build.xml inside the Ant view. You can find this view on the top right corner of the interface, just right of Outline.

  2. Once you have the Ant tile open, click the Add buildfiles button.

  3. In the dialog that appears, select build.xml from the Bookstore and Bookstore_dataset projects. (You can select both of them in the same dialog by holding down CTRL and selecting each build file.) Once selected, click OK.
    images/download/attachments/144836524/buildfile_selection-version-1-modificationdate-1656013063000-api-v2.png

  4. After the build targets for each project are in the Ant view, expand Bookstore's targets. The list will be rather lengthy; to filter it down only to the most relevant targets, click Hide Internal Targets:

    Now double-click build to build the module.

    The Console tab should open at the bottom, and you should see a BUILD SUCCESSFUL message once it completes:
    images/download/attachments/144836524/ant_tile-version-1-modificationdate-1656013084000-api-v2.png


    images/download/attachments/144836524/build_successful-version-1-modificationdate-1656013103000-api-v2.png
    The BUILD SUCCESSFUL line indicates that the new module build was completed.

  5. You can now run out-of-container unit tests that do not require database access or other resources. By convention, out-of-container tests use the suffix UnitTest. For example: SampleUnitTest.java. Execute the Bookstore's unit-test target in Ant:

    images/download/attachments/144836524/ant_unit_test-version-1-modificationdate-1656013121000-api-v2.png You should see another BUILD SUCCESSFUL message once it completes.

  6. You can now start the Platform Server. For convenience, you can use the run-server ant target to launch it. Once you double-click the target, a new Windows process for Platform, Platform Server Console, opens. When you see Server startup in... the Platform has started successfully:
    images/download/attachments/144836524/image2022-1-4_13-4-17-version-1-modificationdate-1656013044000-api-v2.png

    (It might take a couple of minutes for Platform Server to finish starting up.)

    Troubleshooting Platform Server startup

    Platform Server needs to operate on port 80, so before you start the server, make sure another program is not already using it by using netstat -aon or a tool like TCPView.

  7. Now that Platform is running, you can run the in-container tests. By convention, in-container tests use the suffix ServerTest. For example: SampleServerTest.java.exe