Hi all,
We are hoping to introduce a revamp version of carbon-feature-plugin 2.0.0
(previously known as carbon-p2-plugin) along with Carbon 4.5.0 and Carbon
5. Following were taken into consideration when revamping the
carbon-feature-plugin.
- Optimizing the existing plugin (architecture and technology migration)
- Introduce a new packaging type for carbon features
- Make the configuration consistent throughout the set of goals exposed
through the plugin
- Introduce unininstall feature.
The new plugin is composed of 6 maven goals;
1. generate (previously known as p2-feature-gen)
2. install (previously known as p2-profile-gen)
3. uninstall
4. generate-repo (previously known as p2-repo-gen)
5. generate-profile (previously known as materialize-product)
6. publish-product
To give a heads up, I am elaborating sample configuration of few maven
goals of carbon-feature-plugin;
- generate
This goal generates carbon features, which you can install from feature
manager console and/or add it to a p2 repo. In order to generate a carbon
feature from the generate goal, you need to set the packaging type to
*carbon-feature.* A sample plugin configuration;
<project>
....
* <packaging>carbon-feature</packaging>*
...
<build>
<plugins>
<plugin>
<groupId>org.wso2.carbon</groupId>
* <artifactId>carbon-feature-plugin</**artifactId>*
<version>2.0.0</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
* <goal>generate</goal>*
</goals>
<phase>package</phase>
*<configuration>*
*
<propertyFile>file:/home/carbon-kernel/feature.properties</propertyFile>*
* <adviceFileContent>*
* <advice>
<name>org.eclipse.equinox.p2.type.group</name>
<value>false</false> </advice>*
* </adviceFileContent>*
* <bundles>*
* <bundles>*
*
<symbolicName>org.wso2.carbon.registry.contentsearch.feature</symbolicName>*
* <version>4.2.0</version>*
* </bundles>**
</bundles>*
* </configuration>*
</execution>
</executions>
</plugin>
</plugins>
</build>
<project>
Note: If you are familiar with the previous versions of this goal, you will
notice there are considerable changes in configuring adviceFile, bundles,
etc.
- install
install goal, previously known as p2-profile-gen is used to install a given
set of features to a carbon product. In the new version some of the
redundant configuration parameters have been removed and feeding features
to be installed is made consistent with *generate* and *generate-repo*
maven goal. Sample configuration;
<plugin>
<groupId>org.wso2.carbon</groupId>
* <artifactId>carbon-feature-plugin</**artifactId>*
<version>2.0.0</version>
<executions>
<execution>
<goals>
* <goal>install</goal>*
</goals>
<phase>package</phase>
*<configuration>*
* <profile>default</*
*profile>*
* <repositoryURL>*
*file:/home/p2-repo</repositoryURL>*
* <destination>*
*/home/Apps/wso2carbon-4.4.0/repository/components</destination>*
* <features>*
* <feature>*
*
<id>org.wso2.carbon.student.mgt.feature</id>*
* <version>4.2.0</version>*
* </**feature>*
* </**features>*
* </configuration>*
</execution>
</executions>
</plugin>
- uninstall
Configuring *uninstall* maven goal is pretty similar to install goal but
with fewer parameters than *install* goal. The user need to specify
features to be uninstalled exactly the same way the way you specify
features to be installed in install goal. Since the configuration is so
obvious, I have not introduce an example for this.
- generate-repo
Previously known as p2-repo-gen, this goal creates a p2 repository out of a
given set of carbon features. Sample configuration;
<plugin>
<groupId>org.wso2.carbon</groupId>
* <artifactId>carbon-feature-plugin</**artifactId>*
<version>2.0.0</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
* <goal>generate-repo</goal>*
</goals>
<phase>package</phase>
*<configuration>*
*
<targetRepository>file:${basedir}/target/p2-repo</*
*targetRepository>*
* <features>*
* <feature>
<id>org.wso2.carbon.student.mgt.feature</name>
<version>4.2.0</*
*version> </feature>*
* </features> *
* </configuration>*
</execution>
</executions>
</plugin>
I hope you all will find easy to use the new plugin. I will share a proper
documentation in the near future.
Thanks & Best regards,
--
*Dinusha Boteju*
*WSO2, Inc. http://wso2.com <http://wso2.com/> *
*lean.enterprise.middleware.*
email: [email protected] <[email protected]>
phone:(+94) 776640275 <%28%2B94%29%20777739736>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture