Eclipse初次java开发问题总结-4-Maven使用问题汇总
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:\Users\moon\Desktop\ossp-resservice-maven\ossp-resserver-service\pom.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文件中使用了继承。
<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:\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]
[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包


Eclipse初次java开发问题总结-4-Maven使用问题汇总的更多相关文章
- Eclipse初次java开发问题总结-3
上篇中提到解决的一个问题是mysql驱动报的: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link ...
- Eclipse初次java开发问题总结-2
今天对之前写的servlet程序做了个简单的性能测试发现了一些问题,经过解决这些问题没有再重现,有些问题自己确切知道原因,有的则不太确定. 1.配置文件读取问题 项目中使用.properties作为配 ...
- eclipse,myeclipse开发环境下,maven远程部署到tomcat7服务器(图文)
有的人想在eclipse写java web 项目,通过maven也是一种实现的方法,可以实现java web 项目打包成war,发布到tomcat. 在pom.xml文件的build增加下面的代码,相 ...
- Jdk1.7+eclipse搭建Java开发环境
Jdk1.7+eclipse搭建Java开发环境 1. 下载jdk1.7 http://www.oracle.com/technetwork/java/javase/downloads/jdk7 ...
- Eclipse For Java开发环境部署
Eclipse For Java开发环境部署 1.准备工作 jdk安装包 jdk官网下载 Eclipse安装包 Eclipse官网下载 Eclipse下载时选择图中所示的国内镜像地址下载 下载后的文件 ...
- Java开发环境配置(4)--Maven安装 环境变量配置,本地仓库配置---插件安装
说明在前:本人用过的 luna mars 等,都已经自带maven插件的了,以下有些文章是很老的,讲到maven插件的安装都可以忽略掉. maven安装eclipse在线配置maven搞定所有插件_ ...
- linux下的Java开发 intellij idea+tomcat+maven
前期准备:安装intellij idea.下载tomcat.下载maven(注意我用的是tomcat6.maven 3.2.1.jdk1.6.0_45,之前maven用的3.5结果报错,搞了好久,建议 ...
- Java开发学习(三十)----Maven聚合和继承解析
一.聚合 分模块开发后,需要将这四个项目都安装到本地仓库,目前我们只能通过项目Maven面板的install来安装,并且需要安装四个,如果我们的项目足够多,那么一个个安装起来还是比较麻烦的 如果四个项 ...
- Java开发学习(三十一)----Maven属性与版本管理
一.属性 1.1 问题分析 如下图所示 你会发现,如果现在想更新Spring的版本,你会发现依然需要更新多个jar包的版本,这样的话还是有可能出现漏改导致程序出问题,而且改起来也是比较麻烦. 问题清楚 ...
随机推荐
- Linux 移动或重命名文件/目录-mv 的10个实用例子
本文导航 -初识 mv 命令03% -1.移动文件08% -2.移动多个文件15% -3.移动目录23% -4.重命名文件或目录27% -5. 重命名目录35% -6. 打印移动信息39% -7. 使 ...
- ROC曲线(Receiver Operating Characteristic Curve)
分类模型尝试将各个实例(instance)划归到某个特定的类,而分类模型的结果一般是实数值,如逻辑回归,其结果是从0到1的实数值.这里就涉及到如何确定阈值(threshold value),使得模型结 ...
- Java获取此次请求URL以及服务器根路径的方法
http://www.jb51.net/article/71693.htm ********************************************** 本文介绍了Java获取此次请求 ...
- R语言统计分析应用与SAS、SPSS的比较
能够用来做统计分析的软件和程序很多,目前应用比较广泛的包括:SPSS, SAS.R语言,Matlab,S-PLUS,S-Miner等.下面我们来看一下各应用的特点: SPSS: 最简单的,都是菜单操作 ...
- 设计模式之模板方法模式&&迪米特法则(代码Objective-C展示)
模板方法模式 模板方法模式:定义一个操作中的算法骨架,而将一些步骤延迟到子类中.模板方法使得子类可以在不改变一个算法的结构即可重定义该算法的某些特定步骤. 比如说,小时候数学老师的随堂检测,都是在黑板 ...
- 6个监控linux资源的快速工具
系统管理员需要对服务器进行监控以确保其正常运行,通过这种方式管理员能够提前发现可能存在的问题并恢复系统,以避免麻烦的出现. Linux上有很多命令来监控不同的系统资源,如CPU使用率.内存使用情况.网 ...
- linux笔记——一些命令工具
ntpdate 时间同步 netstat aux网络状态 htpasswd du -h 文件大小 df 文件信息 fdisk 磁盘分区 查找删除 rm `ls |grep ` ls |grep |xa ...
- ARKit从入门到精通(3)-ARKit自定义实现
转载:http://blog.csdn.net/u013263917/article/details/73038566 在上一小节中ARKit从入门到精通(2)-ARKit工作原理及流程介绍,我们完整 ...
- 带网上开户表单jQuery焦点图
带网上开户表单jQuery焦点图是一款适合证券公司的带表单的图片左右滚动切换特效代码.效果图如下: 在线预览 源码下载 实现的代码. html代码: <div class="ind ...
- angularjs去掉加载时的{{}}
添加css <style> .ng-cloak {display: none;} </style> 在body头文件中加上class=ng-cloak &l ...