将我的izpack安装程序包装在launch4j生成的EXE中时,除了卸载程序信息外,一切正常。使用JAR安装程序,只要我在安装程序中点击“Quit”,就会在窗口实际关闭前花几秒时填充“uninstaller.jar”。但是,当使用包装的EXE安装程序时,窗口立即关闭,“uninstaller.jar”文件仍然是2KB大小并且无效。
有没有人有这方面的经验?感谢您的建议和最好的问候
帕斯卡
PS:这是我的完整POM:
<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>ch.diction</groupId>
<artifactId>dataexchange-viewer</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Diction data exchange viewer</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.7</java.version>
<java.minimum_version>1.7.0</java.minimum_version>
<swixml.version>2.5.20110919</swixml.version>
<swingx.version>1.6.1</swingx.version>
<izpack.plugin.version>5.0.0-beta11</izpack.plugin.version>
<izpack.compiler.version>5.0.0-beta11</izpack.compiler.version>
</properties>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<outputDirectory>target/main</outputDirectory>
<testOutputDirectory>target/test</testOutputDirectory>
<resources>
<resource>
<targetPath>ch/diction/dataexchange/viewer/resources</targetPath>
<directory>src/main/resources</directory>
<excludes>
<exclude>izpack/*</exclude>
</excludes>
</resource>
</resources>
<testResources>
<testResource>
<targetPath>ch/diction/dataexchange/viewer/resources</targetPath>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>ch.diction.dataexchange.viewer.system.Runner</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.bluestemsoftware.open.maven.plugin</groupId>
<artifactId>launch4j-plugin</artifactId>
<version>1.5.0.0</version>
<executions>
<execution>
<id>l4j-gui</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<outfile>target/${project.artifactId}.exe</outfile>
<jar>target/${project.artifactId}-${project.version}-jar-with-dependencies.jar</jar>
<classPath>
<mainClass>ch.diction.dataexchange.viewer.system.Runner</mainClass>
</classPath>
<icon>src/main/resources/img/diction-favicon.ico</icon>
<jre>
<minVersion>${java.minimum_version}</minVersion>
</jre>
</configuration>
</execution>
<execution>
<id>l4j-installer</id>
<phase>install</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<outfile>target/${project.artifactId}-setup.exe</outfile>
<jar>target/${project.artifactId}-${project.version}.jar</jar>
<classPath>
<mainClass>com.izforge.izpack.installer.bootstrap.Installer</mainClass>
</classPath>
<icon>src/main/resources/img/diction-favicon.ico</icon>
<jre>
<minVersion>${java.minimum_version}</minVersion>
</jre>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>${izpack.plugin.version}</version>
<configuration>
<baseDir>target</baseDir>
<installFile>src/main/resources/izpack/install.xml</installFile>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>izpack</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-compiler</artifactId>
<version>${izpack.compiler.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>google-swixml2</id>
<url>http://swixml2.googlecode.com/svn/mavenrepo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>ch.diction</groupId>
<artifactId>dataexchange-base</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.swixml</groupId>
<artifactId>swixml</artifactId>
<version>${swixml.version}</version>
</dependency>
<dependency>
<groupId>org.swinglabs</groupId>
<artifactId>swingx</artifactId>
<version>${swingx.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-compiler</artifactId>
<version>${izpack.compiler.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</project>
我的izpack install.xml:
<izpack:installation version="5.0" xmlns:izpack="http://izpack.org/schema/installation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://izpack.org/schema/installation http://izpack.org/schema/5.0/izpack-installation-5.0.xsd">
<info>
<appname>Diction Data Exchange Viewer</appname>
<appversion>0.0.1</appversion>
<appsubpath>Diction/data-exchange-viewer</appsubpath>
<javaversion>1.7</javaversion>
</info>
<guiprefs width="800" height="600" resizable="no">
<modifier key="useHeadingPanel" value="yes" />
<splash>../src/main/resources/izpack/diction_logo_rgb.jpg</splash>
</guiprefs>
<locale>
<langpack iso3="eng" />
</locale>
<resources>
<res src="../src/main/resources/izpack/registry-spec.xml" id="RegistrySpec.xml" />
</resources>
<listeners>
<listener classname="RegistryInstallerListener" stage="install" />
<listener classname="RegistryUninstallerListener" stage="uninstall" />
</listeners>
<panels>
<panel classname="TargetPanel" />
<panel classname="InstallPanel" />
</panels>
<packs>
<pack name="Diction Data Exchange" required="yes">
<description>Diction Data Exchange</description>
<file src="dataexchange-viewer.exe" targetdir="$INSTALL_PATH" override="true" />
</pack>
</packs>
<natives>
<native name="COIOSHelper.dll" type="3rdparty" stage="both" />
</natives>
</izpack:installation>
答案 0 :(得分:2)
我使用izpack 5.0.0-rc1创建了一个工作卸载程序。所以现在在izPack中修复了这个bug。