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.
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.
Once you have the Ant tile open, click the Add buildfiles button.
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.
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:
The BUILD SUCCESSFUL line indicates that the new module build was completed.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:
You should see another BUILD SUCCESSFUL message once it completes.
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:
(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.
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