javafx-maven-plugin / javafx-maven-plugin

Maven plugin for JavaFX
https://zenjava.net/javafx-maven-plugin/
838 stars 136 forks source link

There was a mistake when I was maven install, but maven install success,why?and how to fix, #357

Closed whsgzcy closed 6 years ago

whsgzcy commented 6 years ago

Dear author,

log:
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.loongman.app:ATRServer:jar:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.jfoenix:jfoenix:jar -> version 9.0.4 vs 8.0.4 @ line 72, column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building ATRServer 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ ATRServer ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 18 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ ATRServer ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ ATRServer ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory E:\workspace1\ATRServer\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ ATRServer ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ ATRServer ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ ATRServer ---
[INFO] 
[INFO] --- javafx-maven-plugin:8.8.3:build-jar (create-jfxjar) @ ATRServer ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.689 s
[INFO] Finished at: 2018-09-09T15:01:13+08:00
[INFO] Final Memory: 12M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:8.8.3:build-jar (create-jfxjar) on project ATRServer: Execution create-jfxjar of goal com.zenjava:javafx-maven-plugin:8.8.3:build-jar failed: Plugin com.zenjava:javafx-maven-plugin:8.8.3 or one of its dependencies could not be resolved: Could not find artifact javafx-packager:javafx-packager:jar:1.8.0_20 at specified path C:\Program Files\Java\jre1.8.0_181/../lib/ant-javafx.jar -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.loongman.app</groupId>
    <artifactId>ATRServer</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.zenjava</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>8.8.3</version>
                <configuration>
                    <vendor>Forschungszentrum Juelich GmbH</vendor>
                    <mainClass>com.loongman.app.LoginActivity</mainClass>
                </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>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.squareup.retrofit2</groupId>
            <artifactId>retrofit</artifactId>
            <version>2.4.0</version>
        </dependency>

        <dependency>
            <groupId>com.squareup.retrofit2</groupId>
            <artifactId>converter-gson</artifactId>
            <version>2.4.0</version>
        </dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.5</version>
        </dependency>

        <dependency>
            <groupId>com.jfoenix</groupId>
            <artifactId>jfoenix</artifactId>
            <version>9.0.4</version>
        </dependency>

        <dependency>
            <groupId>com.jfoenix</groupId>
            <artifactId>jfoenix</artifactId>
            <version>8.0.4</version>
        </dependency>
    </dependencies>
</project>
FibreFoX commented 6 years ago

Which JDK are you using? The plugin version 8.8.3 only supports JDK8.

whsgzcy commented 6 years ago

dear author, my jdk is 1.8.0_181,

FibreFoX commented 6 years ago

Are you using OracleJDK or OpenJDK?

whsgzcy commented 6 years ago

Dear author,I downloaded it from the official website,I maven install fine on my MacBook, my mac jdk is 1.8.0_121 and on my another computer(A) jdk is 1.8.0_31 it was maven install success, My computer(B) since Chinese settings bold can not work,so I changed this version(1.8.0_181 unable to set),This could be jdk's own bug.thank you for your help.