The Web Graph Database


Creating a new StandardModule

Note: a NetBeans or Eclipse plug-in would be advantageous to make this process easier. (Volunteers?)

In the meantime, follow this manual process:

  1. Pick an identifier for the StandardModule, such as com.example.mygreatapp.
  2. Create a new NetBeans project with that name (com.example.mygreatapp). Consider the recommended source tree layout.
  3. In NetBeans' "Files" view, create a new directory called infogrid-moduleads at the root level of the new project.
  4. Inside infogrid-moduleads, create the ModuleAdvertisement file module.adv. Edit the file to accurately represent your StandardModule. It may be advantageous to use an existing module.adv file from another StandardModule as a template.
  5. Make sure the module.adv file declares its dependencies on other Modules correctly. All direct (but not indirect) dependencies need to be declared, i.e. dependencies to both other StandardModules and ModelModules. There are no implicit dependencies other than to org.infogrid.module.
  6. In NetBeans, select the project folder, and open the "Project Properties" dialog. In the "Libraries" tab, add the required compile-time libraries. These are:
    • all NetBeans projects containing the ModelModules that you listed as dependencies in the model.xml file
    • org.infogrid.module: the Module Framework
  7. In NetBeans' "Files" view, edit file build.xml to read as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="com.example.mygreatapp" default="default" basedir=".">
        <description>Builds, tests, and runs the project com.example.mygreatapp.</description>
        <import file="../../../ig-tools/infogrid-ant-library.xml"/>
        <import file="nbproject/build-impl.xml"/>
        <target name="-pre-compile" depends="-module-setup"/>
  8. From NetBeans, build the project. It may be advantageous to turn off the checkbox "Build Projects on Classpath" in the "Project Properties" / "Libraries" tab first as you may not want to build dependent projects at this time.
  9. In NetBeans, select the project folder, and open the "Project Properties" dialog. In the "Sources" tab, add as "Source Package Folder" the newly generated (from the previous invocation of the build) folder build/module-generated.
  10. From NetBeans, rebuild the project.
  11. Add the project to your command-line build, if you use one. Consider the recommended source tree layout in order to use InfoGrid's build facilities.

See also:

Last modified 9 years ago Last modified on 01/19/10 05:50:15