gpt4 book ai didi

java - 使用 Maven 将 InstallerListener 添加到 IzPack 安装程序项目

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:56:48 24 4
gpt4 key购买 nike

我有一个使用 maven 设置的工作 IzPack 安装程序项目,并将以下内容添加到我的安装脚本 install.xml 到 [ installation ][ listeners ]:

<listener classname=" (company-name) .listener.InstallerListener" stage="install"/>


可悲的是,该行似乎被忽略了,调试器不会在 InstallListener 中设置的断点处停止。类(class)。我读过the documentation对于 InstallListener s,但它没有用,因为我将构建过程与 maven 集成在一起;以下是项目对象模型 pom.xml 的相关部分:

<properties>
<izpack-standalone.version>4.3.1</izpack-standalone.version>
</properties>

<dependencies>
<!-- izpack -->
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-standalone-compiler</artifactId>
<version>${izpack-standalone.version}</version>
<optional>true</optional>
</dependency>
</dependencies>

<plugins>
<!-- IzPack compiler -->
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>${org.codehaus.izpack.izpack-maven-plugin.version}</version>
<dependencies>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-standalone-compiler</artifactId>
<version>${izpack-standalone.version}</version>
</dependency>
</dependencies>
<configuration>
<izpackBasedir>${staging.dir}</izpackBasedir>
<customPanelDirectory>${staging.dir}</customPanelDirectory>
</configuration>
<executions>
<execution>
<id>standard-installer</id>
<phase>package</phase>
<goals>
<goal>izpack</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

我在这里错过了什么?


注意:编译的安装程序确实包含指定的 InstallerListener class 文件,因此它在运行时可用。

最佳答案

您必须将包含面板类的 jar 文件放入 {customPanelDirectory}/bin/panels izpack-maven-plugin 将自动选取的文件夹。

在上述情况下,此文件夹将解析为 {staging.dir}/bin/panels因为你配置了<customPanelDirectory>${staging.dir}</customPanelDirectory> .

将它添加到 install.xml 文件将不起作用,因为这会在安装时解决,但不会在安装程序构建时解决。

关于java - 使用 Maven 将 InstallerListener 添加到 IzPack 安装程序项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30120236/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com