【问题标题】:javafx-maven-plugin Updates Wrong Folderjavafx-maven-plugin 更新错误的文件夹
【发布时间】:2018-01-30 09:06:00
【问题描述】:

有两个不同的 javafx 应用程序使用javafx-maven-plugin 来生成本机 Windows 安装程序。在这两个应用程序中都会生成安装程序,并且可以在 target\jfx\native 上查看。

当第一个应用安装程序安装程序启动时,安装程​​序显示文件被复制到C:\Users\Yunus\AppData\Local\CooperativeERP

问题是当第二个应用程序安装过程开始时,它会进入同一个文件夹并更新一些文件,这使得第一个应用程序安装不可用。

插件MavenXML如下:

       <plugin>
            <groupId>com.zenjava</groupId>
            <artifactId>javafx-maven-plugin</artifactId>
            <version>8.6.0</version>
            <configuration>
                <mainClass>re.iprocu.coperativeerp.MainApp</mainClass>

                <bundleArguments>
                    <licenseFile>termsOfService.rtf</licenseFile>
                </bundleArguments>
                <additionalAppResources>src/main/additionalAppResources</additionalAppResources><!-- name does not matter, it's just some folder :D -->
                <!-- DO SHOW DEBUG-OUTPUT -->
                <verbose>true</verbose>
            </configuration>
            <executions>
                <execution>
                    <!-- required before build-native -->
                    <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>

我应该怎么做才能使这两个安装程序安装为不同的应用程序而不是相互访问。

【问题讨论】:

    标签: java javafx-8 maven-plugin


    【解决方案1】:

    发现 zen java maven 插件使用 Main 类包作为应用程序的唯一标识符,在这种特殊情况下,两个应用程序具有相同的包名。

    为一个应用程序更改包解决了我的问题。

    【讨论】:

      猜你喜欢
      • 2019-08-09
      • 1970-01-01
      • 2018-12-25
      • 2017-09-23
      • 1970-01-01
      • 2017-06-15
      • 2021-11-11
      • 2017-11-15
      • 1970-01-01
      相关资源
      最近更新 更多