Options are not optional and must exactly follow this format: --optionname=value
. The =
must be present when there is a value. There are no short forms for the option names.
In the following sections, substitute patch-gen
for java -jar patch-gen-*-shaded.jar
, or set up an alias with
alias patch-gen='java -jar patch-gen-*-shaded.jar'
patch-gen --applies-to-dist=~/wildfly/wildfly-8.0.0.Final --updated-dist=~/wildfly/wildfly-8.0.1.Final --patch-config=wildfly-8.0.1.Final-patch.xml --output-file=wildfly-8.0.1.Final.patch.zip
--applies-to-dist
and --updated-dist
must point exactly at the root of the distributions (the directory containing bin, modules, domain, etc.), otherwise the tool will crash.
patch-gen --applies-to-dist=~/wildfly/wildfly-8.0.1.Final --updated-dist=~/wildfly/wildfly-8.0.2.Final --patch-config=wildfly-8.0.2.Final-patch.xml --output-file=wildfly-8.0.2.Final.patch.zip --combine-with=wildfly-8.0.1.Final.patch.zip
where wildfly-8.0.1.Final.patch.zip is the last produced CP (in this example generated in the section above) for wildfly-8.0.0.Final. The generated patch wildfly-8.0.2.Final.patch.zip can be applied to wildfly-8.0.1.Final as well as to wildfly-8.0.0.Final. No matter to which version it is applied, the resulting patched version will be wildfly-8.0.2.Final. There is no restriction on the number of CPs included into a single patch file.
patch-gen --create-template --one-off my-custom-patch
patch-gen --create-template --cumulative my-custom-patch
You probably want to use the shaded jar, which is executable and contains all of its dependencies.
git clone https://github.com/jbossas/patch-gen.git
cd patch-gen/
mvn package
The jars will be located in the target/
subdirectory.
curl -LO 'https://github.com/jbossas/patch-gen/releases/download/2.0.0.Final/patch-gen-2.0.0.Final-shaded.jar'
- Run the command specified in the Configuration Templating section.
- Edit the configuration file.
$EDITOR patch-config-wildfly-CR2-patch.xml
<?xml version='1.0' encoding='UTF-8'?>
<patch-config xmlns="urn:jboss:patch-config:1.0">
<name>wildfly-8.0.2.Final.patch</name>
<description>WildFly 8.0.2.Final patch</description>
<cumulative />
<element patch-id="base-wildfly-8.0.2.Final-patch">
<cumulative name="base" />
<description>No description available</description>
</element>
<generate-by-diff />
</patch-config>
- Run the command specified in the Patch Generation section.
- Optionally, edit README.txt in the zip.
unzip -qo patch.zip README.txt
$EDITOR README.txt
zip -qu patch.zip README.txt