Hi,
We have changed the p2-repo-gen to generate the repository with category
information. So you can simply define categories and include appropriate
features into those categories. Once that repo with category information is
imported to the feature manger, you can see those defined categories in the
UI.
To feed in these information, you have to edit the
carbon/platform/trunk/features/repository/pom.xml file in svn by adding
<categories> element. An example of such a category is shown below. You can
include multiple <category> elements.
<categories>
<category>
<id>org.wso2.carbon.broker.category</id>
<label>WSO2 Broker Category</label>
<description>broker category</description>
<features>
<catFeature>
<id>org.wso2.carbon.broker</id>
<version>${carbon.version}</version>
</catFeature>
<catFeature>
<id>org.wso2.carbon.brokermanager</id>
<version>${carbon.version}</version>
</catFeature>
</features>
</category>
</categories>
Please note that, <id> and <version> are required to include a feature to a
category. <id> is the same ID used with p2-feature-gen goal of the
carbon-p2-plugin. You can find that if you look at the pom.xml of any
particular feature you want.
A sample pom.xml file to reside in repository folder is attached here.
Real pom file has a long list of features and hope people who are managing
individual features will insert their respective category information also
to this file.
Thanks,
--
Chethiya Abeysinghe
Software Engineer; WSO2, Inc.; http://wso2.com/
email: [email protected] phone: +94 777444891
blog: chethiya3000.blogspot.com
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) WSO2 Inc. (http://wso2.com) All Rights Reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.wso2.carbon</groupId>
<artifactId>carbon-features</artifactId>
<version>4.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wso2carbon-feature-repository</artifactId>
<packaging>pom</packaging>
<name>WSO2 Carbon - Feature Repository</name>
<url>http://wso2.org</url>
<build>
<plugins>
<plugin>
<groupId>org.wso2.maven</groupId>
<artifactId>carbon-p2-plugin</artifactId>
<version>1.4-SNAPSHOT</version>
<executions>
<execution>
<id>2-p2-repo-generation</id>
<phase>package</phase>
<goals>
<goal>p2-repo-gen</goal>
</goals>
<configuration>
<p2AgentLocation>${basedir}/target/p2-agent</p2AgentLocation>
<metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
<artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
<publishArtifacts>true</publishArtifacts>
<publishArtifactRepository>true</publishArtifactRepository>
<featureArtifacts>
<featureArtifactDef>
org.wso2.carbon:org.wso2.carbon.cep.feature:${carbon.version}
</featureArtifactDef>
<featureArtifactDef>
org.wso2.carbon:org.wso2.carbon.broker.feature:${carbon.version}
</featureArtifactDef>
<featureArtifactDef>
org.wso2.carbon:org.wso2.carbon.brokermanager.feature:${carbon.version}
</featureArtifactDef>
</featureArtifacts>
<categories>
<category>
<id>org.wso2.carbon.broker.category</id>
<label>WSO2 Broker Category</label>
<description>broker category</description>
<features>
<catFeature>
<id>org.wso2.carbon.broker</id>
<version>${carbon.version}</version>
</catFeature>
<catFeature>
<id>org.wso2.carbon.brokermanager</id>
<version>${carbon.version}</version>
</catFeature>
</features>
</category>
</categories>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<carbon.version>4.0.0-SNAPSHOT</carbon.version>
<stratos.version>1.1.0-SNAPSHOT</stratos.version>
<relay.transport.version>1.0.0-SNAPSHOT</relay.transport.version>
<synapse.version>2.1.0-wso2v6</synapse.version>
<appserver.version>4.1.0-SNAPSHOT</appserver.version>
<esb.version>4.0.0-SNAPSHOT</esb.version>
<governance.version>4.0.0-SNAPSHOT</governance.version>
<identity.version>4.0.0-SNAPSHOT</identity.version>
<gs.version>1.3.1-SNAPSHOT</gs.version>
<mashup.version>2.3.0-SNAPSHOT</mashup.version>
<qpid.version>0.11.wso2v1</qpid.version>
<bam.version>1.3.0-SNAPSHOT</bam.version>
<bps.version>2.1.0-SNAPSHOT</bps.version>
<tycho-version>0.13.0</tycho-version>
</properties>
</project>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev