0

我尝试使用以下方法安装功能(https://docs.wso2.org/display/Carbon420/Installing+Features+using+pom+Files

我想使用这种方法(而不是通过 UI)安装功能

通过 maven 构建时,功能和插件已正确插入到相应的文件夹结构中,但不会更新 platform.xml 和 bundles.info 文件

任何人都可以帮我解决这个问题...我认为这个 Maven 安装中有一个错误

请帮我 ...

下面是我的 pom.xml 配置

`<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>`

虽然使用mvn clean install .build 获得成功,但正如我所说,只有功能和插件文件夹正在更新...... bundles.info(D:\Carbon.com\wso2carbon-4.2.0\wso2carbon-4.2. 0\repository\components\default\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info)和platform.xml(D:\Carbon.com\wso2carbon-4.2.0\wso2carbon-4.2.0\repository\components\default\configuration \org.eclipse.update\platform.xml)

此处(D:\Carbon.com\wso2carbon-4.2.0\wso2carbon-4.2.0\repository\components)里面有文件夹创建配置,而不是里面默认

请帮我解决这个问题....

4

0 回答 0