0
votes

I have installed WSO2 Carbon 4.2.0. As per online product documentation, I have attempted to install various products using “Feature Management --> Installing Features --> Installing Features via the UI” but not able to installed all products successfully.

After adding repository as http://dist.wso2.org/p2/carbon/releases/turing/ and installing listed feature, process fails. It seem that following install thru UI, system is not able to resolve dependency and exiting installed component version therefore it’s been recommended to install thru POM (Maven). However, it’s not been further documented on how to create POM listing all WSO2 products to install on WSO2 Carbon 4.2.0.

Any thoughts on getting all products (or at list compatible products) installed?

Also, I have tried to install products using Carbon 4.2.0 P2 (.ZIP) file i.e. adding repository using local repository in repository management but install fails with following exception, I have confirmed that webapp-classloading-environments.xml is missing in mentioned in folder:

[2014-02-01 14:34:55,665] ERROR {org.wso2.carbon.feature.mgt.services.prov.ProvisioningAdminService} -  
Error occurred while performing provisioning actionorg.wso2.carbon.feature.mgt.core.ProvisioningException: 
NLS missing message: Phase_Configure_Error in: org.eclipse.equinox.internal.p2.engine.messages  
NLS missing message: session_context in: org.eclipse.equinox.internal.p2.engine.messages
  Error while executing AddXMLElementAction touchpoint
  C:\wso2.com\WSO2-Servers\wso2carbon-4.2.0\repository\components\default\..\..\..\repository\conf\tomcat\webapp-classloading-environments.xml (The system cannot find the file specified)
        at org.wso2.carbon.feature.mgt.core.util.ProvisioningUtils.performProvisioningAction(ProvisioningUtils.java:77)
        at org.wso2.carbon.feature.mgt.core.util.ProvisioningUtils.performProvis............
1
which products are you going to install?Kasun Gajasinghe
Added an answer. All the products that were released under "Turing" platform release are compatible with each other. That means all the chunk releases under a given platform release are compatible with each other.Kasun Gajasinghe
is there any build location that can be used to download chunk06 and compatible other WSO2 products or chunk06 needs to be build from source?Jaymin
Product binaries are obviously available. Download links can be found here - wso2.com/productsKasun Gajasinghe

1 Answers

1
votes

Here's a sample pom file that you can use to combine products. Following steps describe how to use it.

  1. Install Apache Maven 3.0.x and Ant
  2. Create a directory, and add the following in a file named pom.xml. Let's call this directory as $BASE_DIR
  3. Download the P2-repo at http://dist.wso2.org/p2/carbon/releases/turing.tar.gz
  4. Extract the turing.tar.gz to $BASE_DIR/p2-repo. Now, the content.jar should be located at $BASE_DIR/p2-repo/content.jar
  5. Add the features you want additionally to the pom.xml. The sample contains two features - org.wso2.carbon.webapp.mgt.feature.group, and org.wso2.carbon.logging.mgt.feature.group. The feature listings should look like the following.

    <feature>
        <id>org.wso2.carbon.webapp.mgt.feature.group</id>
        <version>${carbon.platform.version}</version>
    </feature> 
    

    The features needed for each product can be found under the p2-profile-gen/pom.xml. For ex. the AS features can be found in https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/as/5.2.1/modules/p2-profile-gen/pom.xml

  6. Enter the command mvn clean install
  7. Your combined product will be built at $BASE_DIR/target/wso2carbon-x.x.x.

Sample pom.xml -

<?xml version="1.0" encoding="utf-8"?>
<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.appserver</groupId>
    <artifactId>wso2appserver-parent</artifactId>
    <version>5.2.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>wso2product-p2-gen</artifactId>
<packaging>pom</packaging>
<name>WSO2 Product Profile Generation</name>
<url>http://wso2.org</url>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.8</version>
            <inherited>false</inherited>
            <executions>
                <execution>
                    <id>1-unpack-p2-agent-distribution</id>
                    <phase>test</phase>
                    <goals>
                        <goal>unpack</goal>
                    </goals>
                    <configuration>
                        <artifactItems>
                            <artifactItem>
                                <groupId>org.wso2.carbon</groupId>
                                <artifactId>wso2carbon-core</artifactId>
                                <version>${carbon.kernel.version}</version>
                                <type>zip</type>
                                <overWrite>true</overWrite>
                                <outputDirectory>target</outputDirectory>
                            </artifactItem>
                        </artifactItems>
                    </configuration>
                </execution>
                <execution>
                    <id>unpack-equinox-executable</id>
                    <phase>test</phase>
                    <goals>
                        <goal>unpack</goal>
                    </goals>
                    <configuration>
                        <artifactItems>
                            <artifactItem>
                                <groupId>org.eclipse.equinox</groupId>
                                <artifactId>org.eclipse.equinox.executable</artifactId>
                                <version>3.5.0.v20110530-7P7NFUFFLWUl76mart</version>
                                <type>zip</type>
                                <overWrite>true</overWrite>
                                <outputDirectory>target</outputDirectory>
                            </artifactItem>
                        </artifactItems>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.wso2.maven</groupId>
            <artifactId>carbon-p2-plugin</artifactId>
            <version>${carbon.p2.plugin.version}</version>
            <executions>
                <execution>
                    <id>3-p2-profile-generation</id>
                    <phase>package</phase>
                    <goals>
                        <goal>p2-profile-gen</goal>
                    </goals>
                    <configuration>
                        <profile>default</profile>
                        <metadataRepository>file:${basedir}/p2-repo</metadataRepository>
                        <artifactRepository>file:${basedir}/p2-repo</artifactRepository>
                        <destination>
                            ${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/components
                        </destination>
                        <deleteOldProfileFiles>true</deleteOldProfileFiles>
                        <features>
                            <feature>
                                <id>org.wso2.carbon.logging.mgt.feature.group</id>
                                <version>${carbon.platform.version}</version>
                            </feature>

                            <feature>
                                <id>org.wso2.carbon.webapp.mgt.feature.group</id>
                                <version>${carbon.platform.version}</version>
                            </feature>

                        </features>
                    </configuration>
                </execution>

            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.1</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <configuration>
                        <tasks>
                            <replace token="false" value="true"
                                     dir="target/wso2carbon-core-${carbon.kernel.version}/repository/components">
                                <include name="**/bundles.info"/>
                            </replace>
                        </tasks>
                    </configuration>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
<properties>
   <carbon.platform.version>4.2.0</carbon.platform.version>
   <carbon.kernel.version>4.2.0</carbon.kernel.version>
</properties>

<repositories>
     <repository>
        <id>wso2-nexus</id>
        <name>WSO2 internal Repository</name>
        <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
        <releases>
            <enabled>true</enabled>
            <updatePolicy>daily</updatePolicy>
            <checksumPolicy>ignore</checksumPolicy>
        </releases>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>wso2-maven2-repository-1</id>
        <url>http://dist.wso2.org/maven2</url>
    </pluginRepository>
    <pluginRepository>
        <id>wso2-maven2-repository-2</id>
        <url>http://dist.wso2.org/snapshots/maven2</url>
    </pluginRepository>
 </pluginRepositories>