Skip to content

Latest commit

 

History

History
115 lines (67 loc) · 6.21 KB

how_to_add_a_plugin_or_feature_to_an_existing_project.adoc

File metadata and controls

115 lines (67 loc) · 6.21 KB

How to add a new plugin or feature to an existing JBoss Tools 4.x project

IMPORTANT PREREQUISITES

  1. First, read these documents to learn how to build JBoss Tools project(s) locally:

  2. Before adding a complete new feature to JBoss Tools announce the addition on jbosstools-dev@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.

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

  4. If your new feature needs to be in BOTH offerings, please be sure to explain WHY when contacting the above mailing list.

Add a new plugin or feature to your project’s maven reactor

Now that you can build the project, you can easily add a new plugin to that project. Here’s how.

  1. 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., JDK7 or JDK8).

  2. When you are satisfied, you can commit your new plugin project to Git.

    cd ~/jbosstools/jbosstools-YOURPROJECT/as/plugins; \
    git add org.jboss.ide.eclipse.as.rse.core; \
    git commit -m "JBIDE-123456 Initial commit of new as.rse.core plugin"
  3. 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.

  1. Build your plugin:

    cd ~/jbosstools/jbosstools-YOURPROJECT/as/plugins/org.jboss.ide.eclipse.as.rse.core; \
    mvn clean verify
  2. If your project’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:

    cd ~/jbosstools/jbosstools-YOURPROJECT/as/plugins; \
    git add pom.xml
  3. 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.

    cd ~/jbosstools/jbosstools-YOURPROJECT/as/features; \
    vim org.jboss.ide.eclipse.as.feature/feature.xml
  4. 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.

    git add org.jboss.ide.eclipse.as.new.feature
    git ci -m "JBIDE-123456 Initial commit of new as.new feature" org.jboss.ide.eclipse.as.new.feature
  5. If your project’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:

    cd ~/jbosstools/jbosstools-YOURPROJECT/as/features; \
    vim /features/pom.xml

Add a new plugin or feature to your update site

  1. Ensure that the feature appears in your project’s update site:

    vi ~/jbosstools/jbosstools-YOURPROJECT/site/category.xml # (the project's update site)

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 Devstudio 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 ~/jbosstools/jbosstools-YOURPROJECT/; mvn clean verify;
# then point Eclipse at ~/jbosstools/jbosstools-YOURPROJECT/site/target/repository/ to install the feature

Add a new plugin or feature to JBoss Tools

  1. Ensure that the feature appears in all appropriate JBoss Tools update sites:

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

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 Devstudio 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 ~/jbosstools/jbosstools-build-site/aggregate/site; mvn clean verify
# then point Eclipse at ~/jbosstools/jbosstools-build-site/aggregate/site/target/repository/
cd ~/jbosstools/jbosstools-build-site/aggregate/coretests-site; mvn clean verify
# then point Eclipse at ~/jbosstools/jbosstools-build-site/aggregate/coretests-site/target/repository/

Add a new plugin or feature to JBoss Developer Studio

  1. Ensure that the feature appears in all appropriate JBoss Developer Studio update site:

    vi ~/jbosstools/jbdevstudio-product/site/category.xml
    # (the JBoss Developer Studio aggregate update site)
  2. If you added a new feature, be sure that the feature is included in the Devstudio feature (or wrapped inside another feature) so that it will appear in the installer.

    vi ~/jbosstools/jbdevstudio-product/features/com.jboss.devstudio.core.rpm.feature/feature.xml

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 Devstudio 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 ~/jbosstools/jbdevstudio-product; mvn clean verify
# then point Devstudio at ~/jbosstools/jbdevstudio-product/site/target/repository/