<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Adding a Plugin (and/or Feature) To An Existing Component
</h3>
<span style="margin-bottom: 10px;">
    modified by <a href="https://community.jboss.org/people/nickboldt">Nick Boldt</a> in <i>JBoss Tools Development</i> - <a href="https://community.jboss.org/docs/DOC-18373">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p><em><span>First, read this document on how to build JBoss Tools components locally: </span><a class="jive-link-wiki-small" href="https://community.jboss.org/docs/DOC-16604" target="_blank">https://community.jboss.org/wiki/HowtoBuildJBossToolswithMaven3</a></em></p><h2>Adding a new plugin or feature to JBoss Tools </h2><p>Now that you can build your component, you can easily add a new plugin to that component. Here's how.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>0. Make sure your new plugin compiles in your workspace. Ensure your MANIFEST.MF contains all references/includes/requirements you need. Be sure to set the correct Bundle-RequireExecutionEnvironment (eg., JDK5 or JDK6).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>1. When you are satisfied, you can commit your new plugin project to SVN.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"><p> cd ~/trunk/as/plugins; \</p><p> svn add org.jboss.ide.eclipse.as.rse.core; \</p><p> svn ci -m "JBIDE-123456 Initial commit of new as.rse.core plugin" org.jboss.ide.eclipse.as.rse.core</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>2. Next, add a pom.xml file to the root of your new project.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>You can use m2eclipse to help w/ this if you have it installed; otherwise copy from another existing plugin project and edit appropriately. The version of the pom should match the version in the manifest.mf. Note that 3.2.0.qualifier (in MANIFEST.MF) is equivalent to 3.2.0-SNAPSHOT in the pom.xml.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>3. Build your plugin:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"> cd ~/trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core; \<br/> mvn3 clean install<br/></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>4. If your component's new plugin builds successfully, you can commit the pom.xml file, and add a reference to the new plugin (module) in the container pom:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"> vi ~/trunk/as/plugins/pom.xml</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>5. To ensure that your plugin is available on the update site, be sure that it is contained in at least one feature's feature.xml.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"> vi ~/trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>6. If necessary, create a new feature to contain the new plugin - easiest approach is to copy an existing feature project, and string-replace the various files until it suits your needs. Don't forget to update .project and other hidden files.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"><p> svn add org.jboss.ide.eclipse.as.new.feature; \</p><p> svn ci -m "JBIDE-123456 Initial commit of new as.new feature" org.jboss.ide.eclipse.as.new.feature</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>7. If your component's new feature builds successfully, you can commit the pom.xml file, and add a reference to the new plugin (module) in the container pom:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"> vi ~/trunk/as/features/pom.xml</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>8. Next, ensure that the feature appears in all appropriate JBoss Tools update sites:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"><p> vi ~/trunk/as/site/category.xml # (the component's update site)</p><p> vi ~/trunk/build/aggregate/site/site.xml # (the JBoss Tools aggregate update site)</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>9. Finally, build the sites locally to ensure the XML is valid and the contents appear correctly. You can then install the new feature from the sites into Eclipse or JBDS to verify it runs as expected (no missing dependencies which prevent the plugin from being activated, no missing metadata such as description, provider, license or copyright while installing, etc.)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"> cd ~/trunk/as/; mvn clean install; # then point Eclipse at ~/trunk/as/site/target/repository/<br/><em>&#160; and</em><br/> cd ~/trunk/build/aggregate/site; mvn clean install; # then point Eclipse at ~/trunk/build/aggregate/site/target/site/</pre><h2></h2><h2>Adding a new plugin or feature to JBoss Developer Studio </h2><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>10. Next, ensure that the feature appears in all appropriate JBoss Developer Studio update site:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"><p> vi ~/devstudio/trunk/product/site/site.xml # (the JBoss Developer Studio aggregate update site)</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>11. If you added a new feature, be sure that the feature is included in the JBDS feature (or wrapped inside another feature) so that it will appear in the installer.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"><p> vi ~/devstudio/trunk/product/features/com.jboss.jbds.product.feature/feature.xml</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>12. Finally, build the sites locally to ensure the XML is valid and the contents appear correctly. You can then install the new feature from the sites into Eclipse or JBDS to verify it runs as expected (no missing dependencies which prevent the plugin from being activated, no missing metadata such as description, provider, license or copyright while installing, etc.)</p><p><strong>&#160; <br/></strong></p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"> cd ~/devstudio/trunk/product; mvn clean install; # then point <strong>Eclipse</strong> at ~/devstudio/trunk/product/site/target/site/ -- you won't be able to update JBDS using this site<p><em>&#160; and</em></p><p> cd ~/devstudio/trunk/product; mvn clean install -f pom-site-and-product.xml; # then point JBDS at ~/devstudio/trunk/product/features/com.jboss.jbds/target/repository/ and update the "Branded Product" feature, com.jboss.jbds.all</p></pre></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="https://community.jboss.org/docs/DOC-18373">going to Community</a></p>

        <p style="margin: 0;">Create a new document in JBoss Tools Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2129">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>