日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Plugin org.apache.maven.plugins:maven-resources-plugin:2.6

發布時間:2023/12/10 编程问答 43 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

創建maven project時工程報錯
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to nexus (http://localhost:8080/nexus-2.7.0-06/content/groups/public/): Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect -> [Help 1]

方法一:網上有很多人說以下方法可行

1.打開maven根目錄里的config并打開settings.xml找到本地倉庫位置即<localRepository>F:/taotao/repository</localRepository>

2.打開F:\taotao\repository\org\apache\maven\plugins清空里面的plugins

3.右鍵maven工程->run as->maven install

方法二:

1.打開maven根目錄里的config并打開settings.xml添加

?? ???? <mirror>? ?
??????????? <id>Central</id>? ?
??????????? <url>http://repo1.maven.org/maven2</url>? ?
??????????? <mirrorOf>central</mirrorOf>? ?
??????? </mirror>?

2.打開F:\taotao\repository\org\apache\maven\plugins清空里面的plugins

3.右鍵maven工程->run as->maven install,此時將會下載大部分plugins,但是又出現了以下問題
Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project itcast-usemanage: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]

4-1.項目中有web.xml,則在pom.xml的<build>節點上加上maven-war-plugin配置

<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>3.0.0</version> <configuration> <webResources> <resource> <directory>WebContent</directory> </resource> </webResources> </configuration> </plugin> </plugins>

?

4-2.項目中有web.xml,則在pom.xml的<build>節點上加上maven-war-plugin配置

<plugins>? ????<plugin>? ????????<groupId>org.apache.maven.plugins</groupId>? ????????<artifactId>maven-war-plugin</artifactId>? ????????<version>3.0.0</version>? ????????<configuration>? ????????????<failOnMissingWebXml>false</failOnMissingWebXml>? ????????</configuration>? ????</plugin>? </plugins>? 5.右鍵maven工程->run as->maven install,成功解決問題

方法三:

1.windows->preferences->maven->lifecycle mapping找到里面的mapping file location

地址為:D:/itcast-workspace/.metadata/.plugins/org.eclipse.m2e.core/lifecycle-mapping-metadata.xml

當我們打開的時候發現招不到這個路徑

2.打開eclipses的根目錄打開plugins找到名為org.eclipse.m2e.lifecyclemapping.defaults_1.5.0.20140606-0033.jar的包

3.解壓步驟2中的jar包至步驟1中的mapping file location并打開lifecycle-mapping-metadata.xml

4.如缺少maven-compiler-plugin就添加其配置
??? <pluginExecution>
????? <pluginExecutionFilter>
??????? <groupId>org.apache.maven.plugins</groupId>
??????? <artifactId>maven-compiler-plugin</artifactId>
??????? <versionRange>[2.5.1,)</versionRange>
??????? <goals>
????????? <goal>testCompile</goal>
????????? <goal>compile</goal>
??????? </goals>
????? </pluginExecutionFilter>
????? <action>
??????? <ignore/>
????? </action>
??? </pluginExecution>

5.windows->preferences->maven中將update maven projects on startup勾上

6.右鍵項目->maven->update projects

?

轉載于:https://www.cnblogs.com/moaiwa/p/8143067.html

總結

以上是生活随笔為你收集整理的Plugin org.apache.maven.plugins:maven-resources-plugin:2.6的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。