| 1234567891011121314151617181920212223242526 |
- <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="Asciidoctor 1.5.4"><title>Creating a jMonkeyEngine SDK plugin</title><link rel="stylesheet" href="./asciidoctor.css">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
- <link rel="stylesheet" href="./coderay-asciidoctor.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css"></head><body class="article toc2 toc-left"><div id="header"><div id="toolbar"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/src/docs/asciidoc/sdk/development/setup.adoc"><i class="fa fa-pencil-square" aria-hidden="true"></i></a><a href="https://github.com/jMonkeyEngine/wiki/new/master/src/docs/asciidoc/sdk/development/"><i class="fa fa-plus-square" aria-hidden="true"></i></a><input dir="auto" style="position: relative; vertical-align: top;" spellcheck="false" autocomplete="off" class="searchbox__input aa-input" id="doc-search" name="search" placeholder="Search in the doc" required="required" type="search"></div><h1>Creating a jMonkeyEngine SDK plugin</h1><div class="details"><span class="author" id="author"></span><br><span id="revnumber">version ,</span> <span id="revdate">2016/03/17 20:48</span></div><div id="toc" class="toc2"><div id="toctitle">Table of Contents</div><ul class="sectlevel1"><li><a href="#using-jmonkeyengine-sdk-for-development">Using jMonkeyEngine SDK for development</a></li><li><a href="#jmonkeyengine-sdk-contributions-update-center">jMonkeyEngine SDK Contributions Update Center</a><ul class="sectlevel2"><li><a href="#adding-your-plugin-to-the-repository">Adding your plugin to the repository</a></li><li><a href="#building-wrapped-library-jar-files-on-the-server">Building wrapped library jar files on the server</a></li></ul></li></ul></div></div><div id="content"><div id="preamble"><div class="sectionbody"><div class="paragraph"><p>Note that the creation of a Module Suite is only necessary if you want to upload your plugin to the contribution update center.</p></div></div></div>
- <div class="sect1"><h2 id="using-jmonkeyengine-sdk-for-development">Using jMonkeyEngine SDK for development</h2><div class="sectionbody"><div class="ulist"><ul><li><p>Install the “Netbeans Plugin Development and “NetBeans <abbr title="Application Programming Interface">API</abbr> Documentation plugins via Tools→Plugins</p></li><li><p>Create a new “Module Suite project (can be any name, this will be your local “collection of plugins that you create)</p></li><li><p>If no platform is listed, add one by selecting the SDK application folder</p><div class="ulist"><ul><li><p>Mac users have to right-click the jmonkeyplatform application and select “show contents and then select the jmonkeyplatform folder under Contents/Resources/</p></li></ul></div></li><li><p>Open the suite, right-click the “Modules folder and select “Add new..</p></li><li><p>For “Project Name enter an all-lowercase name without spaces like <code>my-library</code></p></li><li><p>Make sure the “Project Location is inside the module suite folder and press “Next</p></li><li><p>Enter the base java package for your plugin in “Code Name Base like <code>com.mycompany.plugins.mylibrary</code></p></li><li><p>Enter a “Module Display Name for your plugin like “My Library</p></li><li><p>Press Finish</p></li><li><p>To use core SDK or jME3 functions, add “SDK Core and “SDK Engine via “Module Properties→Library→Add Dependency</p></li><li><p>Write your plugin (e.g. <a href="../../sdk/development.html">create a new editor</a> or <a href="../../sdk/development/extension_library.html">wrap a jar library</a>)</p></li></ul></div></div></div>
- <div class="sect2"><h3 id="jmonkeyengine-sdk-contributions-update-center">jMonkeyEngine SDK Contributions Update Center</h3><div class="paragraph"><p>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.</p></div>
- <div class="paragraph"><p>Effectively its one large module suite with multiple modules which each represent one plugin, extension library.</p></div>
- <div class="sect2"><h3 id="adding-your-plugin-to-the-repository">Adding your plugin to the repository</h3><div class="paragraph"><p>To add your plugin to the repository, do the following:</p></div>
- <div class="ulist"><ul><li><p>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)</p></li><li><p>In “Module Properties→Sources</p><div class="ulist"><ul><li><p>Set the “Source Level to 1.5 if possible (jMonkeyEngine SDK is compatible to Java 1.5)</p></li></ul></div></li><li><p>In “Module Properties→<abbr title="Application Programming Interface">API</abbr> Versioning</p><div class="ulist"><ul><li><p>Set a specification version for your plugin (like 0.8.1)</p></li><li><p>Set the “implementation version to “0 and select “append implementation versions automatically</p></li></ul></div></li><li><p>In “Module Properties→Display</p><div class="ulist"><ul><li><p>Enter a purposeful description of your plugin and one of the following categories:</p><div class="ulist"><ul><li><p>For a library plugin: “jME3 - Library</p></li><li><p>For a SDK plugin: “jME3 - SDK Plugin</p></li><li><p>For a model loader plugin: “jME3 - Loader</p></li></ul></div></li></ul></div></li><li><p>In “Module Properties→Build→Packaging</p><div class="ulist"><ul><li><p>Add your name</p></li><li><p>Add a link to your forum post / home page relating to the plugin</p></li><li><p>Add a license, you can use <code>../license-jme.txt</code> to insert the default jME BSD license or use a text file you store in the project folder</p></li></ul></div></li><li><p>Ask the managers or developers for access to the gc project</p></li><li><p>Commit <strong>only the module project</strong> to trunk:</p><div class="ulist"><ul><li><p>Right click the Module Project and select “Versioning → Import into Subversion Repository</p></li><li><p>Enter <code><a href="https://jmonkeyplatform-contributions.googlecode.com/svn/trunk">https://jmonkeyplatform-contributions.googlecode.com/svn/trunk</a></code> in the <abbr title="Uniform Resource Locator">URL</abbr> field</p></li><li><p>Enter your googlecode username and commit password (different than login pass, you can find your password <a href="https://code.google.com/hosting/settings">here</a>!) and press “Next</p></li><li><p>Check that the “Repository Folder is <code>trunk/mypluginfolder</code> and enter an import message</p></li><li><p>Press “Finish</p></li></ul></div></li></ul></div>
- <div class="paragraph"><p>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)</p></div></div>
- <div class="sect2"><h3 id="building-wrapped-library-jar-files-on-the-server">Building wrapped library jar files on the server</h3><div class="paragraph"><p>You can just build your library locally and update and commit the jar file and javadoc/sources zip files to the <code>release/libs</code> folder of your plugin in the contrib repo. The users plugins will automatically be updated with the new jar files. You can however also build the library project on the server.</p></div>
- <div class="paragraph"><p>As normally only the module project is being built on the server, any projects that create the actual jar files for library plugins (“normal projects from the SDK/NetBeans) have to be built from the module build file. To do that simply add the following ant targets to the module build file (adapt to your project file and folder names):</p></div>
- <div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code data-lang="xml"><span class="tag"><target</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">"</span><span class="content">init</span><span class="delimiter">"</span></span> <span class="attribute-name">depends</span>=<span class="string"><span class="delimiter">"</span><span class="content">basic-init,files-init,build-init,-javac-init,-build-subproject</span><span class="delimiter">"</span></span><span class="tag">/></span>
- <span class="tag"><target</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">"</span><span class="content">-build-subproject</span><span class="delimiter">"</span></span><span class="tag">></span>
- <span class="tag"><ant</span> <span class="attribute-name">dir</span>=<span class="string"><span class="delimiter">"</span><span class="content">./AI</span><span class="delimiter">"</span></span> <span class="attribute-name">inheritall</span>=<span class="string"><span class="delimiter">"</span><span class="content">false</span><span class="delimiter">"</span></span> <span class="attribute-name">inheritrefs</span>=<span class="string"><span class="delimiter">"</span><span class="content">false</span><span class="delimiter">"</span></span> <span class="attribute-name">target</span>=<span class="string"><span class="delimiter">"</span><span class="content">clean</span><span class="delimiter">"</span></span><span class="tag">/></span>
- <span class="tag"><ant</span> <span class="attribute-name">dir</span>=<span class="string"><span class="delimiter">"</span><span class="content">./AI</span><span class="delimiter">"</span></span> <span class="attribute-name">inheritall</span>=<span class="string"><span class="delimiter">"</span><span class="content">false</span><span class="delimiter">"</span></span> <span class="attribute-name">inheritrefs</span>=<span class="string"><span class="delimiter">"</span><span class="content">false</span><span class="delimiter">"</span></span> <span class="attribute-name">target</span>=<span class="string"><span class="delimiter">"</span><span class="content">jar</span><span class="delimiter">"</span></span><span class="tag">/></span>
- <span class="tag"><ant</span> <span class="attribute-name">dir</span>=<span class="string"><span class="delimiter">"</span><span class="content">./AI</span><span class="delimiter">"</span></span> <span class="attribute-name">inheritall</span>=<span class="string"><span class="delimiter">"</span><span class="content">false</span><span class="delimiter">"</span></span> <span class="attribute-name">inheritrefs</span>=<span class="string"><span class="delimiter">"</span><span class="content">false</span><span class="delimiter">"</span></span> <span class="attribute-name">target</span>=<span class="string"><span class="delimiter">"</span><span class="content">javadoc</span><span class="delimiter">"</span></span><span class="tag">/></span>
- <span class="tag"><zip</span> <span class="attribute-name">basedir</span>=<span class="string"><span class="delimiter">"</span><span class="content">./AI/dist/javadoc</span><span class="delimiter">"</span></span> <span class="attribute-name">file</span>=<span class="string"><span class="delimiter">"</span><span class="content">release/libs/jME3-ai-javadoc.zip</span><span class="delimiter">"</span></span><span class="tag">/></span>
- <span class="tag"><zip</span> <span class="attribute-name">basedir</span>=<span class="string"><span class="delimiter">"</span><span class="content">./AI/src</span><span class="delimiter">"</span></span> <span class="attribute-name">file</span>=<span class="string"><span class="delimiter">"</span><span class="content">release/libs/jME3-ai-sources.zip</span><span class="delimiter">"</span></span><span class="tag">/></span>
- <span class="tag"><copy</span> <span class="attribute-name">file</span>=<span class="string"><span class="delimiter">"</span><span class="content">./AI/dist/jME3-ai.jar</span><span class="delimiter">"</span></span> <span class="attribute-name">todir</span>=<span class="string"><span class="delimiter">"</span><span class="content">release/libs</span><span class="delimiter">"</span></span><span class="tag">/></span>
- <span class="tag"></target></span></code></pre></div></div>
- <div class="paragraph"><p><strong>Note that for the module version number to increase automatically on a commit to the library project, the library project has to be a subfolder of the main module project.</strong></p></div></div></div></div><div id="footer"><div id="footer-text">Version <br>Last updated 2018-01-15 05:30:44 +00:00</div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script><script>docsearch({
- apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
- indexName: 'jmonkeyengine',
- inputSelector: '#doc-search',
- debug: false // Set debug to true if you want to inspect the dropdown
- });</script></body></html>
|