java-web - 使用eclipse創(chuàng)建javaweb 項(xiàng)目 maven報(bào)錯(cuò)
問(wèn)題描述
使用eclipse創(chuàng)建 dynamic web project
在將項(xiàng)目轉(zhuǎn)換成maven項(xiàng)目時(shí)保如下錯(cuò)誤
pom文件為eclipse 自動(dòng)生成沒(méi)有改動(dòng) 如下
<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>test</groupId> <artifactId>test</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <build> <sourceDirectory>src</sourceDirectory> <plugins> <plugin><artifactId>maven-compiler-plugin</artifactId><version>3.5.1</version><configuration> <source>1.8</source> <target>1.8</target></configuration> </plugin> <plugin><artifactId>maven-war-plugin</artifactId><version>2.6</version><configuration> <warSourceDirectory>WebContent</warSourceDirectory> <failOnMissingWebXml>false</failOnMissingWebXml></configuration> </plugin> </plugins> </build></project>
目前已經(jīng)試過(guò)以下方法 都不奏效
1.強(qiáng)行update項(xiàng)目,報(bào)錯(cuò)同上
2.刪除.m2/repository下的.lastUpdated文件,clean項(xiàng)目之后 再update
3.將插件版本改為低版本2.0
搜索了好多也沒(méi)有找到答案 ,求高人指點(diǎn)===============settings.xml文件
<settings xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'> <pluginGroups> </pluginGroups> <proxies> </proxies> <servers><server><id>releases</id><username>admin</username><password>admin123</password></server><server><id>snapshots</id><username>admin</username><password>admin123</password></server> </servers> <mirrors><mirror><id>nexus</id><mirrorOf>*</mirrorOf><url>http://192.168.15.1:8080/nexus/content/groups/public/</url></mirror> </mirrors> <profiles><profile><id>nexus</id><repositories><repository> <id>central</id> <url>http://192.168.15.1:8080/nexus/content/repositories/central/</url> <releases><enabled>true</enabled> <!-- <updatePolicy>always</updatePolicy>--> </releases> <snapshots><enabled>true</enabled> <!-- <updatePolicy>always</updatePolicy>--> </snapshots></repository></repositories><pluginRepositories><pluginRepository> <id>central</id> <url>http://192.168.15.1:8080/nexus/content/repositories/central/</url> <releases><enabled>true</enabled> <!-- <updatePolicy>always</updatePolicy>--> </releases> <snapshots><enabled>true</enabled> <!-- <updatePolicy>always</updatePolicy>--> </snapshots></pluginRepository></pluginRepositories></profile> </profiles> <activeProfiles><activeProfile>nexus</activeProfile> </activeProfiles></settings>
nexus頁(yè)面可以進(jìn)入
問(wèn)題解答
回答1:請(qǐng)檢查一下你們自己的nexus (192.168.15.1:8080/nexus) maven庫(kù)代理是否正常工作,確認(rèn)一下nexus上有你需要的插件
相關(guān)文章:
1. docker-compose 為何找不到配置文件?2. boot2docker無(wú)法啟動(dòng)3. docker images顯示的鏡像過(guò)多,狗眼被亮瞎了,怎么辦?4. java中返回一個(gè)對(duì)象,和輸出對(duì)像的值,意義在哪兒5. android - E/dalvikvm: Could not find class java.nio.file.Path,6. python - linux怎么在每天的凌晨2點(diǎn)執(zhí)行一次這個(gè)log.py文件7. android - 哪位大神知道java后臺(tái)的api接口的對(duì)象傳到前端后輸入日期報(bào)錯(cuò),是什么情況?求大神指點(diǎn)8. mysql數(shù)據(jù)庫(kù)每次查詢是一條線程嗎?9. python是怎么實(shí)現(xiàn)過(guò)濾 #注釋代碼的?10. 請(qǐng)問(wèn)一下各位老鳥(niǎo) 我一直在學(xué)習(xí)獨(dú)孤九賤 現(xiàn)在是在tp5 今天發(fā)現(xiàn) 這個(gè)系列視頻沒(méi)有實(shí)戰(zhàn)
