大战熟女丰满人妻av-荡女精品导航-岛国aaaa级午夜福利片-岛国av动作片在线观看-岛国av无码免费无禁网站-岛国大片激情做爰视频

專注Java教育14年 全國咨詢/投訴熱線:400-8080-105
動力節點LOGO圖
始于2009,口口相傳的Java黃埔軍校
首頁 hot資訊 常見的Maven報錯原因及解決方案

常見的Maven報錯原因及解決方案

更新時間:2021-10-13 11:13:19 來源:動力節點 瀏覽5284次

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

解決方法

問題是將JRE作為JDK使用了,解決辦法是安裝JDK,并將JDK設置到Installed JREs中

圖示

錯誤堆棧

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project hibernate: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [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/MojoFailureException

Failed to transfer http://xx.xx. Error code 400, Repository version policy: RELEASE does not allow metadata in path: cn/blueboz/train/hibernate/0.0.1-SNAPSHOT/maven-metadata.xml -> [Help 1]

問題原因

如果是deploy 出現問題,那么可能是因為將部署路徑寫錯,如本例子,錯誤在于將SNAPSHOT版本寫成RELEASE版本

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project hibernate: Failed to retrieve remote metadata cn.blueboz.train:hibernate:0.0.1-SNAPSHOT/maven-metadata.xml: Could not transfer metadata cn.blueboz.train:hibernate:0.0.1-SNAPSHOT/maven-metadata.xml from/to blueboz-snapshots (http://bluebozpc:8081/repository/maven-releases): Failed to transfer http://bluebozpc:8081/repository/maven-releases/cn/blueboz/train/hibernate/0.0.1-SNAPSHOT/maven-metadata.xml. Error code 400, Repository version policy: RELEASE does not allow metadata in path: cn/blueboz/train/hibernate/0.0.1-SNAPSHOT/maven-metadata.xml -> [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

#

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project hibernate: Failed to deploy artifacts: Could not transfer artifact cn.blueboz.train:hibernate:jar:0.0.1-20170319.142156-1 from/to blueboz-snapshots (http://bluebozpc:8081/repository/maven-snapshots): Access denied to http://bluebozpc:8081/repository/maven-snapshots/cn/blueboz/train/hibernate/0.0.1-SNAPSHOT/hibernate-0.0.1-20170319.142156-1.jar. Error code 401, Unauthorized -> [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

新建項目卡頓問題

maven 的配置設置為offline,離線更新就可以了

Fail to transfer …錯誤

Failure to transfer 
    org.codehaus.plexus:plexus-archiver:jar:3.4
    was cached in the local repository, 
    resolution will not be reattempted until 
    the update interval of [Bsdn] has elapsed or updates are forced. 
    Original error: 
         org.codehaus.plexus:plexus-archiver:jar:3.4 
    Bsdn (http://nexus.bsdn.org/content/groups/public/):
    No response received after 60000

一般是因為nexus 私服鏈接超時,建議直接換一個私服即可,在用戶路徑下的setting中,修改成aliyun的私服

 <mirror>
  <id>Alibaba</id>
  <mirrorOf>central</mirrorOf>
  <name>AliyunMaven</name>
  <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>

實在不行的話,根據GAV,定位到本地緩存目錄,將

\M2_HOME.m2\repository\org\codehaus\plexus\plexus-archiver\3.4

目錄下的資源刪掉,重新UpdateProject即可

Update Project 的時候變成J2SE1.4

這個問題,網上提供了兩種方案先給出代碼,如果嘗試了之后發現可以的話,請按照這種方式解決。如果還是不行,請看我的第三種終極解決方案

1.解決方法一

$HOME目錄下的.m2目錄下的settings.xml文件的profiles節點下添加如下信息。Jdk版本

<profile>   
    <id>jdk1.8</id>    
    <activation>   
        <activeByDefault>true</activeByDefault>    
        <jdk>1.8</jdk>   
    </activation>    
    <properties>   
        <maven.compiler.source>1.8</maven.compiler.source>    
        <maven.compiler.target>1.8</maven.compiler.target>    
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>   
    </properties>   
</profile>

2.解決方法二

在 build->pluginManager下添加,或修改maven-compiler-plugin的默認配置信息

<plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.7.0</version>
    <configuration>
        <source>1.8</source>
        <target>1.8</target>
    </configuration>
</plugin>

3.更新插件方法

必須前面兩個方法都嘗試了之后,還是無效的情況下。才可以。這時候,你必須考慮是不是你的IDE的問題了。筆者使用的是EclipseKepler版本,最高支持Jdk7。

點擊進入EclipseMarketPlace,輸入Maven

JavaTm 8 support for m2e for Eclipse Kepler SR2 ,安裝就可以了,建議還是翻墻安裝快些

提交申請后,顧問老師會電話與您溝通安排學習

免費課程推薦 >>
技術文檔推薦 >>
主站蜘蛛池模板: 亚欧精品在线观看 | 国产亚洲精品一区二区在线播放 | 九色视频极品论坛区 | 色噜噜国产精品视频一区二区 | 女胁师~牝奴隷调教 | 青青青国产免费全部免费观看 | 欧美日韩中文字幕在线手机版本 | 午夜撸 | 四虎影视库国产精品一区 | 在线视频一区二区三区 | 久久er99热精品一区二区 | 亚洲欧美国产精品 | 国产亚洲精品一区二区久久 | 午夜影院操 | 波多野结衣三区 | 国产精品久久久久久久久kt | 四虎永久在线精品免费影视 | 天天舔天天操天天干 | 亚洲欧洲第一页 | 国产永久一区二区三区 | 四虎影视在线影院www | 日本a免费观看 | 欧美视频在线观在线看 | 99热久久国产精品免费观看 | 99热久久精品国产 | 久久久久亚洲精品一区二区三区 | 好吊妞视频在线观看 | 一级特黄特交牲大片 | 国产精品久久久亚洲第一牛牛 | 天天尻逼 | 五月天激情视频 | 天堂一区二区在线观看 | 99热热久久这里只有精品8 | 奇米影视111 | 国产精品公开免费视频 | 久久精品国产久精国产 | 一级做受毛片免费大片 | 天天干一干 | 在线观看视频亚洲 | 桃色视频网 | 人人模人人干 |