Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Maven程序集插件编译时发生致命错误:目标版本1.14无效_Java_Maven_Javafx_Maven Assembly Plugin - Fatal编程技术网

Java Maven程序集插件编译时发生致命错误:目标版本1.14无效

Java Maven程序集插件编译时发生致命错误:目标版本1.14无效,java,maven,javafx,maven-assembly-plugin,Java,Maven,Javafx,Maven Assembly Plugin,我想使用maven assembly插件在Intellij中部署我的javafx项目,但每当我尝试这样做时,我都会 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Battlesheet: Fatal error compiling: error: invalid target release: 1.14 -

我想使用maven assembly插件在Intellij中部署我的javafx项目,但每当我尝试这样做时,我都会

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Battlesheet: Fatal error compiling: error: invalid target release: 1.14 -> [Help 1]
结果,。我的pom如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<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>org.Avalon</groupId>
    <artifactId>Battlesheet</artifactId>
    <version>1.0</version>
    <name>Avalon Battlesheet</name>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.14</maven.compiler.source>
        <maven.compiler.target>1.14</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-graphics</artifactId>
            <version>15-ea+6</version>
            <classifier>win</classifier>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-graphics</artifactId>
            <version>15-ea+6</version>
            <classifier>mac</classifier>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-graphics</artifactId>
            <version>15-ea+6</version>
            <classifier>linux</classifier>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>13</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>15-ea+6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>3.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.6</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>0.0.4</version>
                <configuration>
                    <mainClass>assembly.Launcher</mainClass>
                    <launcher>launch.sh</launcher>
                    <compress>2</compress>
                    <jlinkZipName>avalon-battlesheet</jlinkZipName>
                    <jlinkImageName>avalon-battlesheet</jlinkImageName>
                    <noManPages>true</noManPages>
                    <noHeaderFiles>true</noHeaderFiles>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>create-executable</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <outputDirectory>${test.pack.dir}</outputDirectory>
                    <appendAssemblyId>false</appendAssemblyId>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <mainClass>assembly.Launcher</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>



4.0.0
org.Avalon
战场
1
阿瓦隆战场
UTF-8
1.14
1.14
org.openjfx
javafx图形
15 ea+6
赢
org.openjfx
javafx图形
15 ea+6
雨衣
org.openjfx
javafx图形
15 ea+6
linux
org.openjfx
javafx控件
13
org.openjfx
javafx-fxml
15 ea+6
org.apache.maven.plugins
maven编译器插件
3.8.1
org.apache.maven.plugins
maven汇编插件
3.3.0
com.google.code.gson
格森
2.8.6
org.openjfx
javafxmaven插件
0.0.4
装配式发射器
launch.sh
2.
阿瓦隆战场
阿瓦隆战场
真的
真的
maven汇编插件
创建可执行文件
包裹
单一的
${test.pack.dir}
假的
带有依赖项的jar
装配式发射器

我知道像这样的问题已经有很多了,但我读了至少大部分都没有用。我的path和JAVA_HOME都设置为我唯一的JDK(采用OpenJDK 1.14)。我的项目结构应该设置为1.14,无论我在哪里都可以,现在我的知识失败了,为什么它仍然告诉我我有一个无效的目标版本。任何帮助都将不胜感激:)

看起来您正在尝试使用Java14进行构建。前缀(aka
1.
)不再使用,因此请尝试将
1.14
更改为
14

尝试使用maven编译器插件:因为
1.14
确实不是有效的目标。在Java
8
之后,
1.
被删除。Java
1.14
不存在。此外,Maven始终支持
X
语法,而不是
1.X
语法。TL;DR:
14
不是
1.14