带释放基质的WSO2碳4.2.0(图灵)(块06)

时间:2014-02-01 08:45:05

标签: wso2 wso2carbon

我安装了WSO2 Carbon 4.2.0。根据在线产品文档,我尝试使用“功能管理 - >安装各种产品。安装功能 - >通过UI安装功能“但无法成功安装所有产品。

将存储库添加为http://dist.wso2.org/p2/carbon/releases/turing/并安装列出的功能后,处理失败。似乎在通过UI安装后,系统无法解析依赖关系并退出已安装的组件版本,因此建议通过POM(Maven)安装。但是,关于如何创建POM列出所有要在WSO2 Carbon 4.2.0上安装的WSO2产品,还没有进一步记录。

是否有关于安装所有产品(或列表兼容产品)的想法?

另外,我尝试使用Carbon 4.2.0 P2(.ZIP)文件安装产品,即在存储库管理中使用本地存储库添加存储库但安装失败,但有以下异常,我已确认webapp-classloading-environments.xml是在文件夹中提到缺少:

[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 个答案:

答案 0 :(得分:1)

以下是可用于组合产品的示例pom文件。以下步骤描述了如何使用它。

  1. 安装Apache Maven 3.0.x和Ant
  2. 创建目录,并在名为pom.xml的文件中添加以下内容。我们将此目录称为$ BASE_DIR
  3. http://dist.wso2.org/p2/carbon/releases/turing.tar.gz
  4. 下载P2-repo
  5. 将turing.tar.gz解压缩到$ BASE_DIR / p2-repo。现在,content.jar应位于$ BASE_DIR / p2-repo / content.jar
  6. 将您想要的功能另外添加到pom.xml中。该示例包含两个功能 - org.wso2.carbon.webapp.mgt.feature.group和org.wso2.carbon.logging.mgt.feature.group。功能列表应如下所示。

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

    每个产品所需的功能都可以在p2-profile-gen / pom.xml下找到。对于前者AS功能可以在https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/as/5.2.1/modules/p2-profile-gen/pom.xml

  7. 中找到
  8. 输入命令mvn clean install
  9. 您的组合产品将以$ BASE_DIR / target / wso2carbon-x.x.x构建。
  10. 示例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>