Hi Lasantha, Thank you very much for the given feedback. The plugin wraps the equinox p2 director application internally to install features. However, I am not sure what you have mentioned here is handled by the plugin. So lets have a demo and check that out.
On a separate note there are few limitations in the plugin at the moment. We are in the process of rectifying those. Thanks, Dinusha On Thu, Oct 8, 2015 at 1:39 AM, Lasantha Fernando <[email protected]> wrote: > Hi Dinusha, > > The new configuration seems more intuitive and easier to use. +1 for the > proposed changes. > > A minor issue that I have encountered when using the previous plugin is > that resources that are copied via the p2.inf for a feature get left in the > repository/components/features directory of the pack. If considerably large > files are copied by the feature, we have to manually add instructions in > dist.xml of the product build to clean up these files, as in [1,2]. > > I guess one option to clean up these files would be to make use of the > eclipse touch points to clean up these resources after installation. > However, this approach fails if the product uses multiple profiles. i.e. > the feature gets installed in one profile generation and the resource files > get cleaned up. Then when it comes to installing features for the second > profile, the resource files are not available and will throw an error. > > Can this issue also be addressed with the changes that we are going to > incorporate to the p2-plugin? IMHO, this will make for a much cleaner > installation process for the features. Also, currently, if the features are > installed via management console, there is no way to perform a cleanup > operation similar to [1,2]. > > [1] > https://github.com/wso2/product-as/blob/master/modules/distribution/src/assembly/dist.xml#L35 > [2] > https://github.com/wso2/product-cep/blob/master/modules/distribution/src/assembly/dist.xml > > Thanks, > Lasantha > > On 7 October 2015 at 15:26, Dinusha Boteju <[email protected]> wrote: > >> >> 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 >> >> > > > -- > *Lasantha Fernando* > Senior Software Engineer - Data Technologies Team > WSO2 Inc. http://wso2.com > > email: [email protected] > mobile: (+94) 71 5247551 > > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > > -- *Dinusha Boteju* *Associate Tech Lead,* *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
