【问题标题】:No more splash screen after switch to tycho切换到第谷后不再出现闪屏
【发布时间】:2014-03-17 20:55:05
【问题描述】:

我最近将 RCP 应用程序的构建从 PDE Build 移至 tycho (0.14.0)。到目前为止一切正常,但启动画面不再显示。 osgi.splashPath 属性设置正确,并且 splash.bmp 文件存在于导出的捆绑包根目录中(如果重要的话,捆绑包甚至在启动时处于活动状态)。打包是eclipse-repository。还有什么要找的吗?

这是 pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
    <artifactId>com.my.client.parent</artifactId>
    <groupId>com.my</groupId>
    <version>2.0.0-SNAPSHOT</version>
    <relativePath>../com.my.client.parent/pom.xml</relativePath>
</parent>

<artifactId>com.my.client.product</artifactId>
<packaging>eclipse-repository</packaging>
<version>2.0.0-SNAPSHOT</version>

<properties>
    <product-id>com.my</product-id>
</properties>

<build>
    <plugins>
        <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-p2-repository-plugin</artifactId>
            <version>${tycho-version}</version>
            <configuration>
                <includeAllDependencies>true</includeAllDependencies>
            </configuration>
        </plugin>
        <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>
    </plugins>
</build>

*编辑:* 我将项目集成到我们的 CI 服务器上,结果显示了漂亮的初始屏幕 - 感谢您的支持,问题神奇地自行解决了...

【问题讨论】:

  • 你能给我们看看你的 eclipse-repository 的 pom.xml 吗?
  • 当然,编辑了上面的问题
  • 已编辑并取消删除我的答案 :)
  • 您是否检查过品牌插件是否包含在生成的产品的“插件”文件夹中?
  • 那么...我们从这个问题中学到了什么?

标签: eclipse-rcp tycho


【解决方案1】:

【讨论】:

  • 是的。感谢伟大的教程,它引导我完成了将构建迁移到 tycho 的整个过程。据我所知,除了将“splash.bmp”文件放入捆绑包中并从产品配置中引用捆绑包之外,别无他法。无论如何,在我的 config.ini 中正确生成了 osgi.splashPath 属性,并且在导出的包中存在 splash.bmp 文件...
  • 我的意思是您是否尝试构建教程示例?它应该有一个工作启动画面。然后看看有效的教程和无效的示例之间可能有什么区别。
【解决方案2】:

据我所知,你的 pom 没问题。您可以检查您的 build.properties 以查看 splash.bmp 是否标记为导出?我知道您说插件包含您的启动画面,但只是为了确认...
我不知道这是否会有所帮助,但这是我的 pom.xml 有效

<?xml version="1.0" encoding="UTF-8"?>
<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>br.com.germantech.parent</groupId>
        <artifactId>ws</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <relativePath>../br.com.germantech.parent/pom.xml</relativePath>
    </parent>
    <groupId>br.com.germantech</groupId>
    <artifactId>br.com.germantech</artifactId>
    <version>1.8.13</version>
    <packaging>eclipse-repository</packaging>

    <build>
        <plugins>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-p2-repository-plugin</artifactId>
                <version>${tycho-version}</version>
                <configuration>
                    <includeAllDependencies>true</includeAllDependencies>
                    <createArtifactRepository>true</createArtifactRepository>
                    <compress>true</compress>
                </configuration>

                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>archive-repository</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <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>
                        <configuration>
                            <profile>Installer</profile>
                        </configuration>
                    </execution>
                    <execution>
                        <id>archive-products</id>
                        <goals>
                            <goal>archive-products</goal>
                        </goals>
                    </execution>
                </executions>

                <configuration>
                    <products>
                        <product>
                            <id>br.com.germantech.ecfNfe</id>
                            <rootFolder>germantechEcfNfe</rootFolder>
                            <attachId>${project.version}</attachId>
                        </product>
                    </products>

                    <formats>
                        <win32>zip</win32> 
                        <linux>tar.gz</linux>
                        <macosx>tar.gz</macosx>
                    </formats>

                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

我正在使用第谷 0.14.0

【讨论】:

  • 感谢您的 pom.xml - 我添加了配置部分以明确将 tycho 指向产品 ID,这对启动画面也没有影响;-) build.properties 文件包含启动画面。 bin.includes 中的 bmp 条目。
猜你喜欢
  • 2014-12-10
  • 2021-03-18
  • 1970-01-01
  • 2019-11-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多