如何将自定义*.ISS与javafx ant、maven和INNO一起使用?
我正在尝试使用maven、inno和javafx ant为我的应用程序创建一个自定义安装程序。我已经看过这个链接,但我似乎没有得到描述的结果 我已成功创建安装程序,并已成功安装应用程序。但是,它总是转到user/AppData/Local/。我在自定义的*.iss文件中对其进行了如下更改:如何将自定义*.ISS与javafx ant、maven和INNO一起使用?,ant,maven-3,javafx-8,inno-setup,Ant,Maven 3,Javafx 8,Inno Setup,我正在尝试使用maven、inno和javafx ant为我的应用程序创建一个自定义安装程序。我已经看过这个链接,但我似乎没有得到描述的结果 我已成功创建安装程序,并已成功安装应用程序。但是,它总是转到user/AppData/Local/。我在自定义的*.iss文件中对其进行了如下更改: DefaultDirName={pf}\cashreceipts UsePreviousAppDir=No Uninstallable=yes 但是,在生成过程中不会拾取此文件。我已经在src/main/d
DefaultDirName={pf}\cashreceipts
UsePreviousAppDir=No
Uninstallable=yes
但是,在生成过程中不会拾取此文件。我已经在src/main/deploy/package/windows/application-name.iss中添加了所需的application-name.iss文件,但是它没有被接收
我不知道还有什么可以让这个文件在我的构建中使用
谢谢
以下是构建步骤的maven配置
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>package</phase>
<configuration>
<target>
<!-- define the deploy ANT task -->
<taskdef name="jfxdeploy"
classname="com.sun.javafx.tools.ant.DeployFXTask"
classpathref="maven.plugin.classpath" />
<!-- define the JarSing ANT task -->
<!-- taskdef name="jfxsignjar"
classname="com.sun.javafx.tools.ant.FXSignJarTask"
classpathref="maven.plugin.classpath" / -->
<jfxdeploy outdir="${project.build.directory}/deploy"
outfile="${project.build.finalName}" nativeBundles="all"
verbose="true">
<info title="${project.name}" />
<!-- set the main class of your applcation -->
<application name="${project.name}"
mainClass="com.mycompany.myclass" />
<resources>
<fileset dir="${project.build.directory}"
includes="*.jar" />
<fileset dir="${project.build.directory}/dependency"
includes="*.jar" />
<fileset dir="${project.build.directory}"
includes="properties/*.properties"/>
</resources>
<!-- set your jvm args -->
<platform>
<jvmarg value="-Xms512m" />
<jvmarg value="-Xmx1024m" />
</platform>
</jfxdeploy>
<!-- you need to generate a key yourself -->
<!--jfxsignjar destdir="${project.build.directory}/deploy"
keyStore="path/to/your/keystore" storePass="yourPass"
alias="yourAlias" keyPass="keyPass">
<fileset dir="${project.build.directory}/deploy"
includes="*.jar" /> </jfxsignjar -->
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ant-javafx</artifactId>
<version>${javafx.version}</version>
<systemPath>${java.home}/../lib/ant-javafx.jar</systemPath>
<scope>system</scope>
</dependency>
</dependencies>
</plugin>
</plugins>
<finalName>cashreceipts</finalName>
</build>
org.apache.maven.plugins
maven antrun插件
1.7
包裹
跑
com.oracle
AntJavaFX
${javafx.version}
${java.home}/./lib/ant-javafx.jar
系统
现金收入
我能够确认ZENJAVA插件仍在开发中,github支持ZENJAVA插件,它可以实现这一点。资料如下:
我更新的pom.xml如下所示:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>myapp</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>myapp</name>
<url>http://www.mycompany.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<javafx.version>8.0</javafx.version>
</properties>
<repositories>
<repository>
<id>repo</id>
<url>file://${project.basedir}/lib/repo</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<!-- new SNAPSHOT version needed to work with current JavaFX Version -->
<id>com.zenjava</id>
<url>file://C:\Users\username\Desktop\maven fx plugin\javafx-maven-plugin-master\javafx-maven-plugin-master\target</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<!-- copy all dependencies of your app to target folder -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<configuration>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<archive>
<manifestEntries>
<Main-Class>com.mycompany.app.MyApp</Main-Class>
<implementation-version>1.0</implementation-version>
<JavaFX-Application-Class>com.mycompany.app.MyApp</JavaFX-Application-Class>
</manifestEntries>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
<!-- copy the properties files to the root location -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources-1</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/additionalResources/properties</outputDirectory>
<resources>
<resource>
<directory>properties</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.1.3-SNAPSHOT</version>
<configuration>
<mainClass>com.mycompany.app.MyApp</mainClass>
<verbose>true</verbose>
<bundler>EXE</bundler>
<additionalAppResources>${project.build.directory}/additionalResources</additionalAppResources>
</configuration>
<executions>
<!-- required before build-native -->
<execution>
<id>create-jfxjar</id>
<phase>package</phase>
<goals>
<goal>build-jar</goal>
</goals>
</execution>
<execution>
<id>create-native</id>
<phase>package</phase>
<goals>
<goal>build-native</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>myapp</finalName>
</build>
<dependencies>
<dependency>
<groupId>org.controlsfx</groupId>
<artifactId>controlsfx</artifactId>
<version>8.40.9</version>
</dependency>
<dependency>
<groupId>customjar</groupId>
<artifactId>mycustomjar</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<organization>
<name>My Company</name>
<url>www.mycompany.com</url>
</organization>
4.0.0
com.mycompany
myapp
罐子
1.0-快照
myapp
http://www.mycompany.com
UTF-8
1.8
1.8
8
回购
文件://${project.basedir}/lib/repo
com.zenjava
文件://C:\Users\username\Desktop\maven fx plugin\javafx maven plugin master\javafx maven plugin master\target
org.apache.maven.plugins
maven编译器插件
3.3
${maven.compiler.source}
${maven.compiler.target}
org.apache.maven.plugins
maven依赖插件
2.3
复制依赖项
包裹
假的
假的
真的
复制依赖项
org.apache.maven.plugins
maven jar插件
2.6
com.mycompany.app.MyApp
1
com.mycompany.app.MyApp
真的
maven资源插件
2.6
复制资源-1
验证
复制资源
${basedir}/target/additionalResources/properties
性质
真的
com.zenjava
javafxmaven插件
8.1.3-快照
com.mycompany.app.MyApp
真的
EXE
${project.build.directory}/additionalResources
创建jfxjar
包裹
构建jar
创建本地
包裹
构建本地
myapp
org.controlsfx
controlsfx
8.40.9
海关总署
mycustomjar
1
我的公司
www.mycompany.com