Eclipse4.5版本创建Maven项目时出现这种错误82 无法创建目录Pom.xml上面错误82 无法创建目录

本帖子已过去太久远了,不再提供回复功能。eclipse 建立maven项目 显示红叉的解决方法
我的图书馆
eclipse 建立maven项目 显示红叉的解决方法
1.建立好之后就会发现项目有红叉。
这时发现查查在main处,打开项目》属性》Java Build Path》source,发现里边有红叉(如下图),这是由于我们的src/main下没有建立对应的编译路径main/java和test/java造成的,故添加这两个编译文件夹。
添加好编译文件夹之后,发现红叉还没有消失,这时发现红叉是由于index.jsp页面中的The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path错误产生的,这个问题是由于项目没有引入servlet-api.jar造成的,所以需要把tomcat的运行时环境添加进来。项目》属性》Libraries》Add Library》Server Runtime》Tomcat,OK。
现在项目中的红叉没有了,取而代之的是个感叹号。我们发现感叹号打在java resources上,而打开里边却没有感叹号。经过多次测试,发现这是由于项目引用的jre System Libarary的版本和本机上装载的java版本不一致造成的,所以只要在项目》属性》java Build Path》Libraries》JRE System Libary的版本改成本机搭载的java版本就可以了,对了还有最后一步,就是去Project Facets中把java的版本也改成本机java的版本。
经过以上几部,项目中的叉叉感叹号就消失了。
TA的最新馆藏[转]&[转]&[转]&[转]&
喜欢该文的人也喜欢Non-resolvable parent POM
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -& [Help 1]
The project com.iflytek.ossp:ossp-resserver-service:1.0.0-SNAPSHOT (C:\Users\moon\Desktop\ossp-resservice-maven\ossp-resserver-service\pom.xml) has 1 error
Non-resolvable parent POM: Could not find artifact com.iflytek.ossp:ossp-resserver-all:pom:1.0.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 11, column 10 -& [Help 2]
[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] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
无法解析父级的POM文件,应该是是POM文件中使用了继承。
&groupId&com.iflytek.ossp&/groupId&
&artifactId&ossp-resserver-all&/artifactId&
&version&1.0.0-SNAPSHOT&/version&
可以尝试加入&relativePath&
&groupId&com.iflytek.ossp&/groupId&
&artifactId&ossp-resserver-all&/artifactId&
&version&1.0.0-SNAPSHOT&/version&
&relativePath&../ossp-resserver-all/pom.xml&/relativePath&
Unable to locate the Javac Compiler in
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project ossp-resserver-service: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] C:\Java\jre6\..\lib\tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
[ERROR] -& [Help 1]
[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] 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
出现类似的错误应该是Jre配置问题:
右击项目-&Java Buid Path-&Libraries-&JRE-&Edit-&Install JREs...-&Edit-&JRE system libraries-&Add External JREs..-&找到缺少的jar(toos.jar)添加进去。
No goals have been specified for this build.
Maven Buid时出现下面这个错误:
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format &plugin-prefix&:&goal& or &plugin-group-id&:&plugin-artifact-id&[:&plugin-version&]:&goal&. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -& [Help 1]
[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] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
是因为没有指定buid goal,在POM文件中的buid节中加入默认值就行了。
&defaultGoal&compile&/defaultGoal&
将第三方jar包发布到私服
1、首先要修改eclipse中的Maven配置。
不要使用内嵌的默认配置。
指向Maven的安装目录。
2、配置Maven的setting.xml
&?xml version="1.0" encoding="UTF-8"?&
&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&
&id&nexus-releases&/id&
&username&admin&/username&
&password&123&/password&
&id&nexus-snapshots&/id&
&username&admin&/username&
&password&123&/password&
&/servers&
&/mirrors&
&profiles&
&id&dev&/id&
&repositories&
&repository&
&id&local-nexus&/id&
&url&http://192.168.77.214:9088/nexus/content/groups/public/&/url&
&releases&
&enabled&true&/enabled&
&/releases&
&snapshots&
&enabled&true&/enabled&
&/snapshots&
&/repository&
&/repositories&
&/profile&
&/profiles&
&activeProfiles&
&activeProfile&dev&/activeProfile&
&/activeProfiles&
&/settings&
3、发布第三方jar包
阅读(...) 评论()Eclipse创建Maven工程总是出现pom.xml报错怎么办?
作者:佚名
字体:[ ] 来源:互联网 时间:01-31 11:13:36
Eclipse创建Maven工程总是出现pom.xml报错怎么办?在创建Maven项目后,总是出现pom.xml文件那老是有一个红叉,该怎么解决这个问题呢?下面分享详细的解决办法,需要的朋友可以参考下
最近刚学习Maven,用Eclipse创建Maven项目后,pom.xml文件那老是有一个红叉,真TM烦人。虽然还不知道原因是什么,但还是找到了一种解决办法。
1、用Eclipse创建一个maven工程,网上有很多资料,这里不再啰嗦。
2、右键maven工程,进行更新
3、在弹出的对话框中勾选强制更新,如图所示
4、稍等片刻,pom.xml的红叉消失了。
相关推荐:
大家感兴趣的内容
12345678910
最近更新的内容}

我要回帖

更多关于 错误82无法创建目录或文件 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信