Eclipse java开发问 Maven使用问题
来源:互联网 发布:万网解析域名 编辑:程序博客网 时间:2024/06/03 16:12
Non-resolvable parent POM
[INFO] Scanning for projects...[ERROR] The build could not read 1 project -> [Help 1][ERROR] [ERROR] The project com.iflytek.ossp:ossp-resserver-service:1.0.0-SNAPSHOT (C:UsersmoonDesktopossp-resservice-mavenossp-resserver-servicepom.xml) has 1 error[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] [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/ProjectBuildingException[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
无法解析父级的POM文件,应该是是POM文件中使用了继承。[INFO] Scanning for projects...[ERROR] The build could not read 1 project -> [Help 1][ERROR] [ERROR] The project com.iflytek.ossp:ossp-resserver-service:1.0.0-SNAPSHOT (C:UsersmoonDesktopossp-resservice-mavenossp-resserver-servicepom.xml) has 1 error[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] [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/ProjectBuildingException[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
<parent> <groupId>com.iflytek.ossp</groupId> <artifactId>ossp-resserver-all</artifactId> <version>1.0.0-SNAPSHOT</version> </parent>
可以尝试加入<relativePath>
<parent> <groupId>com.iflytek.ossp</groupId> <artifactId>ossp-resserver-all</artifactId> <version>1.0.0-SNAPSHOT</version> <relativePath>../ossp-resserver-all/pom.xml</relativePath> </parent>
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:Javajre6..libtools.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] [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
出现类似的错误应该是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] [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/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> </proxies> <servers> <server> <id>nexus-releases</id> <username>admin</username> <password>123</password> </server> <server> <id>nexus-snapshots</id> <username>admin</username> <password>123</password> </server> </servers> <mirrors> </mirrors> <profiles> <profile> <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包
阅读全文
0 0
- Eclipse java开发问 Maven使用问题
- Eclipse初次java开发问题总结-4-Maven使用问题汇总
- 使用Eclipse基于Maven使用Java开发WordCount程序项目
- java开发问题总结-4-Maven使用问题汇总
- 使用eclipse+maven+tomcat开发web应用
- scala+java+eclipse+maven开发环境构建
- eclipse+java+tomcat+maven 开发环境配置
- eclipse 使用 maven 遇到的问题
- 使用eclipse/STS maven遇到的问题
- maven+eclipse使用时环境问题
- Eclipse中使用maven问题汇总
- 使用MAVEN和Eclipse开发Web项目依赖库的问题
- Eclipse中使用maven mobile开发,加载模块设置找不到子项目问题
- 使用Maven开发Java项目
- Java Web开发常问问题 重点概要
- 阿里JAVA开发面试常问问题总结1
- 阿里JAVA开发面试常问问题总结2
- 阿里JAVA开发面试常问问题总结3
- 类加载机制
- 第十四天总结
- 经典回溯八皇后问题--递归
- HDU 1257 最少拦截系统 (贪心)
- 【NOIP2017提高A组冲刺11.4】总结
- Eclipse java开发问 Maven使用问题
- 反射
- 数据链路层服务
- RB-tree 红黑树
- synchronized关键字
- NOIP考前总结与反思
- op的交流分析
- 大数据用户画像方法与实践
- wait notify