-1

我有一个在 Mac OS X 上运行的跨平台 Tycho 构建,它可以生成 Windows、Mac 和 p2 repo 输出。

通常一切都很好,除了 Windows RCP 没有从我的p2.inf addRepository指令中配置更新 repo URL 详细信息(因此 p2 更新失败) - 它适用于 Mac OS X 应用程序......这似乎很可疑.. . 为什么是一个而不是另一个?!

这是任何人都可能遇到过的第谷错误吗?(我目前正在使用 Tycho 0.13.0,担心切换版本..)或者我是否需要明确的说明才能将其应用于 Windows 构建?

在此处包含一些 POM 可能会有所帮助...

这是来自产品项目的 POM:

<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>com.myapp.main.product</artifactId>

<packaging>eclipse-repository</packaging>

<name>my product</name>

<parent>
    <groupId>com.myapp</groupId>
    <artifactId>parent</artifactId>
    <version>1.9.0-SNAPSHOT</version>
    <relativePath>../com.myapp.parent</relativePath>
</parent>

<build>
    <plugins>
        <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-p2-director-plugin</artifactId>
            <version>${tycho-version}</version>
            <executions>
                <execution>
                    <id>materialize-products</id>
                    <goals>
                        <goal>materialize-products</goal>
                    </goals>
                </execution>
                <execution>
                    <id>archive-products</id>
                    <goals>
                        <goal>archive-products</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

<!-- SEE: http://dev.eclipse.org/mhonarc/lists/tycho-user/msg00362.html
     SEE: https://issues.sonatype.org/browse/TYCHO-300 -->

        <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.5</version>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/products/com.myapp.main.product/icons</outputDirectory>
              <resources>
                <resource>
                  <directory>icons</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
  </plugins>
</build>

<version>1.9.0-SNAPSHOT</version>
</project>

和父 POM:

<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.myapp</groupId>
<artifactId>parent</artifactId>
<version>1.9.0-SNAPSHOT</version>

<packaging>pom</packaging>

<modules>
    <module>../com.myapp.doc</module>

    <module>../com.myapp.lots.of.plugins</module>

    <module>../com.myapp.main</module>
    <module>../com.myapp.main.nl</module>
    <module>../com.myapp.branding</module>
    <module>../com.myapp.branding.nl</module>

    <module>../com.myapp.feature.platform</module>
    <module>../com.myapp.feature.core</module>
    <module>../com.myapp.main.product</module>
</modules>

<properties>
    <tycho-version>0.13.0</tycho-version>
</properties>

<build>
    <plugins>
        <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-maven-plugin</artifactId>
            <version>${tycho-version}</version>
            <extensions>true</extensions>
        </plugin>

        <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>target-platform-configuration</artifactId>
            <version>${tycho-version}</version>
            <configuration>
                <resolver>p2</resolver>
                <environments>
                    <environment>
                         <os>win32</os>
                        <ws>win32</ws>
                        <arch>x86</arch>
                    </environment>
                     <environment>
                        <os>macosx</os>
                        <ws>cocoa</ws>
                        <arch>x86</arch>
                    </environment>
                     <environment>
                        <os>macosx</os>
                        <ws>carbon</ws>
                        <arch>x86</arch>
                    </environment>
<!-- 64 bit platforms
                    <environment>
                        <os>win32</os>
                        <ws>win32</ws>
                        <arch>x86_64</arch>
                    </environment>
-->
                     <environment>
                        <os>macosx</os>
                        <ws>cocoa</ws>
                        <arch>x86_64</arch>
                    </environment>
                </environments>
            </configuration>
        </plugin>
    </plugins>
</build>

<profiles>

    <!-- MacOS specific vm arguments for UI testing -->
    <profile>
        <id>osx</id>
        <activation>
            <property>
                <name>java.vendor.url</name>
                <value>http://www.apple.com/</value>
            </property>
        </activation>
        <build>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.eclipse.tycho</groupId>
                        <artifactId>tycho-surefire-plugin</artifactId>
                        <version>${tycho-version}</version>
                        <configuration>
                            <appArgLine>-XstartOnFirstThread</appArgLine>
                        </configuration>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>
    </profile>

    <profile>
      <id>coverage</id>
        <activation>
            <property>
                <name>coverage</name>
            </property>
        </activation>
        <properties>
            <emma.session.out.file>${project.build.directory}/emma/${project.artifactId}.es</emma.session.out.file>
            <emma.filter>com.myapp.*</emma.filter>
            <eclemma.instrument.bundles>com.myapp.backup.tests,com.myapp.common.tests,com.myapp.model.tests</eclemma.instrument.bundles>
        </properties>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>1.5</version>
                    <executions>
                        <execution>
                            <id>attach-artifacts</id>
                            <phase>package</phase>
                            <goals>
                                 <goal>attach-artifact</goal>
                            </goals>
                            <configuration>
                                <artifacts>
                                    <artifact>
                                        <file>${emma.session.out.file}</file>
                                        <type>es</type>
                                    </artifact>
                                </artifacts>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.sonatype.tycho</groupId>
                    <artifactId>maven-osgi-test-plugin</artifactId>
                    <version>${tycho-version}</version>
<!--
                     <configuration>
                        <systemProperties combine.children="append">
                            <eclemma.help>true</eclemma.help>
                            <emma.session.out.file>${emma.session.out.file}</emma.session.out.file>
                            <emma.filter>${emma.filter}</emma.filter>
                            <eclemma.instrument.bundles>${eclemma.instrument.bundles}</eclemma.instrument.bundles>
                        </systemProperties>
                        <frameworkExtensions>
                            <frameworkExtension>
                                <groupId>org.eclemma.runtime.equinox</groupId>
                                <artifactId>org.eclemma.runtime.equinox</artifactId>
                                <version>1.1.0.200908261008</version>
                            </frameworkExtension>
                        </frameworkExtensions>
                    </configuration>
 -->
                     <configuration>
                        <skip>${skipFunctional}</skip>
                        <useUIHarness>true</useUIHarness>
                        <useUIThread>false</useUIThread>
                        <product>org.eclipse.sdk.ide</product>
                        <application>org.eclipse.ui.ide.workbench</application>
                        <argLine>-Xmx512M</argLine>
                        <systemProperties combine.children="append">
                            <emma.session.out.file>${emma.session.out.file}</emma.session.out.file>
                            <emma.filter>${emma.filter}</emma.filter>
                            <eclemma.instrument.bundles>${emma.instrument.bundles}</eclemma.instrument.bundles>
                        </systemProperties>
                        <frameworkExtensions>
                            <frameworkExtension>
                                <groupId>org.eclemma.runtime.equinox</groupId>
                                <artifactId>org.eclemma.runtime.equinox</artifactId>
                                <version>1.1.0.200908261008</version>
                            </frameworkExtension>
                        </frameworkExtensions>
                        <application>org.eclipse.ui.ide.workbench</application>
                        <dependencies>
                            <dependency>
                                <type>p2-installable-unit</type>
                                <artifactId>org.eclipse.sdk.ide</artifactId>
                                <version>0.0.0</version>
                            </dependency>
                        </dependencies>
                    </configuration>

                 </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

<repositories>
    <repository>
        <id>helios-platform</id>
        <layout>p2</layout>
        <url>${project.baseUri}../../../../targetplatform/org.eclipse.platform-3.7.1</url>
    </repository>
    <repository>
        <id>myapp-targetplatform</id>
        <layout>p2</layout>
        <url>${project.baseUri}../../../../targetplatform/myapp-targetplatform</url>
    </repository>
</repositories>

</project>
4

1 回答 1

0

将 Tycho 升级到 0.17.0 但事实证明这个问题确实与 Tycho无关- 我意识到我已经调整了 Windows 上的位置属性,以准备支持使用 UAC 安装到 c:\Program Files post-XP :

-Dosgi.instance.area=@user.home/Application Data/myapp
-Dosgi.configuration.area=@user.home/Application Data/myapp/.configuration

但是,将 osgi.configuration.area 移出安装文件夹(默认为 c:\myapp :P)是导致我的 p2 问题的原因。

于 2013-04-25T12:11:04.873 回答