blob: bc2c42e8442d9ab72925c1314deec4c6256a7636 [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.
//
= DevFaqMavenPlatformRebel
:jbake-type: wiki
:jbake-tags: wiki, devfaq, needsreview
:jbake-status: published
:keywords: Apache NetBeans wiki DevFaqMavenPlatformRebel
:description: Apache NetBeans wiki DevFaqMavenPlatformRebel
:toc: left
:toc-title:
:syntax: true
== Can I use JRebel to speed up development?
Yes, you can. Once you have obtained JRebel and installed it locally, paste the following snippet into your application's root pom (parent of both the NetBeans application project and any NetBeans module projects you want to have reloaded upon change).
[source,xml]
----
<profile>
<id>rebel</id>
<activation>
<file>
<exists>/Users/mkleint/jrebel/jrebel.jar</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<id>generate-rebel-xml</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<configuration>
<!-- only works if additionalArguments not defined in the application's pom -->
<additionalArguments>-J-javaagent:/Users/mkleint/jrebel/jrebel.jar=org.netbeans.JarClassLoader,org.netbeans.StandardModule.OneModuleClassLoader</additionalArguments>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<properties>
<netbeans.compile.on.save>app</netbeans.compile.on.save>
</properties>
</profile>
----
You will have to edit the path to your jrebel.jar you have locally. if multiple people are going to work on the project use an expression and define the path property in your settings.xml file.
Please note that any layer or manifest registrations are not likely to be reloaded as JRebel doesn't have any special knowledge about NetBeans internals.
The solution was tested with nbm-maven-plugin 3.8 and JRebel 5.0.1
=== Apache Migration Information
The content in this page was kindly donated by Oracle Corp. to the
Apache Software Foundation.
This page was exported from link:http://wiki.netbeans.org/DevFaqMavenPlatformRebel[http://wiki.netbeans.org/DevFaqMavenPlatformRebel] ,
that was last modified by NetBeans user Mkleint
on 2012-09-07T10:58:50Z.
*NOTE:* This document was automatically converted to the AsciiDoc format on 2018-02-07, and needs to be reviewed.