Eclipse使用Maven创建Web时错误:Could not resolve archetype

合集下载

java web报错怎么解决

java web报错怎么解决

java web报错怎么解决
1.查看错误消息:打开应用程序的日志文件并查看错误消息,
可以帮助您确定发生了什么错误。

在错误消息中,确定错误发生的时间、位置和原因。

2.检查代码:检查应用程序代码中可能引起错误的部分。

试着
复制触发错误的代码段,并在本地运行它,查看它是否可以正常工作。

确保代码段没有任何语法错误、拼写错误或逻辑错误。

3.检查配置:检查应用程序的配置文件是否正确,包括数据库
连接、端口号和证书等。

如果是单个应用程序内的错误,则检查相关的配置文件是否具有正确的属性和值。

4.升级库和框架:如果错误是由库和框架造成的,则升级和更
新库和框架。

5.寻求帮助:如果您仍然无法解决问题,请在旁边寻求帮助。

可以去在线论坛或者问答社区上发布问题,并等待其他开发人员或社区成员的帮助。

Eclipse出错及解决方法集

Eclipse出错及解决方法集

va/lang/String;)V
Caused
by:
ng.NoSuchMethodError:
org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Lja
value="/WEB-INF/classes/applicationContext.xml" /> </plug-in>
解决问题: property="contextConfigLocation" ――――――――――――――――――――――――――――――――――――――― ――――――
二:HTTP Status 500 - No action instance for path
就 Apache 所提供的基本对象池。
解决问题: 到 这 里 /downloads/download_pool.cgi 下 载 包 , 然 后 , 把 里 面 的 commons-pool-x.jar 复制到 myEclipse 的 Referenced Libraries 下. ――――――――――――――――――――――――――――――――――――――― ―――――――
三:action: null Error creating bean with name 'dataSource'
提示错误: 严重: action: null org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is ng.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool Caused by: ng.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool

maven常见问题汇总专题

maven常见问题汇总专题

maven常见问题汇总专题child module ….pom.xml does not exista.注意module的名称是否正确,有时候命名问题会导致找不到项⽬的b.注意⼀开始项⽬命名的规则问题注意⼀开始项⽬命名的规则问题报错信息:[INFO][INFO] --- maven-assembly-plugin:2.6:single (app) @ api ---[INFO] Reading assembly descriptor: src/assembly/assembly.xml[ERROR] OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /bin[ERROR] OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /lib[INFO] Building tar: F:\project\workspace\com\api\target\com-app.tar.gz[ERROR] OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /bin[ERROR] OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /lib[INFO] Building zip: F:\project\workspace\com\api\target\com-app.zip解决办法:The working solution is to specify the empty outputDirectory:<fileSets><fileSet><directory>${basedir}/src/main/resources</directory><outputDirectory></outputDirectory></fileSet></fileSets>有错误产⽣的assembly.xml<assembly xmlns="/ASSEMBLY/2.0.0"xmlns:xsi="/2001/XMLSchema-instance"xsi:schemaLocation="/ASSEMBLY/2.0.0 /xsd/assembly-2.0.0.xsd"><id>app</id><formats><format>tar.gz</format><format>zip</format></formats><includeBaseDirectory>false</includeBaseDirectory><fileSets><fileSet><directory>${project.build.directory}/bin</directory><outputDirectory>/bin</outputDirectory></fileSet><fileSet><directory>${project.build.directory}</directory><includes><include>*.jar</include></includes><excludes><exclude>*sources.jar</exclude></excludes><outputDirectory>/lib</outputDirectory></fileSet></fileSets></assembly>https:///questions/28500401/maven-assembly-plugin-warning-the-assembly-descriptor-contains-a-filesystem-roo 使⽤maven-compiler-plugin 时POM⽂件如下:<plugins><plugin><artifactId>maven-compiler-plugin</artifactId><configuration><source>1.6</source><target>1.6</target><encoding>UTF-8</encoding></configuration></plugin></plugins>[WARNING] Some problems were encountered while building the effective model for com.xxx.xxx:xxxx:jar:0.0.1-SNAPSHOT[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 72, column 12修改后如下,OK了<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.6.1</version><configuration><source>1.6</source><target>1.6</target></configuration></plugin></plugins></build>Configuring Your Compiler PluginSince the Compiler Plugin executes automatically during their phases, you don't have to put executions unlike many other plugins. However, you should specify the version of the Compiler Plugin.<project>...<build><pluginManagement><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.6.1</version><configuration><!-- put your configurations here --></configuration></plugin></plugins></pluginManagement></build>...</project>/plugins/maven-compiler-plugin/usage.htmlmaven install⽣成最终的构件包xxx-1.0.0.war(xxx-1.0.0.jar)后,在其下的WEB-INF/lib(xxx-1.0.0.jar\BOOT-INF\lib)中,会包含我们被标注为scope=compile的构件的jar包,⽽不会包含我们被标注为scope=provided的构件的jar包。

IntelliJIDEA运行eclipse的web项目报错的问题

IntelliJIDEA运行eclipse的web项目报错的问题

IntelliJIDEA运⾏eclipse的web项⽬报错的问题⽤IDEA已经有⼀段时间了, 由于之前的IDEA版本不⽀持Tomcat服务器, 所以很长⼀段时间web项⽬都是由eclipse开发调试.今天闲来⽆事下载了⼀个最新版的IDEA, 按⽹上的教程, 尝试运⾏eclipse中的项⽬结果报错启动是很顺利的, 然⽽访问Controller接⼝时就报错500, 具体错误信息如下三⽉ 09, 2018 3:29:51 下午 org.apache.catalina.core.StandardWrapperValve invokeat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)at .AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)at .AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)at ng.Thread.run(Thread.java:745)凭我多年写bug的经验, 从这么长⼀串错误信息中, 我是⼀点也没看出来哪⾥错了!!!妈耶伤脑筋...上⽹查了多久都没有查到有跟我⼀样问题的同学! ⼏乎绝望...中午⾷不下咽, 却还是吃了很⼤⼀碗饭, ⼈是铁饭是钢!果然吃了饭就开窍了, 我从项⽬的配置, 服务的配置,⼀直找到IDEA的配置, 终于让我找到了⼀个可能发⽣问题的点在 IDEA 的 file > settings > Build > Compiler > Java Compiler ⾯板中有⼀个 Use Compiler 配置是 Javac , 改为 eclipse在运⾏,访问就搞定了, 问题解决, 想再吃⼀顿饭!!。

IntelliJIDEA打开SpringBooot项目并使用Maven导入依赖包时提示错误。。。

IntelliJIDEA打开SpringBooot项目并使用Maven导入依赖包时提示错误。。。

IntelliJIDEA打开SpringBooot项⽬并使⽤Maven导⼊依赖包时提⽰错误。

构建项⽬时报错: Cannot resolve com.gexin.platform:gexin-rp-sdk-http:4.1.1.4gexin-rp-sdk-http:jar:4.1.1.4总是⽆法下载,百度到的处理⽅法,记录⼀下,⽅便以后查询使⽤。

解决⽅式:修改本地maven/config/⽬录下的settings.xml⽂件,在原先配置aliyun镜像处,修改mirroOf参数值加上 ,!getui-nexus标识getui-nexus这个依赖不从aliyun进⾏下载注意逗号,因为多个要⽤逗号隔开。

<mirror><id>nexus-aliyun</id><mirrorOf>*,!getui-nexus</mirrorOf><name>Nexus aliyun</name><url>/nexus/content/groups/public/</url></mirror>关于上述配置参数的说明:‘’= everythingexternal:* = everything not on the localhost and not file based.repo,repo1 = repo or repo1*,!repo1 = everything except repo1配置完成后,还需要在IntelliJ IDEA或Eclipse中更新配置⽂件,以⽣效。

菜单栏Window——Preferencecs——Maven——User Setting–update Settings applyandclose然后 maven updateproject。

结束语: 如果出现其他ali镜像⽆法下载,可以将getui-nexus 相应的替换仓库ID。

【推荐下载】(转) Eclipse Maven 编译错误 Dynamic Web Module 3.1 requires Java 1.7 or newer 解决方案

【推荐下载】(转) Eclipse Maven 编译错误 Dynamic Web Module 3.1 requires Java 1.7 or newer 解决方案

(转) Eclipse Maven 编译错误Dynamic Web Module 3.1 requires Java1.7 or newer 解决方案2017/05/02 0 场景:在导入Maven 项目时候遇到如下错误。

1 问题描述Eclipse Maven 开发一个jee 项目时,编译时遇到以下错误:DescriptionResourcePathLocationTypeDynamic Web Module 3.1 requires Java 1.7 ornewer.bdpline 1Maven Java EE Configuration ProblemDescriptionResourcePathLocationTypeOne or more constraints have not beensatisfied.bdpline 1Maven Java EE Configuration Problem 如图:但是Eclipse 明明已经将编译级别设置为1.7:这是由于你的Maven 编译级别是jdk1.6 或以下,而你导入了jdk1.7 以上的依赖包:查看Eclipse 的Navigator 视图下该项目的.classpath 文件:2 解决过程概述:使用maven 构建web 项目时,经常会遇见这个问题,问题原因报错讲述的很清晰明了,就是web 模块需要使用java1.7 及以后的版本,目前的版本不符合。

因而只需要修改java 版本到1.7 及以上即可。

解决方法:1. 在eclipse构建web 中关于java 版本有三处需要修改统一。

(1)在Java Build Path 的libraries中修改(2)在Java Compiler 中修改(3)在Project Facet 中修改2. 大部分按上上述修改就应该可以了,但总是有意外,还是报错。

因为使用了maven 构建项目,因而最好在pom.xml 文件中的build 标签中加入以下代码:build plugins plugin groupId org.apache.maven.plugins /groupId artifactId maven-compiler-plugin /artifactId version 3.1 /version configuration source 1.7 /source //如果是1.8,修改为1.8 target 1.7 /target //如果是1.8,修改为1.8 /configuration /plugin /plugins /build 3.最后再右键使用maven 的Update Project 即可。

安装与配置windows版maven与常见错误

安装与配置windows版maven与常见错误

安装与配置windows版maven(前提:先安装jdk):1.到下载最新maven3.1.1并解压到D盘,并将解压目录改名为maven32.修改D:¥maven3¥bin¥mvn.bat,看脚本,在设置java.exe前设置JAVA_HOME(找到位置加上:set JAVA_HOME=d:¥jdk7)3.打开命令窗口,输入d:¥maven3¥bin¥mvn --version,就可以看到maven信息.4.输入d:¥maven3¥bin¥mvn help:system,就可以看到下载相关东东到库.默认的库位置在当前用户主目录的.m2目录,按ctrl+c可以终止下载.5.更改本地库到e:/repository,在默认的库位置所在目录C:¥Users¥<USER>¥.m2,把repository删了,然后复制D:¥maven3¥conf的settings.xml到C:¥Users¥<USER>¥.m2,在setting节点加入<localRepository>e:/repository</localRepository>就OK,再次输入d:¥maven3¥bin¥mvn help:system看结果生成项目:d:¥maven3¥bin¥mvn archetype:generate -DinteractiveMode=false-DarchetypeArtifactId=maven-archetype-quickstart -DgroupId=com.test-DartifactId=testjava -Dversion=1.0-SNAPSHOTd:¥maven3¥bin¥mvn archetype:generate -DinteractiveMode=false-DarchetypeArtifactId=maven-archetype-webapp -DgroupId=com.test -DartifactId=testweb -Dversion=1.0-SNAPSHOT常见错误:一..在Eclipse导入已存在工作空间的项目,出现情况1:Scanning errors (1):1 Could not read pom.xml就是pom.xml出现了不能解析的配置,把不能解析的配置修改过来.例如去掉<build><finalName>testweb</finalName></build>情况2:No marketplace entries found to handle maven-compiler-plugin:2.3.2:testCompile in Eclipse.将Eclipse内置的Maven换成外部自己安装的Maven,重启Eclipse.然后,在命令行执行mvn clean install再导入项目.二.导入项目后出现:情况1:Project configuration is not up-to-date with pom.xml. Run Maven->Update Project or use Quick Fix.在Problems View的出错提示右键选Quick Fix,再按提示确定就OK.或者,右键项目->Mave n->Update Project情况2:JavaServer Faces 2.2 can not be installed : One or more constraints have not been satisfied. JavaServer Faces 2.2 requires Dynamic Web Module 2.5 or newer.先改web.xmlwebapp节点:<?xml version="1.0" encoding="UTF-8"?><web-app xmlns="/xml/ns/javaee"xmlns:xsi="/2001/XMLSchema-instance"xsi:schemaLocation="/xml/ns/javaee/xml/ns/javaee/web-app_3_1.xsd"version="3.1">然后关闭Eclipse,改项目下的.settings¥mon.project.facet.core.xml.将版本改成为3.1,将成后是<installed facet="jst.web" version="3.1"/>,再启动Eclipse.最后出现上面的情况1,按上面更新下配置就OK.三.<addMavenDescriptor>false</addMavenDescriptor>在Eclipse无效,仍然会将pom.xml,pom.properties打包入jar.在CLI(command-line interface)运行命令,此种情况拒绝使用Eclipse来执行命令(当然你测试打包入去没影响)四.启动tomcat报错:java.util.zip.ZipException: invalid LOC header (bad signature),启动jetty报错: java.util.zip.ZipException: invalid distance too far back以上两种错:一般是一个或多个下载的jar不完整.在eclipse的下载经常出现.而直接在cmd好像不会出错....tomcat\会提示是那些类...就可推是那个jar.但jetty可能不会指出是那个jar.按常理都是调用外部的maven,并且下载后做文件指纹校验的.真的不明白会有这样的情况.先用idea一段时间看看...至少eclipse4.3遇到两次了.我都清一次库了,抓狂啊.啊..啊....对于抛出的异常还是找不到下载不完整的jar,我就写了一个工具.在文末我会贴上.五.没用web.xml的web,打包成war文件,报错: Failed to execute goalorg.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project web: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)只需要在web模块下的pom.xml下的build节点增加以下代码,重写一下maven-war-plugin 组件就可以.重点在于下面的configuration. plugins是build下在同的节点,与pluginManagement是兄弟节点.其中,下面的executions节点可以删除,留默认值.[html]view plaincopy1.<plugins>2.<plugin>3.<artifactId>maven-war-plugin</artifactId>4.<version>2.2</version>5.<configuration>6.<failOnMissingWebXml>false</failOnMissingWebXml>7.</configuration>8.<executions>9.<execution>10.<id>default-war</id>11.<phase>package</phase>12.<goals>13.<goal>war</goal>14.</goals>15.</execution>16.</executions>17.</plugin>18.</plugins>安装jar到本地maven库例子.d:¥maven¥bin¥mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.4.0 -Dpackaging=jar -Dfile=ojdbc14-10.2.0.4.0.jarmaven的5种scope对于3种class是否有效:[html]view plaincopy1. compile test runtime examplepile Y Y Y spring-core3.test - Y - junit4.provided Y Y - servlet-api5.runtime - Y Y jdbc驱动6.system Y Y - 本地的,maven仓库之外的类库文件左边为第一直接依赖,上边为第二直接依赖,则对应的依赖传递如下:[html]view plaincopy1. compile test provided runtimepile compile - - runtime3.test test - - test4.provided provided - provided provided5.runtime runtime - - runtime依赖调解两原则:1.路径最近者优先2.路径长度相同,解析依赖声明靠前优先找出maven下载出错的文件工具类(我170多M左右的maven库,一分钟左右就检查完毕,最终确实有几个下载不完整的文件)[java]view plaincopy1.import java.io.*;2.import java.security.MessageDigest;3.import java.security.NoSuchAlgorithmException;4.5./**6. * 找出maven下载出错的文件7. * Created by xiejx618 on 14-4-1.8. */9.public class TestUtil {10.private static MessageDigest messageDigest = null;11.static {12.try {13. messageDigest= MessageDigest.getInstance("SHA1");14. }catch (NoSuchAlgorithmException e){15. e.printStackTrace();16. }17. }18.private static final char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5','6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };19.private static final int BUFFER_SIZE = 4096;20.21./**22. * 以16进制字符串形式返回数据的sha123. * @param data24. * @return25. */26.public static String digestData(byte[] data) {27. messageDigest.update(data);28. data=messageDigest.digest();29.int len = data.length;30. StringBuilder buf = new StringBuilder(len * 2);31.for (int j = 0; j < len; j++) {32. buf.append(HEX_DIGITS[(data[j] >> 4) & 0x0f]).append(HEX_DIGITS[data[j] & 0x0f]);33. }34.return buf.toString();35. }36./**37. * 根据文件与编码以String形式返回文件的数据38. * @param file39. * @param charset40. * @return41. */42.public static String getFileString(File file, String charset){43. InputStreamReader reader=null;44. StringBuilder out = null;45.try {46. reader = new InputStreamReader(new FileInputStream(file), charset);47. out = new StringBuilder();48.char[] buffer = new char[BUFFER_SIZE];49.int bytesRead = -1;50.while ((bytesRead = reader.read(buffer)) != -1) {51. out.append(buffer, 0, bytesRead);52. }53. }catch (IOException e){54. e.printStackTrace();55. }finally {56.try {57.if (reader!=null) reader.close();58. } catch (IOException ex) {59. ex.printStackTrace();60. }61. }62.return out.toString();63. }64.65./**66. * 根据文件以byte[]形式返回文件的数据67. * @param file68. * @return69. */70.public static byte[] getFileData(File file){71. FileInputStream in=null;72. ByteArrayOutputStream out=null;73.try {74. in=new FileInputStream(file);75. out=new ByteArrayOutputStream(BUFFER_SIZE);76.int byteCount = 0;77.byte[] buffer = new byte[BUFFER_SIZE];78.int bytesRead = -1;79.while ((bytesRead = in.read(buffer)) != -1) {80. out.write(buffer, 0, bytesRead);81. byteCount += bytesRead;82. }83. out.flush();84. } catch (IOException e) {85. e.printStackTrace();86. } finally {87.try{88.if (in!=null) in.close();89.if (out!=null) out.close();90. }catch (IOException ex){91. ex.printStackTrace();92. }93. }94.return out.toByteArray();95. }96.97./**98. * 凡是以.sha1的文件结尾的文件,先将文件名去掉.sha1找到文件sourcefile,获取sourcefile文件的真实的sha1和从这个.sha1文件获取sha1,99. * 进行比照,如果不匹配,输出实际的sha1和期望的sha1100. *101. * @param file102. */103.public static final void handle(File file){104. String filename=file.getName();105.if(filename.endsWith(".sha1")){106. String sourcename=filename.substring(0, stIndexOf('.') );107. File sourcefile=new File(file.getParent(),sourcename);108.byte[] sourcedata=getFileData(sourcefile);109. String sha1Real=digestData(sourcedata);110. String content=getFileString(file,"UTF-8");111. String sha1Check=content.split(" ")[0].trim();112.if(!sha1Real.equalsIgnoreCase(sha1Check)){113. System.out.println(sourcefile.getAbsolutePath()+"的实际SHA1:"+sha1Real);114. System.out.println(file.getAbsolutePath()+"的验证SHA1:"+sha1Check);115. }116. }117. }118.119./**120. * 根据目录dir,递归所有的文件按handle方法处理121. * @param dir122. */123.public static final void showAllFiles(File dir){124. File[] fs = dir.listFiles();125.for(int i=0; i<fs.length; i++){126.if(fs[i].isDirectory()){127. showAllFiles(fs[i]);128. }129. handle(fs[i]);130. }131. }132.public static void main(String[] args) { 133. showAllFiles(new File("E:/mvnrepo0329")); 134. System.out.println("the end");135. }136.}。

使用Eclipse构建Maven的Web项目用jetty启动

使用Eclipse构建Maven的Web项目用jetty启动

一、直接建立Maven项目方法1,建立Maven项目接下来使用Eclipse的maven构建一个web项目,以构建SpringMVC项目为例:1.1 选择建立Maven Project选择File -> New -> Other,在New窗口中选择Maven -> Maven Project。

点击newxt。

1.2 选择项目路径Use default Workspace location默认工作空间。

1.3 选择项目类型在Artifact Id中选择maven-archetype-webapp1.4 输入Group ID和 Artifact ID,以及PackageGroup ID一般写大项目名称。

Artifact ID是子项目名称。

例如Spring的web包,Group ID:org.springframework,artifactId:spring-web。

Package是默认给你建一个包,不写也可以。

1.5 刚建立好后的文件结构如下图如果这里显示的内容多,一般是Filters设置的问题。

或perspective为JavaEE模式,改成Java模式就可以了。

2,配置项目接下来就需要更改好多配置了。

2.1 添加Source文件夹接下来需要添加src/main/java,src/test/java ,src/test/resources三个文件夹。

右键项目根目录点击New -> Source Folder,建出这三个文件夹。

注意不是建普通的Folder,而是Source Folder。

2.2 更改class路径右键项目,Java Build Path -> Source下面应该有4个文件夹。

src/main/java,src/main /resources,src/test/java ,src/test/resources。

双击每个文件夹的Output folder,选择路径。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

∙问题描述:在使用eclipse的maven插件创建web项目的时候有时候会遇到错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:REL EASE from any of the configured repositories.
∙错误描述的是:不能解析maven-archetype-webapp这个原型,现有eclipse中的原型不能使用,需要重新配置原型并下载:
∙解决办法:打开eclipse个性化配置:preference—>Maven —>Archetype—>Add Remote Catalog,意思就是从远程添加Maven的原型:
不要着急,你需要点击一下verify...核对一下catalog,你就会看到eclise已经开始下载archetype了,从eclipse的右下角你能看到有进度条在执行任务
∙这时候你再选择catalog中你刚才添加的webapp的archetype ,你发现他的版本号不是原来的RELEASE了,变为了1.0
∙如果以上方法还是不能解决问题,可能就是setting.xml 文件的配置问题了,当前eclipse设置的usersettings的位置用的是在公司用的setting.xml,所以家里的网络是不能连到公司的maven仓库的,所以不能用此setting文件建立maven项目∙如果需要建立maven项目的话,需要使用maven的默认setting.xml配置,在MAVEN_HOME下的conf文件夹中,将eclipse中的maven的usersetting设置为此处的setting文件就能使用maven官方的中央库,也就能建立maven项目了,我不能创建maven项目的原因是这个,已经解决。

相关文档
最新文档