简体   繁体   中英

javafx-maven-plugin Updates Wrong Folder

There are two different javafx applications using javafx-maven-plugin to generate native windows installer. In both applications the installers are generated and can be seen at target\\jfx\\native .

When the first app installer setup installation process is started, setup shows files are copied in C:\\Users\\Yunus\\AppData\\Local\\CooperativeERP .

The problem is when the second application installation process is started it goes to the same folder and updates some files which makes first app installed unusable.

Plugin Maven XML is as follows:

       <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>

What should i do to make the two setup install as different application and not to get to each others way.

Found out that zen java maven plugin uses a Main class package as unique identifier for application, and in this particular case both application had the same package name.

Changing package for one application solved my problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM