Error while installing features using POM in wso2

≡放荡痞女 提交于 2019-12-11 15:06:17

问题


i have tried to install features using the below method (https://docs.wso2.org/display/Carbon420/Installing+Features+using+pom+Files)

I want to install the features using this method (instead of through UI)

While building through maven,the features and plugins are properly inserted into the corresponding folder structure, but it's not updating the platform.xml and bundles.info file

Can anyone help me on this... There is a bug in this Maven Installation i think

Please help me ...

Below is my pom.xml configuration

`<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">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.wso2.sample</groupId>
    <artifactId>sample-feature-installation</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>
    <name>Creating custom distribution</name>

    <build>
        <plugins>
            <plugin>
                <groupId>org.wso2.maven</groupId>
                <artifactId>carbon-p2-plugin</artifactId>
                <version>1.5.1</version>
                <executions>
                    <execution>
                        <id>feature-install</id>
                        <phase>package</phase>
                        <goals>
                            <goal>p2-profile-gen</goal>
                        </goals>
                        <configuration>
                            <profile>default</profile>
                            <metadataRepository>file://D:/p2-repo/</metadataRepository>
                            <artifactRepository>file://D:/p2-repo/</artifactRepository>
                            <destination>wso2carbon-4.2.0/wso2carbon-4.2.0/repository/components</destination>
                            <deleteOldProfileFiles>true</deleteOldProfileFiles>
                            <features>
                                <feature>
                                    <id>org.wso2.carbon.student.mgt.feature.group</id>
                                    <version>4.2.0</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="wso2carbon-4.2.0/wso2carbon-4.2.0/repository/components/default/configuration/org.eclipse.equinox.simpleconfigurator">
                                    <include name="**/bundles.info"/>
                                </replace>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <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</id>
            <url>http://dist.wso2.org/maven2</url>
        </pluginRepository>
        <pluginRepository>
            <id>wso2-maven2-repository2</id>
            <url>http://dist.wso2.org/snapshots/maven2</url>
        </pluginRepository>
    </pluginRepositories>
</project>`

While using mvn clean install.build is getting success,but as i told,only features and plugins folder are getting updated... There is no entry in bundles.info (D:\Carbon.com\wso2carbon-4.2.0\wso2carbon-4.2.0\repository\components\default\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info) and platform.xml(D:\Carbon.com\wso2carbon-4.2.0\wso2carbon-4.2.0\repository\components\default\configuration\org.eclipse.update\platform.xml)

There is folder created Configuration inside here (D:\Carbon.com\wso2carbon-4.2.0\wso2carbon-4.2.0\repository\components) instead of inside default

Please help me on this ....

来源:https://stackoverflow.com/questions/22711422/error-while-installing-features-using-pom-in-wso2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!