国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

SpringBoot項(xiàng)目編譯報(bào)錯(cuò)——Fatal error compiling:無(wú)效的標(biāo)記: --release -> [Help 1]

這篇具有很好參考價(jià)值的文章主要介紹了SpringBoot項(xiàng)目編譯報(bào)錯(cuò)——Fatal error compiling:無(wú)效的標(biāo)記: --release -> [Help 1]。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

一. 報(bào)錯(cuò)部分代碼如下:

[INFO] --- maven-compiler-plugin:3.11.0:compile (default-compile) @ radiometer-management ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 2 source files with javac [debug release 1.8] to target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.537 s
[INFO] Finished at: 2023-05-30T16:50:46+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project radiometer-management: Fatal error compiling: 無(wú)效的標(biāo)記: --release -> [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/MojoExecutionException

二. 報(bào)錯(cuò)原因排查

首先百度過(guò)之后知道要核查jdk版本。

1.pom.xml引用JDK版本。

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.1.0</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>radiometer-management</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>radiometer-management</name>
    <description>radiometer-management</description>
    <properties>
        <java.version>1.8</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.oscar</groupId>
            <artifactId>oscarJDBC16</artifactId>
            <scope>system</scope>
            <systemPath>${project.basedir}/src/main/resources/lib/oscarJDBC16.jar</systemPath>
            <version>1.0</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
        </plugins>
    </build>

</project>

2.Maven引用的JDK版本

SpringBoot項(xiàng)目編譯報(bào)錯(cuò)——Fatal error compiling:無(wú)效的標(biāo)記: --release -> [Help 1],spring boot,java,spring,數(shù)據(jù)庫(kù)

3.Maven使用的Java版本

SpringBoot項(xiàng)目編譯報(bào)錯(cuò)——Fatal error compiling:無(wú)效的標(biāo)記: --release -> [Help 1],spring boot,java,spring,數(shù)據(jù)庫(kù)

三、發(fā)現(xiàn)項(xiàng)目的pom.xml文件里缺少插件的引用

加入以下代碼。注:source和target要和引用的JDK統(tǒng)一版本,不然會(huì)報(bào)錯(cuò)。

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.3</version>
    <configuration>
        <source>1.8</source>
        <target>1.8</target>
        <verbose>true</verbose>
    </configuration>
</plugin>

四、重新編譯項(xiàng)目,還是報(bào)錯(cuò)

主要錯(cuò)誤如下所示:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project radiometer-management: Fatal error compiling: 無(wú)效的標(biāo)記: --release -> [Help 1]

淦!設(shè)置了一圈怎么報(bào)錯(cuò)還是不變,這時(shí)候已經(jīng)過(guò)去2小時(shí),快崩潰了。期間經(jīng)歷了clean、reload,依然報(bào)同一個(gè)錯(cuò)誤。網(wǎng)上的各種方法都試了。版本的統(tǒng)一也檢查了800遍就是運(yùn)行不成功。最后懷疑是不是某個(gè)版本號(hào)太高了,和JDK8不兼容,把

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.1.0</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

里的3.1.0改成了2.7.3。點(diǎn)擊reload project。重新運(yùn)行項(xiàng)目,希望這次不會(huì)出錯(cuò)了呀!

五、終于

還是報(bào)錯(cuò)?。?!只不過(guò)這次換了個(gè)錯(cuò)誤,表示真的是因?yàn)榍懊嬉玫陌姹咎?hào)太高了導(dǎo)致上一個(gè)錯(cuò)誤。新的錯(cuò)誤是什么呢?

org/springframework/boot/maven/RepackageMojo has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

?這是什么鬼,讓我們翻譯一下:

org/springframework/boot/maven/RepackageMojo是由較新版本的Java Runtime(類文件版本61.0)編譯的,該版本的Java運(yùn)行時(shí)只能識(shí)別52.0以下的類文件版本

沒(méi)辦法了,距離成功只差一步,繼續(xù)善用網(wǎng)絡(luò)。先是查詢了錯(cuò)誤中提到的類文件版本61.0,發(fā)現(xiàn)一個(gè)對(duì)應(yīng)關(guān)系如下表:

49 = Java 5
50 = Java 6
51 = Java 7
52 = Java 8
53 = Java 9
54 = Java 10
55 = Java 11
56 = Java 12
57 = Java 13
58 = Java 14

由此可以推斷出編譯時(shí)用到的類文件版本61對(duì)應(yīng)的是Java 17,可是系統(tǒng)中只識(shí)別到了Java8,可是我也沒(méi)設(shè)置過(guò)Java17呀,為什么用這個(gè)版本編譯?
終于發(fā)現(xiàn)是因?yàn)橹坝玫膕pring-boot版本太高了,也需要修改。

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <version>2.3.3.RELEASE</version>
</plugin>

將3.1.0降為2.3.3.RELEASE。點(diǎn)擊右側(cè)Maven—Lifecycle—clean。
右擊項(xiàng)目,選擇Maven—Reload project。等待下載2.3.3版本。完成后重新運(yùn)行項(xiàng)目——成功?。?!
SpringBoot項(xiàng)目編譯報(bào)錯(cuò)——Fatal error compiling:無(wú)效的標(biāo)記: --release -> [Help 1],spring boot,java,spring,數(shù)據(jù)庫(kù)文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-594779.html

到了這里,關(guān)于SpringBoot項(xiàng)目編譯報(bào)錯(cuò)——Fatal error compiling:無(wú)效的標(biāo)記: --release -> [Help 1]的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • QT使用MSVC編譯器報(bào)錯(cuò):Project ERROR: Cannot run compiler ‘cl‘以及后續(xù)問(wèn)題解決

    QT使用MSVC編譯器報(bào)錯(cuò):Project ERROR: Cannot run compiler ‘cl‘以及后續(xù)問(wèn)題解決

    記錄一次qtcreator工程使用MSVC創(chuàng)建報(bào)錯(cuò)“ Project ERROR: Cannot run compiler ‘cl’ ”,沒(méi)辦法運(yùn)行編譯器cl。 只顯示 qmake配置文件 不出現(xiàn)工程文件, 在qtcreator安裝目錄下的MSVC2017確實(shí)并未找到cl.exe文件,于是下載了everything搜索軟件,在電腦上找到了VSstudio的安裝目錄下MSVC2017編譯器下

    2024年02月05日
    瀏覽(32)
  • springboot項(xiàng)目編譯提示無(wú)效的源發(fā)行版17解決

    springboot項(xiàng)目編譯提示無(wú)效的源發(fā)行版17解決

    說(shuō)明:本地機(jī)版本jdk為1.8,編碼項(xiàng)目的時(shí)候提示無(wú)效的源發(fā)行版17。 1.修改項(xiàng)目設(shè)置:jdk版本為8 ? ? 2.修改系統(tǒng)設(shè)置 3.pom檢查是否jdk版本為1.8 如上修改完成后應(yīng)該會(huì)解決問(wèn)題,但是我本地還是報(bào)如此錯(cuò)誤。然后檢查一圈下來(lái),我默認(rèn)創(chuàng)建的spring版本為3.0,而3.0的默認(rèn)依賴jd

    2024年02月11日
    瀏覽(30)
  • 【RUST】mac m1編譯rust項(xiàng)目失?。?could not compile `` due to previous error

    2.1 查看clang: 結(jié)果如下: 2.2 查看llvm-ar: 結(jié)果如下: 2.3 如果沒(méi)有安裝llvm-ar,安裝命令如下: 2.4 查看是否安裝成功命令: 結(jié)果如下: 2.5 重新執(zhí)行cargo 命令: 執(zhí)行cargo clean: 執(zhí)行一次帶AR參數(shù)的cargo命令(本人執(zhí)行一次就好了): 如果沒(méi)有沒(méi)有報(bào)錯(cuò), 后續(xù)就可以使用正常的

    2024年02月07日
    瀏覽(22)
  • LLVM編譯報(bào)錯(cuò)解決:collect2: fatal error: ld terminated with signal 9 [Killed]

    克隆代碼到本地 配置編譯選項(xiàng) generator一般使用Ninja,而 options 中必須要傳入的參數(shù)是構(gòu)建類型 CMAKE_BUILD_TYPE 不同的CMAKE_BUILD_TYPE區(qū)別如下: Build Type Optimization Debug Info Assertion Release For Speed No No Debug None Yes Yes RelWithDebInfo For Speed Yes No MinSizeRel For Size No No Release適合LLVM和Clang的用戶

    2024年02月11日
    瀏覽(22)
  • idea編譯maven項(xiàng)目報(bào)錯(cuò):Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile

    創(chuàng)建了一個(gè)maven工程,編譯時(shí)報(bào)錯(cuò) Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project mybatisplus: Fatal error compiling: 無(wú)效的標(biāo)記: --release - [Help 1] 項(xiàng)目中maven-plugin版本不匹配。我的IDEA版本2023.2.3,JDK版本為1.8.我是把自己的maven版本降低到3.5.1,編

    2024年02月05日
    瀏覽(93)
  • fatal error: linux/compiler-gcc9.h: No such file or directory

    fatal error: linux/compiler-gcc9.h: No such file or directory

    linux 找到README文件 mzh@DESKTOP-GITL67P:~$ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. ?There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ? 因?yàn)楫?dāng)前gcc版本是9.x, 找不到 compiler-gcc

    2024年02月09日
    瀏覽(23)
  • UE4/5關(guān)于數(shù)字人MetaHuman打包項(xiàng)目后,打開(kāi)游戲發(fā)生的關(guān)于Assertion failed: CastResult或者fatal error報(bào)錯(cuò)

    目錄 筆者的打包經(jīng)歷 該方法不一定成功,但總得試試。 解決方法: 本來(lái)筆者因?yàn)楦鞣N各樣的盜版原因,打算將本文放置在VIP的,但考慮到廣大人士可能和筆者一樣發(fā)生這種問(wèn)題而無(wú)法解決,便決定還是開(kāi)把傘。 Assertion failed: CastResult或者fatal error的報(bào)錯(cuò)是在打包成功后,再

    2024年02月15日
    瀏覽(31)
  • 合約編譯solc.compile()時(shí)報(bào)錯(cuò)‘{“errors”:[{“component”:“general”,“formattedMessag

    1.首先編譯腳本是: 此時(shí)輸出 compileResult會(huì)報(bào)錯(cuò): ‘{“errors”:[{“component”:“general”,“formattedMessage”:\\\"* Line 1, Column 2n Syntax error: value, object or array expected.n* Line 1, Column 3n Extra non-whitespace after JSON value.n\\\",“message”:\\\"* Line 1, Column 2n Syntax error: value, object or array expected.n* Lin

    2024年02月10日
    瀏覽(20)
  • SpringBoot 的項(xiàng)目編譯即報(bào)錯(cuò)處理--SB系列之001

    SpringBoot 的項(xiàng)目編譯即報(bào)錯(cuò)處理--SB系列之001

    ? SpringBoot知識(shí)范圍-學(xué)習(xí)步驟【JSB系列之000】 ---總目錄 SpringBoot 的項(xiàng)目編譯即報(bào)錯(cuò)處理--JSB系列之001 SpringBoot 的項(xiàng)目helloworld--JSB系列之002 SpringBoot 的配置類--JSB系列之003 SpringBoot 的項(xiàng)目如何運(yùn)行--JSB系列之004 SpringBoot操作數(shù)據(jù)庫(kù)JdbcTemplate--JSB系列之005 SpringBoot操作數(shù)據(jù)庫(kù)jpa--JSB系

    2024年02月16日
    瀏覽(18)
  • SpringBoot 的項(xiàng)目編譯即報(bào)錯(cuò)處理--JSB系列之001

    SpringBoot 的項(xiàng)目編譯即報(bào)錯(cuò)處理--JSB系列之001

    ? SpringBoot知識(shí)范圍-學(xué)習(xí)步驟【JSB系列之000】 ---總目錄 SpringBoot 的項(xiàng)目編譯即報(bào)錯(cuò)處理--JSB系列之001 SpringBoot 的項(xiàng)目helloworld--JSB系列之002 SpringBoot 的配置類--JSB系列之003 SpringBoot 的項(xiàng)目如何運(yùn)行--JSB系列之004 SpringBoot操作數(shù)據(jù)庫(kù)JdbcTemplate--JSB系列之005 SpringBoot操作數(shù)據(jù)庫(kù)jpa--JSB系

    2024年02月16日
    瀏覽(14)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包