[jboss-dev-forums] [JBoss Tools Development] - Adding a Plugin (and/or Feature) To An Existing Component

Rob Stryker do-not-reply at jboss.com
Thu Aug 23 04:39:28 EDT 2012


Rob Stryker [https://community.jboss.org/people/rob.stryker] modified the document:

"Adding a Plugin (and/or Feature) To An Existing Component"

To view the document, visit: https://community.jboss.org/docs/DOC-18373

--------------------------------------------------------------
+First, read this document on how to build JBoss Tools components locally:  https://community.jboss.org/docs/DOC-16604 https://community.jboss.org/wiki/HowtoBuildJBossToolswithMaven3+


| *+Before adding a complete new feature to JBoss Tools announce the addition on  jbosstools-dev <jbosstools-dev at lists.jboss.org >  with reasons WHY+* *+a new feature is needed and what new (if any) dependencies it will bring in. New dependencies need to be added to the target platforms, and thus should be reported in JIRA for tracking and task assignment purposes.+* 

*+Note too that new features will often start in+ JBoss Tools +but NOT be included in+ JBoss Developer Studio +until they have had time to mature. If your new feature needs to be in both offerings, please be sure to explain WHY when contacting the above mailing list.+* |


h2. Adding a new plugin or feature to JBoss Tools 
Now that you can build your component, you can easily add a new plugin to that component. Here's how.

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).

1. When you are satisfied, you can commit your new plugin project to SVN.

 cd ~/trunk/as/plugins; \
 svn add org.jboss.ide.eclipse.as.rse.core; \
 svn ci -m "JBIDE-123456 Initial commit of new as.rse.core plugin" org.jboss.ide.eclipse.as.rse.core

2. Next, add a pom.xml file to the root of your new project.

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.

3. Build your plugin:

 cd ~/trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core; \
 mvn3 clean install


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:

 vi ~/trunk/as/plugins/pom.xml

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.

 vi ~/trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml

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.

 svn add org.jboss.ide.eclipse.as.new.feature; \
 svn ci -m "JBIDE-123456 Initial commit of new as.new feature" org.jboss.ide.eclipse.as.new.feature

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:

 vi ~/trunk/as/features/pom.xml

h3. Verifying your new feature/plugin can be built and installed:

8. Next, ensure that the feature appears in all appropriate JBoss Tools update sites:

 vi ~/trunk/as/site/category.xml # (the component's update site)
+
+
+     and one of the following+

 vi ~/trunk/build/aggregate/site/site.xml # (the JBoss Tools aggregate update site)
 vi ~/trunk/build/aggregate/coretests-site/site.xml # (the JBoss Tools aggregate update site for test plugins)

+
+
+     or one of these two sites:+

 vi ~/trunk/build/aggregate/soa-site/site/site.xml # (the JBoss Tools aggregate update site for SOA Tooling)
 vi ~/trunk/build/aggregate/soatests-site/site/site.xml # (the JBoss Tools aggregate update site for SOA Tooling test plugins)

+   Note: for *AS, and any DEPENDENCIES of AS,* you MAY want to add your new feature to this site too, if and only if astools makes use of that plugin / feature:+

 vi ~/trunk/build/aggregate/webtools-site/site.xml # (the JBoss Tools aggregate update site for WTP adapters)

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.)

 cd ~/trunk/as/; mvn clean install; # then point Eclipse at ~/trunk/as/site/target/repository/
+     and+
 cd ~/trunk/build/aggregate/site; mvn clean install; # then point Eclipse at ~/trunk/build/aggregate/site/target/site/
h2. 
h2. Adding a new plugin or feature to JBoss Developer Studio
10. Next, ensure that the feature appears in all appropriate JBoss Developer Studio update site:

 vi ~/devstudio/trunk/product/site/site.xml # (the JBoss Developer Studio aggregate update site)
 vi ~/devstudio/trunk/product-soa/site/site.xml # (the JBoss Developer Studio aggregate update site for SOA Tooling)

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.

 vi ~/devstudio/trunk/product/features/com.jboss.jbds.product.feature/feature.xml
h3. 
h3. Verifying your new feature/plugin can be built and installed:

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.)
*  
*
 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/ (search for "Branded Product" feature, *com.jboss.jbds.all*)*
+     or+
 cd ~/devstudio/trunk/product-soa; mvn clean install; # then point JBDS at ~/devstudio/trunk/product-soa/site/target/site/

+* - The product site in ~/devstudio/trunk/product/site/target/site/ does not contain the "Branded Product" feature, *com.jboss.jbds.all*, so you cannot use that site to update an existing JBDS install, only an Eclipse install.+
--------------------------------------------------------------

Comment by going to Community
[https://community.jboss.org/docs/DOC-18373]

Create a new document in JBoss Tools Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2129]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120823/1f2c0363/attachment.html 


More information about the jboss-dev-forums mailing list