我使用Maven和我的java項目之一的izpack-maven插件。izpack安裝jar只在一個以「izpack」開頭的文件夾中工作
我的izpack文件位於$ {basedir}/izpack中。
我install.xml文件是在$ {BASEDIR}/SRC /主/過濾器,並在包裝中相
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/filter</directory>
<targetPath>${basedir}/izpack</targetPath>
<includes>
<include>install.xml</include>
</includes>
</resource>
</resources>
該插件在pluginManagement
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>5.0.0-beta6</version>
</plugin>
該插件被過濾構建
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<configuration>
<installFile>${basedir}/izpack/install.xml</installFile>
<baseDir>${basedir}/izpack</baseDir>
<installerType>standard</installerType>
</configuration>
</plugin>
我的install.xml文件退出簡單(只有一個包收集3個罐子)
當我運行目標izpack:izpack時,一切看起來都很好。
問題是生成的安裝jar只能在名稱以「izpack」開頭的文件夾中運行。 案例1:罐子不在 「的IzPack *」 文件夾 - 雙擊什麼都不做 - 爪哇 - 罐子返回此
Exception in thread "AWT-EventQueue-0" com.izforge.izpack.api.exception.IzPackException: com.izforge.izpack.api.exception.MergeException: Could not find class TargetPanel : Current classpath is at com.izforge.izpack.installer.bootstrap.InstallerGui$1.run(InstallerGui.java:57)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.izforge.izpack.api.exception.MergeException: Could not find class TargetPanel : Current classpath is
at com.izforge.izpack.merge.resolve.ClassPathCrawler.searchClassInClassPath(ClassPathCrawler.java:125)
at com.izforge.izpack.installer.manager.PanelManager.loadPanelsInContainer(PanelManager.java:72)
at com.izforge.izpack.installer.base.InstallerController.preloadInstaller(InstallerController.java:30)
at com.izforge.izpack.installer.bootstrap.InstallerGui$1.run(InstallerGui.java:50)
... 8 more
案例2:罐子在 「的IzPack *」 文件夾 - 雙擊normaly運行
有什麼想法?
謝謝。
在5.0版上沒有爲我做這項工作 – 2016-04-11 12:24:30