This page describes how you can wrap any jar library into a plugin that a jMP user can download, install and then use the contained library in his own game projects.
Creating the plugin project (in jMP):
Create a new Module Suite (or use an existing one)
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
Adding the library:
Right click the Module Project and select "New→Other"
Under "Module Development" select the "Java SE Library Descriptor" template and press "Next"
If you dont have the external library registered in jMP yet, click "Manage Libraries" and do the following:
Click "New Library", enter a name for the library and press OK
In the "Classpath" tab, press "Add JAR/Folder" and select the jar file(s) needed for the library
In the "JavaDoc" tab, press "Add ZIP/Folder" and add the javadoc for the library (zipped or folder)
In the "Sources" tab you can add a folder or jar file containing the source files of the library if available
Press OK
Select the external library from the list and press "Next"
Enter a name for the Library (used as filename for the description file)
Enter a display name for the Library (This is the name the user later sees in his library list)
Press OK
You will notice a new file "MyLibrary.xml" is created in the plugins base package and linked to in the layer.xml file. This is basically it, you can configure a version number, license file (should be placed in Module root folder) and more via the Module Properties.
After you are done, you can contribute the plugin in the jMP contribution update center.