IzPack安装程序:无法选择磁盘

时间:2013-03-07 07:32:19

标签: izpack

今天我创建了一个izpack安装程序,使用maven-izpack-plugin安装我的maven项目 和install.xml。

构建顺利:)

然而,当我现在测试installer.jar我有一个问题,因为我不能选择 我想存储软件的磁盘,因为izpack窗口是空的。

我没有选择磁盘就继续前进。 “安装所需的磁盘空间超出了 可用磁盘空间。

somone是否知道如何解决这个问题?

继承了izpack maven模块的pom:

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-antrun-plugin</artifactId>
                                    <versionRange>[1.0.0,)</versionRange>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore />
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-dependency-plugin</artifactId>
                                    <versionRange>[1.0.0,)</versionRange>
                                    <goals>
                                        <goal>copy-dependencies</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore />
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
                <execution>
                    <id>create-staging-area</id>
                    <phase>process-resources</phase>
                    <goals>
                        <goal>run</goal>
                    </goals>
                    <configuration>
                        <tasks>
                            <copy todir="${izpack.staging}">
                                <fileset dir="${basedir}/src/izpack" />
                            </copy>
                        </tasks>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.5.1</version>
            <executions>
                <execution>
                    <!-- copy *application* jars to izpack staging lib -->
                    <id>copy-product-dependencies</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>copy-dependencies</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${izpack.staging}/lib</outputDirectory>
                        <excludeTransitive>false</excludeTransitive>
                        <stripVersion>true</stripVersion>
                        <overWriteReleases>true</overWriteReleases>
                        <overWriteSnapshots>true</overWriteSnapshots>
                        <overWriteIfNewer>true</overWriteIfNewer>
                        <excludeScope>system</excludeScope> <!-- this excludes tools.jar, e.g. -->
                        <excludeArtifactIds>mycustompanels</excludeArtifactIds> <!-- IMPORTANT: don't copy custom panels where our application jars live -->
                        <excludeGroupIds>org.codehaus.izpack</excludeGroupIds> <!-- IMPORTANT: we don't want to copy the izpack dependency where our application 
                            jars live -->
                    </configuration>
                </execution>
                <execution>
                    <!-- copy izpack custom (custom panels, etc.) jars to izpack staging 
                        custom -->
                    <id>copy-izpack-dependencies</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>copy-dependencies</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${izpack.staging}/custom</outputDirectory>
                        <excludeTransitive>false</excludeTransitive>
                        <stripVersion>true</stripVersion>
                        <overWriteReleases>true</overWriteReleases>
                        <overWriteSnapshots>true</overWriteSnapshots>
                        <overWriteIfNewer>true</overWriteIfNewer>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.codehaus.izpack</groupId>
            <artifactId>izpack-maven-plugin</artifactId>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>izpack</goal>
                    </goals>
                    <configuration>
                        <!-- base for relative paths in izpack descriptor -->
                        <baseDir>${izpack.staging}</baseDir>
                        <installFile>${basedir}/src/izpack/install.xml</installFile>
                    </configuration>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>org.codehaus.izpack</groupId>
                    <artifactId>izpack-panel</artifactId>
                    <version>${izpack.version}</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>

<dependencies>
    <dependency>
        <groupId>de.projects</groupId>
        <artifactId>project1</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </dependency>
    <dependency>
        <groupId>de.projects</groupId>
        <artifactId>project2</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </dependency>
</dependencies>

<properties>
    <izpack.version>5.0.0-beta11</izpack.version>
    <izpack.staging>${project.build.directory}../../../dist/staging</izpack.staging>
</properties>

继承了install.xml

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<installation version="5.0">
<info>
    <appname>myApp</appname>
    <appversion>1.0</appversion>
    <uninstaller name="Uninstaller.jar" write="yes"/>
    <javaversion>1.7</javaversion>
    <requiresjdk>no</requiresjdk>
    <writeinstallationinformation>yes</writeinstallationinformation>
    <pack200/>
    <run-privileged condition="izpack.windowsinstall.vista|izpack.windowsinstall.7"/>
</info>
<guiprefs height="600" resizable="no" width="800">
    <modifier key="useFlags" value="yes"/>
    <modifier key="langDisplayType" value="default"/>
</guiprefs>
<locale>
    <langpack iso3="eng"/>
</locale>
<panels>
    <panel classname="CheckedHelloPanel"/>
    <panel classname="PacksPanel"/>
    <panel classname="TargetPanel"/>
    <panel classname="InstallPanel"/>
    <panel classname="SimpleFinishPanel"/>
</panels>
<packs>
    <pack name="Data" preselected="yes" required="yes">
        <description/>
        <file override="update"
            src="home\dist\data" targetdir="$INSTALL_PATH/"/>
    </pack>
    <pack name="Libs" preselected="yes" required="yes">
        <description/>
        <file override="update"
            src="home\dist\lib" targetdir="$INSTALL_PATH/"/>
    </pack>
</packs>

1 个答案:

答案 0 :(得分:0)

请尝试在PacksPanel之前在install.xml中放置TargetPanel。原因是PacksPanel的实现需要$ INSTALL_PATH,如果放在之前,TargetPanel将正确提供。

<panel classname="TargetPanel"/>
<panel classname="PacksPanel"/>
相关问题