After a kernel public patch is released, the respective product team should follow the following steps to add the patches to the product distribution, if a product that is based on Carbon 4.1.0 kernel needs to ship the patch by default.
To ship a kernel patch with a product distribution:
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 plug-in.
Example:Code Block language html/xml <!-- 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>
Make sure that when the distribution gets built for a product, the
libraries/jars
in the patch directory (e.g.,patch0xxx
) gets copied to the{CARBON_HOME}/repository/components/patches/patch0xxx
directory.
Example:Code Block language html/xml <!-- 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>