2. MathletFactory Library Extensions

See Library Extensions in the MathletFactory manual for more information on how to extend the MathletFactory with own classes.

Creating a new Library Extension

The first step in creating a new extension is to choose a name for the extension in the following format mf_extension_<name> (e.g. "mf_extension_my-extension"). This name will be used to reference the package in MIAU. In the following text, the full package name will be expressed with "<extension_name>".

  1. Create a new Mumie package (File->New->Package), select "system" package, and for Package name enter <extension_name>.
  2. Create the following folders (paths are relative to this package):
    • <extension_name>/src
    • <extension_name>/src/java/mf-lib_<name> (e.g. "mf-lib_my-extension")
    • <extension_name>/checkin/system/libraries
    • <extension_name>/tools
  3. Copy the following files into their corresponding folders into the package:
  4. Open the package.xml file and replace the empty <configuration/> node with the following contents:
            <package name="mathletfactory_lib"/>
        <configuration sourceProject="true" javaProject="true" javaSourcePath="src/java">
            <classpath />
            <buildFile location="tools/build.xml">
                <target name="build.extension"/>
                <target name="sign.extension"/>
                <target name="copy.extension.miau"/>
                <property name="signjar.alias" value="$SIGNJAR.ALIAS$"/>
                <property name="signjar.storepass" value="$SIGNJAR.STOREPASS$"/>
                <property name="signjar.keystore" value="$SIGNJAR.KEYSTORE$"/>
  5. Open the tools/build.properties file and edit the values for the properties extension.package.name and extension.content.jar (see comments in this file for more information about these values).
  6. Rename the meta info file <extension_name>/checkin/system/libraries/jar_mathletfactory_my-extension.meta.xml to match the value you just entered for extension.content.jar in step 5. These 2 files must only differ in their file endings (e.g. jar_mathletfactory_my-extension.content.jar and jar_mathletfactory_my-extension.meta.xml). At last, enter your personal information in the meta info file.

The Java sources can now be put into the src/java folder, which will be the source root for this extension package.
The property file for this extension must be put into the folder <extension_name>/src/java/<extension_name>.

Compiling Extensions

See Compiling System Packages.

build.xml Magnifier (2.92 KB) Marek Grudzinski, 04/07/2013 11:44 AM

build.properties Magnifier (778 Bytes) Marek Grudzinski, 04/07/2013 11:44 AM

jar_mathletfactory_my-extension.meta.xml Magnifier (1.18 KB) Marek Grudzinski, 04/07/2013 11:44 AM

Add picture from clipboard (Maximum size: 500 MB)