Creating a custom function

We would like to write our own extension (feature) for wso2 carbon. Is there any documentation for creating features?

We were able to simply “crack” our way of writing a custom function. But how do we take it? Carbon seems to be looking at some very specific repository descriptors - artifacts.jar and content.jar

How can we generate these descriptors without reference to the Carbon assembly. Is there any documentation that describes how to set up a third-party function repository?

+5
source share
1 answer

Creating-your-own-wso2-carbon-components . .

p2- . p2-repo Eclipse equinox, WSO2.

WSO2 maven, carbon-p2-plugin, p2-. . maven (: pom), , , carbon-p2-plugin. pom.xml, . p2-repo pom.xml 4.1.0, .

pom, . . featureArtifactDef . : $groupId: $artifactId: $version.

maven, maven target/p2-repo. p2-, p2-repo, artifacts.jar content.jar. -. .

<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.1.0</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>mysample-feature-repository</artifactId>
    <version>4.1.0</version>
    <packaging>pom</packaging>
    <name>WSO2 Carbon - Feature Repository</name>

    <build>
      <plugins>
        <plugin>
          <groupId>org.wso2.maven</groupId>
            <artifactId>carbon-p2-plugin</artifactId>
            <version>1.5.2</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> 

<!-- change the featureArtifactDef to match your needs -->

                      <featureArtifactDef>
                                    org.wso2.carbon:org.wso2.carbon.service.mgt.feature:4.1.0
                      </featureArtifactDef>
                      <featureArtifactDef>
                                    org.wso2.carbon:org.wso2.carbon.registry.core.feature:4.1.0
                      </featureArtifactDef>


               </featureArtifacts>
             </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
+1

All Articles