Plugin Framework 2.2 Release Notes

19 March 2009

Current released version
Atlassian Plugin Framework 2.4.3 is now available — see the Plugin Framework 2.4.3 Release Notes.

With pleasure, Atlassian presents the Atlassian Plugin Framework 2.2.

This release provides the framework for several new Atlassian projects currently under development, such as a unified plugin manager and features to be incorporated into the Atlassian gadgets and dashboards.

The Atlassian Plugin Framework 2.2 supports dynamic plugins for non-dynamic module descriptors. This means that future releases of the Atlassian applications can support dynamic plugin installation, without requiring a restart of the application.

Plugins can now specify that individual modules apply to a particular application. For example, a single plugin may define a web item for JIRA and a different web item for Confluence.

Performance improvements in the Atlassian Plugin Framework 2.2 will reduce the time an application takes to start. Other improvements speed up plugin development. Enhanced validation of module descriptors and clearer error messages will make a plugin developer's life easier.

The Atlassian Plugin Framework 2.2 supports batching of web resources, so that multiple plugin web resources can be served in one request. This release also brings improvements in the export of packages.

Highlights of this Release:

Haven't used the Atlassian Plugin Framework 2 yet?
Take a look at the development platform documentation and the Plugin Framework documentation.

Comments, Requests and Feedback
We would love your feedback. Please log your requests, bug reports and comments in our issue tracker.

Highlights of the Atlassian Plugin Framework 2.2

Framework for New Atlassian Development

The Atlassian Plugin Framework 2.2 provides new features and improvements required by several Atlassian projects currently under development. While the plugins described below are not yet available, the Atlassian Plugin Framework is now ready to support them.

  • Unified Plugin Manager plugin — Still in the planning stage, the UPM will enable uniform management of plugins across Atlassian applications. It will interact with the new plugin repository also under development.
  • Atlassian Gadgets — Development of a new cross-application dashboard is well under way, based on Google Gadgets and OpenSocial and built with the Atlassian Plugin Framework 2.2. Atlassian Gadgets will allow applications to publish gadgets to each other and display them on dynamic, drag-and-drop dashboards.
  • OAuth plugin — This plugin will support the OAuth authentication protocol, allowing your plugin to accept requests for OAuth authentication from external applications.
  • REST module plugin — Developers will be able to use the REST module type to create plugin points easily in compliant Atlassian applications. The module type allows you to expose services and resources as REST end points. In this way, you can create and use REST end points consistently across Atlassian applications. The plugin also makes it easier to develop cross-application plugins i.e. plugins which work in more than one application.

Dynamic Plugin Support

With this release, the Atlassian Plugin Framework supports dynamic plugins for non-dynamic module descriptors. This allows the Atlassian applications to support dynamic plugin installation, without requiring a restart of the application.

Confluence already supports dynamic plugin loading. Other applications such as JIRA will support it future releases.

Application-Specific Modules

Cross-application plugins can now contain modules that are only enabled for specific applications. Adding the application attribute to a module descriptor in atlassian-plugin.xml will ensure that it is only enabled for the particular application that it works with. Module descriptors without an application attribute are loaded in all applications. This allows you to write cross-application plugins, sharing common Java code, that can be deployed correctly onto multiple applications.

For example, you might have a servlet plugin with individual web items for each potential application.

<atlassian-plugin name="Hello World Plugin" key="example.plugin.helloworld" pluginsVersion="2">
<plugin-info>
<description>A basic web item module test</description>
<vendor name="Atlassian Software Systems" url="http://www.atlassian.com"/>
<version>1.0</version>
</plugin-info>

<web-item key="google_home" name="Google Home" section="system.user/example1" weight="10" application="confluence">
<description key="item.google.home.desc">Simple link to google.com.</description>
<label key="item.google.home.label" />
<link linkId="google_home">http://google.com</link>
</web-item>

<web-item key="google_home" name="Google Home" section="system.user.navigation.bar/example1" weight="10" application="jira">
<description key="item.google.home.desc">Simple link to google.com.</description>
<label key="item.google.home.label" />
<link linkId="google_home">http://google.com</link>
</web-item>

<servlet name="Hello World Servlet" key="helloWorld" class="com.example.myplugins.helloworld.HelloWorldServlet">
<description>Says Hello World, Australia or your name.</description>
<url-pattern>/helloworld</url-pattern>
<init-param>
<param-name>defaultName</param-name>
<param-value>Australia</param-value>
</init-param>
</servlet> 
</atlassian-plugin>

Shared Access Layer (SAL) 2.0

Version 2.2 of the Atlassian Plugin Framework supports Shared Access Layer (SAL) 2.0. This release of SAL provides an API to retrieve the current user's locale, other internationalisation improvements, user authentication via OAuth and fixes as shown in the SAL 2.0 Release Notes.

Faster Startup Time

Performance improvements in the Atlassian Plugin Framework 2.2 will reduce the time an application takes to start.

  • Optimised package scanning.
  • Caching of transformed plugins.
  • Bypassing of Spring for host component references.

Batching of Web Resources

The Atlassian Plugin Framework now supports batching of web resources, so that multiple plugin web resources can be served in one request. It is now possible to have your web-resource modules served either as individual files (as before) or combined into a single batch containing all of the CSS or JavaScript files together. Batching reduces the number of HTTP requests that web browsers need to make to load a web page. This is one of the easiest ways to speed things up for users.

Here is an example atlassian-plugin.xml file containing two resources:

<atlassian-plugin name="Hello World Resource" key="example.plugin.helloworld" pluginsVersion="2">
<plugin-info>
<description>A basic web resource module test</description>
<vendor name="Atlassian Software Systems" url="http://www.atlassian.com"/>
<version>1.0</version>
</plugin-info>

<web-resource key="my-resources" name="My Plugin Resources" >
<resource type="download" name="scriptaculous.js" location="myplugin/js/scriptaculous.js" />
<resource type="download" name="effects.js" location="myplugin/js/effects.js" />
</web-resource>
</atlassian-plugin>

Previously, the framework would have served the resources individually as two separate requests:

http://localhost:8080/confluence/download/resources/mypluginkey:my-resources/scriptaculous.js
http://localhost:8080/confluence/download/resources/mypluginkey:my-resources/effects.js

With batching, the framework will serve the resources together in one request:

http://localhost:8080/confluence/download/batch/js/mypluginkey:my-resources/BATCHNAME.js

Note that in most cases you do not need to change your existing plugins' XML descriptors to enable batching. In the above example, the atlassian-plugin.xml file remains unchanged.

Handy tips:

  • If you have defined a source parameter in the atlassian-plugin.xml, you may need to make a change. Web resources are not batched if the source parameter in the atlassian-plugin.xml is set to webContext. Such web resources include both static and dynamic resources. For static resources, we recommend that you update the source parameter to webContextStatic.
  • You can turn off batching application-wide for debugging purposes via a system property: plugin.webresource.batching.off=true
  • To turn off batching of individual web resources, set the new batch parameter to false on the web resource in the atlassian-plugin.xml.

Improved Validation and Error Messages

Enhanced validation of module descriptors and clearer error messages make plugin development easier.

  • The plugin framework now has an XML validation library based on ISO Schematron-based, making it easier to validate a module descriptor in atlassian-plugin.xml or any dom4j node.
  • We have improved the error handling, so that the framework will only log warnings if a plugin does not have an explicit Spring context header.
  • The framework issues clearer error messages, such as when a descriptor tries to load classes in the init method.

Improved Package Export Behaviour

Packages from plugins are no longer exported by default. Interfaces from public components are exported automatically, i.e. if a public component is registered under an interface found in the bundle, the plugin framework exports it automatically. This change improves predictability and helps to avoid conflicts between plugins that embed the same libraries. See the problem definition.

If other plugins depend on your plugin and if you do not generate your own manifest, you will need to ensure that the necessary packages are exported.

  • The quick fix is to add the following to your atlassian-plugin.xml:
    <plugin-info>
    ...
    <bundle-instructions>
    <Export-Package>*</Export-Package>
    </bundle-instructions>
    </plugin-info>
    
  • The better solution is to export the necessary packages explicitly. See the <bundle-instructions> element.

Faster Plugin Development

A number of improvements in this release will help to speed up the plugin development process. In addition to the points already mentioned above, here are some more items to delight a jaded developer:

  • With this release, the plugin framework will automatically reload any dependent plugins when the base plugin has been upgraded.
  • Transformed module types like Component, Component Import, and Module Type now have proper module descriptors, so they show up in the UI as expected.
    Disabling these module types currently has no effect. We plan to fix this in a later release, via a unified plugin manager.
  • During plugin development, you can now edit non-Java resource files and refresh your browser to see the changes immediately. The plugin framework allows plugin resources to be loaded from the file system during development. See Instant Loading of Plugin Resources.

Complete List of Fixes in this Release

JIRA Issues (100 issues)
Key Summary Priority Status
PLUG-353 ForwardableResource overrides content type header and sets it to null Major Resolved
PLUG-351 Plugin framework doesn't clean up listeners on shutdown Major Resolved
PLUG-350 State transitions for plugin manager should allow a shutdown when init hasn't been called Major Resolved
PLUG-349 Exceptions upgrading plugins when both loaded at the same time Major Resolved
PLUG-348 Deprecated DefaultPluginManager should still implement PluginManager Major Resolved
PLUG-340 Name comparator on Plugin interface throws NPE if no plugin name found Major Resolved
PLUG-336 Generated host component bean names are not persisted across restarts Blocker Resolved
PLUG-335 Invalid component import xml validation Major Resolved
PLUG-332 WebResourceManagerImpl does not clear request cache after includeResources(Writer) is called Blocker Resolved
PLUG-331 Make DefaultPathMapper use a Set<String> for its complex paths instead of a List<String> Major Resolved
PLUG-330 Plugin key and bundle symbolic names are not the same for OSGi *only* plugins, making the framework throw NullPointerException Major Resolved
PLUG-329 Transformed plugin cache file names should preserve extension Major Resolved
PLUG-328 Scanner should skip files starting in '.' Major Resolved
PLUG-327 Redesign bundled plugin handling to use a delegate plugin Major Resolved
PLUG-324 Exception loading dynamic plugin module should be handled Major Resolved
PLUG-323 Plugin enabling should recursively enable any disabled plugins the plugin requires Major Resolved
PLUG-321 UnloadablePlugins can have an incorrect key causing application startup to fail Major Resolved
PLUG-320 Better error message when a module descriptor tries to load classes in its init() method Major Resolved
PLUG-319 Plugins bundle cache not being updated correctly when upgrading a dependency Critical Resolved
PLUG-316 Exceptions loading static plugins shouldn't bring the system down Major Resolved
PLUG-315 Plugin module that has no key has inconsistent behaviour and error reporting Major Resolved
PLUG-314 Autotranslate version to OSGI version format Major Resolved
PLUG-313 No error message if OSGi plugin deployed with a manifest but no spring context Major Resolved
PLUG-312 Enable plugin wait should match osgi service timeout (60 secs) Major Resolved
PLUG-311 bundle is uninstalled exception when upgrading a bundled plugin Major Resolved
PLUG-310 Debug output should include jars for which package scanner can't determine a version Major Resolved
PLUG-308 Add constructor to default servlet module manager with PathMappers Major Resolved
PLUG-307 Disabling plugins causes ServiceProxyDestroyedExceptions to occur in long-running processes Major Resolved
PLUG-306 Use the host package version for generated package imports with no version Major Resolved
PLUG-305 Registration of event listeners should throw exception if no listener methods found Major Resolved
PLUG-304 Exception in getModule() causes module lists to be empty Major Resolved
PLUG-303 Module descriptors for component, component-import, and module-type Major Resolved
PLUG-300 Dynamic module descriptors should be able to have their components injected Major Resolved
PLUG-299 Detect upgrades and flush osgi caches Major Resolved
PLUG-298 Validation for module descriptors Major Resolved
PLUG-297 DownloadableResource should have an alternative 'serve' method which does not need HttpServlet classes Major Resolved
PLUG-296 The org.dom4j package is NOT exported by the RefImpl Major Resolved
PLUG-295 Scan atlassian-plugin.xml file for classes to add to package imports Major Resolved
PLUG-294 Remove deprecated servlet constructors and descriptors Major Resolved
PLUG-292 OsgiPlugin#autowire should throw exception if plugin not autowireable Major Resolved
PLUG-291 Null application keys shouldn't be allowed Major Resolved
PLUG-290 Upgrade Spring DM to 1.1.3 Major Resolved
PLUG-288 isSingleton on AbstractModuleDescriptor should be removed/deprecated Minor Resolved
PLUG-287 Package imports generated from host components should match exported version exactly Major Resolved
PLUG-286 Find all interfaces on super classes in spring component providers Major Resolved
PLUG-285 When batching turned off, web resources lose parameters Critical Resolved
PLUG-283 Reduce webresource log levels Major Resolved
PLUG-282 If there's a problem resolving module descriptor should disable the plugin with error message Major Resolved
PLUG-281 HostComponentSpringStage adds bogus warning messages to the logs. " Non-jar classpath elements not supported: ." Minor Resolved
PLUG-279 Force bundle symbolic name to match plugin key Major Resolved
PLUG-278 Plugin loading broken on windows Blocker Resolved
PLUG-277 web resources with param cache=false do not get the context path appended Major Resolved
PLUG-276 requireResource(String moduleCompleteKey, Writer writer) should also include dependencies Major Resolved
PLUG-273 Reference implementation tests should use any open port Major Resolved
PLUG-272 IllegalStateException thrown when handling unsuccessful attachment retrieval Trivial Resolved
PLUG-271 Add the legacy dynamic plugin factories to the list of deployer to the new plugin framework configuration API Major Resolved
PLUG-270 Bundled plugins doesn't get updated with latest versions Major Resolved
PLUG-269 Update scm to point to studio.atlassian.com instead of svn.atlassian.com Blocker Resolved
PLUG-267 Enable use of atlassian-bundled-plugin.zip in the reference implementation Major Resolved
PLUG-266 Add ClassPathPlugin loader to the new AtlassianPlugins configuration API Major Resolved
PLUG-264 Change the atlassian version of felix framework to remove contention inside BundleInfo Minor Resolved
PLUG-263 ServiceProxyDestroyed exception when upgrading plugin that other plugins depend on Major Resolved
PLUG-261 Deadlock in atlassian plugins Blocker Resolved
PLUG-259 Automated performance testing Major Resolved
PLUG-255 DefaultWebLink.getRenderedUrl amd DefaultWebLabel.getDisplayableLabel modify the passed in Map rather than making a copy of it Major Resolved
PLUG-253 PluginInformation should not use a float version number Minor Resolved
PLUG-248 NullPointerException if plugin defines a min application-version but no max (or vice versa) Major Resolved
PLUG-245 Restrict scope of member variables of DefaultServletModuleManager Major Resolved
PLUG-244 Better use of generics for ServletModuleDescriptor Major Resolved
PLUG-243 Application-specific module descriptor instances Major Resolved
PLUG-242 Support dynamic plugins for non-dynamic module descriptors Major Resolved
PLUG-241 Automatically export interfaces used in public components Major Resolved
PLUG-240 Review 2.2 migration guide Major Resolved
PLUG-239 Support multiple versions of OSGi bundles Major Resolved
PLUG-238 ConcurrentModificationException can occur when iterating over returned Collection of plugins from DefaultPluginManager Major Resolved
PLUG-237 Using RequestDispatcher.include to include a plugin servlet malfunctions Critical Resolved
PLUG-235 Explicit component-imports of HostedComponents causes failure Major Resolved
PLUG-234 Filesystem-loadable resources during development Major Resolved
PLUG-232 Ref Impl is exposing a null WebResourceManager Blocker Resolved
PLUG-230 Supply Javadoc for WebFragmentHelper to explain contract to implementers Major Resolved
PLUG-220 Hot deployment to main project Major Resolved
PLUG-219 Remove need for subclassing when needing access to the host container Major Resolved
PLUG-218 PluginEnabledEvent not fired when plugins are loaded Major Closed
PLUG-217 NonLockingJarUrlConnection.connect() is slow Major Resolved
PLUG-216 Main facade to simply interactions with Atlassian Plugins Major Resolved
PLUG-215 Deprecate method that takes PluginManager in webresource module Trivial Resolved
PLUG-213 Add jdom to default package includes Major Resolved
PLUG-209 Plugins Reference Implementation does not shut down Felix properly Major Resolved
PLUG-208 Uninstall of a plugin doesn't completely remove its classes from OSGi Major Resolved
PLUG-207 Make it easier to avoid Classpath pollution between plugins Major Resolved
PLUG-191 make PluginManagerState implement Serializable Major Resolved
PLUG-188 Only generate host component imports for referenced components Major Resolved
PLUG-187 Better osgi plugin caching Major Resolved
PLUG-184 Improve plugin loading strategy to detect plugins that failed to start before the timeout Major Resolved
PLUG-149 Servlet plugins get incorrect pathInfo() Major Closed
PLUG-141 PluginFactory interface is inconsistent Major Resolved
PLUG-136 Support serving of multiple plugin web resources in one request Major Resolved
PLUG-117 Package Scanner fails to scan jar file with `+` in its name Major Closed
PLUG-71 DelegationClassLoader doesn't override the getResources(String) method Major Resolved
PLUG-51 Web Resource Manager plugin should support resource dependencies Major Resolved

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.