blob: a22b9c66f036a074bb97064771be43f579a64a72 [file] [log] [blame]
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
= How do I create a patch for a preexisting NetBeans module?
:page-layout: wikidev
:page-tags: wiki, devfaq, needsreview
:jbake-status: published
:keywords: Apache NetBeans wiki DevFaqModulePatching
:description: Apache NetBeans wiki DevFaqModulePatching
:toc: left
:toc-title:
:page-syntax: true
:page-wikidevsection: _development_issues_module_basics_and_classpath_issues_and_information_about_rcpplatform_application_configuration
:page-position: 25
If you need to patch an existing module, you can place a JAR file relative to the original.
For example, to patch `ide/modules/org-openide-example.jar`
you make a JAR like `ide/modules/patches/org-openide-example/mypatch.jar`.
The `mypatch` part of your JAR file patch can be named anything you like.
The JAR file should only contain those classes you want to patch.
It does not need a manifest, though an empty manifest is harmless.
The patch must be in the same cluster as the original. ()
If you want to create an NBM containing a patch,
you must ensure it will be installed in the same cluster
(use the `nbm.target.cluster` property),
but note that you cannot test such a dummy module as part of a module suite
(since this property is interpreted only by Plugin Manager).
If you are distributing a complete application including a patch to the NB Platform,
you will need to either manually preinstall the patch JAR in your copy of the Platform;
or override your `build-zip` target to include the JAR in the final ZIP
(in which case testing using *Run Project* will not have the patch active).
Applies to: NetBeans 6.x