# Creating a jMonkeyEngine SDK plugin

Note that the creation of a Module Suite is only necessary if you want to upload your plugin to the contribution update center.

### Using jMonkeyEngine SDK for development (preferred)

- Install the "Netbeans Plugin Development", "NetBeans API Documentation" and "GUI Builder" plugins via Tools→Plugins
- Create a new "Module Suite" project (can be any name, this will be your local "collection" of plugins that you create)
- Open the suite, right-click the "Modules" folder and select "Add new.."
- For "Project Name" enter an all-lowercase name without spaces like `my-library`
- Make sure the "Project Location" is inside the module suite folder and press "Next"
- Enter the base java package for your plugin in "Code Name Base" like `com.mycompany.plugins.mylibrary`
- Enter a "Module Display Name" for your plugin like "My Library"
- Check the "Generate XML Layer" checkbox
- Press Finish
- To use core SDK or jME3 functions, add "jMonkeyPlatfom Core" and "jMonkeyEngine SDK Core jME3" via "Module Properties→Library→Add Dependency"
- Write your plugin

### Using NetBeans for development

- Download the jMonkeyEngine SDK source from svn, then open and compile the project
- Create a new "Module Suite" project (can be any name, this will be your local "collection" of plugins that you create)
- In the Suites Properties, under "Libraries", press "Add Project" and select the jMonkeyEngine SDK project folder.
- Open the suite, right-click the "Modules" folder and select "Add new.."
- For "Project Name" enter an all-lowercase name for your plugin without spaces like `my-library`
- Make sure the "Project Location" is inside the module suite folder and press "Next"
- Enter the base java package for your plugin in "Code Name Base" like `com.mycompany.plugins.mylibrary`
- Enter a "Module Display Name" for your plugin like "My Library"
- Check the "Generate XML Layer" checkbox
- Press Finish
- To use core SDK or jME3 functions, add "jMonkeyPlatfom Core" and "jMonkeyEngine SDK Core jME3" via "Module Properties→Library→Add Dependency"
- Write your plugin

### jMonkeyEngine SDK Contributions Update Center

If you want your plugin to appear in the "jMonkeyEngine SDK Contributions Update Center" so users can download, install and update it easily via the plugin manager, you can host your plugin in the contributions update center svn repository. The contributions update center is based on a googlecode project for contributed plugins which will be automatically compiled, version-labeled and added to the contributions update center like the core jMonkeyEngine SDK plugins.

To add your plugin to the repository, do the following:

- Make sure the plugin is part of a "Module Suite" and that its located in the folder of the suite (this saves you from problems with the svn and local version not being configured the same)
- In "Module Properties→Sources" set the "Source Level" to 1.5 if possible (jMonkeyEngine SDK is compatible to Java 1.5)
- In "Module Properties→API Versioning" set a specification version for your plugin (like 0.8.1)
- Set the "implementation version" to "0" and select "append implementation versions automatically"
- Ask the managers or developers for access to the gc project
- Commit only the module project to trunk:
  - Right click the Plugin Project and select "Versioning → Import into Subversion Repository"
  - Enter `
    ` in the URL field
  - Enter your googlecode username and commit password (different than login pass!) and press "Next"
  - Check that the "Repository Folder" is `trunk/mypluginfolder` and enter an import message
  - Press "Finish"

And thats it, from now on each time you commit changes to your module it will be built and added to the contributions center automatically and the version number will be extended by the svn revision number (e.g. 0.8.1.1234)

view online version