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:
- Pick an identifier for the StandardModule, such as com.example.mygreatapp.
- Create a new NetBeans project with that name (com.example.mygreatapp). Consider the recommended source tree layout.
- In NetBeans' "Files" view, create a new directory called infogrid-moduleads at the root level of the new project.
- 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.
- 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.
- In NetBeans, select the project folder, and open the "Project Properties" dialog. In the "Libraries" tab, add the required compile-time libraries. These are:
- 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"/> </project>
- 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.
- 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.
- From NetBeans, rebuild the project.
- 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.