Migrating to a newer version of the Platform

Apache NetBeans Wiki Index

Note: These pages are being reviewed.

When migrating a module suite application to use a newer version of the platform you may want to be aware of the following issues:

  • The newer platform may contain new modules in the platform and/or ide cluster that are not excluded in your platform.properties

  • The clusters that your application depends on may have added new modules. If you enabled a cluster and disabled all the modules you did not need before, you may be surprised when you go to build your application with the newer platform and get warning about module dependency errors. This is because the cluster has added new modules that are not listed as being excluded for your project. If you get errors regarding module dependencies when you migrate, you may want to check your project’s settings to see if there are new modules that were introduced that you do not need and disable them.

  • The newer platform may include modules with newer versions

  • For example, in 6.9, the Lookup classes have been moved into a separate module, named Lookup API. Therefore, all modules making use of Lookup need a new dependency on this new module. Also, dependencies on the Utilities API module, which previously contained the Lookup classes, need to be updated to the latest version. For Ant-based NetBeans Platform applications, run this target for each module making use of Lookup-related classes:

    <pre> ant fix-dependencies 	</pre>
  • In the IDE, you can do the following to run the above Ant target:

  • Important Files > Build Scripts (right click) > Run target > fix-dependencies.

  • Also, instead of the above, you can simply add the Lookup API module to each module that makes use of the Lookup classes. For each module, right-click the module in NetBeans IDE, choose Properties, go to the Libraries panel, click Add Dependency, and then add the Lookup module. For the Utilities API module, you can remove it from the list of dependencies and then readd it to set the correct version of the dependency.

  • The difference between the above two options is as follows: The second option is much faster - perhaps 15 seconds for each module. The first option (ant fix-dependencies) is much slower - perhaps two minutes or more per module - but it is much more complete and generic in that it removes old unused dependencies as well as adding new dependencies.

  • To achieve the above for Maven-based NetBeans Platform applications

  • you need to add the Lookup dependency to the POM of all modules that use Lookup:

  • For Maven-based applications

  • you also need to update the "platform" definition (from "platform11" to "platform") in the application module: