This documentation is for WSO2 Carbon 4.2.0. View documentation for the latest release.
Shipping a Kernel Patch with Distribution - Carbon 4.2.0 - WSO2 Documentation
||
Skip to end of metadata
Go to start of metadata

According to the WSO2 patch application process, after a kernel public patch is created as described in Creating a Carbon Kernel Patch, the respective product team should follow the steps below to add the patches to the product distribution, if a product that is based on Carbon kernel needs to ship the patch by default.

To ship a kernel patch with a product distribution:

  1. Add the patch to the respective product distribution build. Follow the identical process that you use to add a Carbon kernel distribution (wso2carbon-core-<version>.zip) to a product distribution using the Maven dependency plugin.
      

    Example:

    <!-- Unzipping WSO2-CARBON-PATCH-4.1.0-0001-->
    <plugins>
        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-dependency-plugin</artifactId>
           <version>2.0-alpha-4</version>
           <inherited>false</inherited>
           <execution>
                    <id>unpack-kernel-patch</id>
                     <phase>test</phase>
                      <goals>
                            <goal>unpack</goal>
                      </goals>
                      <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>org.wso2.carbon</groupId>
                                        <artifactId>WSO2-CARBON-PATCH-4.1.0</artifactId>
                                        <version>0001</version>
                                        <type>zip</type>
                                        <overWrite>true</overWrite>
                                        <outputDirectory>target</outputDirectory>
                                    </artifactItem>
                                </artifactItems>
                     </configuration>
            </execution>
    	</plugin>
    </plugins>
  2. When the distribution gets built for a product, ensure that the libraries/jars subdirectory in the patch directory (e.g., patch0xxx) are copied to the <PRODUCT_HOME>/repository/components/patches/patch0xxx directory.  

    Example:

      <!-- Copying WSO2-CARBON-PATCH-4.1.0-0001 files to the patches directory-->
           <fileSet>
                 <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.1.0-0001</directory>
                 <outputDirectory>wso2as-${pom.version}/repository/components/patches/</outputDirectory>
                 <includes>
                      <include>**/patch0001/*.*</include>
                 </includes>
            </fileSet>
  • No labels