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包

本文转载,原博客地址附上

java开发问题总结-4-Maven使用问题汇总的更多相关文章

  1. Java开发学习(三十)----Maven聚合和继承解析

    一.聚合 分模块开发后,需要将这四个项目都安装到本地仓库,目前我们只能通过项目Maven面板的install来安装,并且需要安装四个,如果我们的项目足够多,那么一个个安装起来还是比较麻烦的 如果四个项 ...

  2. Java开发学习(三十一)----Maven属性与版本管理

    一.属性 1.1 问题分析 如下图所示 你会发现,如果现在想更新Spring的版本,你会发现依然需要更新多个jar包的版本,这样的话还是有可能出现漏改导致程序出问题,而且改起来也是比较麻烦. 问题清楚 ...

  3. Java开发环境配置(4)--Maven安装 环境变量配置,本地仓库配置---插件安装

    说明在前:本人用过的 luna  mars 等,都已经自带maven插件的了,以下有些文章是很老的,讲到maven插件的安装都可以忽略掉. maven安装eclipse在线配置maven搞定所有插件_ ...

  4. linux下的Java开发 intellij idea+tomcat+maven

    前期准备:安装intellij idea.下载tomcat.下载maven(注意我用的是tomcat6.maven 3.2.1.jdk1.6.0_45,之前maven用的3.5结果报错,搞了好久,建议 ...

  5. Java开发学习(三十三)----Maven私服(一)私服简介安装与私服分类

    一.私服简介 团队开发现状分析 (1)张三负责ssm_crm的开发,自己写了一个ssm_pojo模块,要想使用直接将ssm_pojo安装到本地仓库即可 (2)李四负责ssm_order的开发,需要用到 ...

  6. Linux学习总结(十)—— Java开发环境搭建:JDK+Maven

    Java开发环境最基础的两个开源软件是JDK和Maven. JDK 到Oracle官网下载相对应的源码包,这里我选择的是:Linux x64系统的jdk-8u131-linux-x64.tar.gz. ...

  7. Java开发小技巧(三):Maven多工程依赖项目

    前言 本篇文章基于Java开发小技巧(二):自定义Maven依赖中创建的父工程project-monitor实现,运用我们自定义的依赖包进行多工程依赖项目的开发. 下面以多可执行Jar包项目的开发为例 ...

  8. Java开发环境之Maven

    查看更多Java开发环境配置,请点击<Java开发环境配置大全> 肆章:Maven安装教程 1)下载Maven安装包 https://maven.apache.org/download.c ...

  9. Idea开发环境中搭建Maven并且使用Maven打包部署程序

    1.配置Maven的环境变量 a.首先我们去maven官网下载Maven程序,解压到安装目录,如图所示: b.配置M2_HOME的环境变量,然后将该变量添加到Path中 备注:必须要有JAVA_HOM ...

  10. 打造Linux三流娱乐环境,二流办公环境,一流Java开发环境

    写这篇文章的目的首先是为让自己以后再装linux环境时候,不用再通宵google+百度,做个备忘录,其次,给新入Linux环境的同学分享一点个人经验,再高尚点的动机也算是想做为开源技术的传播布道者.我 ...

随机推荐

  1. Windows批处理:请求远程协助

    公司办公场地分别在两个不同的楼层,处理问题要来回跑,所以思考使用远程访问的方式解决问题.同事大多对电脑不熟悉,使用「通讯软件」和「电话」教同事开启远程桌面沟通成本挺高,另外公司IP地址.账号密码都没统 ...

  2. [转]An introduction to OAuth 2.0 using Facebook in ASP.NET Core

    本文转自:http://andrewlock.net/an-introduction-to-oauth-2-using-facebook-in-asp-net-core/ This is the ne ...

  3. 升级Ubuntu 16.04 LTS后 DSL拨号上网(ppp)连接自动断开解决办法

    原本在Ubuntu 15.10用拨号上网没有问题,但升级了16.04 LTS后发现原来的DSL连接不上了.主要表现为: 1.在NetworkManager里面选择DSL Connection能够尝试拨 ...

  4. 2016 华南师大ACM校赛 SCNUCPC 非官方题解

    我要举报本次校赛出题人的消极出题!!! 官方题解请戳:http://3.scnuacm2015.sinaapp.com/?p=89(其实就是一堆代码没有题解) A. 树链剖分数据结构板题 题目大意:我 ...

  5. [LeetCode] Transpose File 转置文件

    Given a text file file.txt, transpose its content. You may assume that each row has the same number ...

  6. 【数据结构】简单谈一谈二分法和二叉排序树BST查找的比较

    二分法查找: 『在有序数组的基础上通过折半方法不断缩小查找范围,直至命中或者查询失败.』   二分法的存储要求:要求顺序存储,以便于根据下标随机访问   二分法的时间效率:O(Log(n))   二分 ...

  7. ubuntu下的apt-get内网本地源的搭建

    APT本地源的搭建(可用于局域网apt-get源搭建或者本地源) 本文档介绍使用apt-mirror软件搭建apt本地源 需求:内网开发环境由于其特定原因不能上外网,所以需要本地环境下的内网源来方便开 ...

  8. C++知识回顾(二)——名称空间

    随着工程的增大,名称相互冲突的肯能性增加,使用多个厂商的类库时,可能导致名称冲突.为了解决这些问题,需要用到名称空间. 为了将代码加入名称空间,可以使用namespae将其包含,例如,编写一段代码,其 ...

  9. 【日常操作记录】Asp.Net Core 的一些基本操作或属性

    用于记录在项目中使用到的方法.属性.操作,持续更新中 静态文件的使用 在项目中静态文件的使用需要在Startup中的Configure方法中增加: //使用静态文件 app.UseStaticFile ...

  10. Power BI REST API

    Overview of Power BI REST API https://msdn.microsoft.com/en-us/library/dn877544.aspx 验证方式 OAuth 2.0 ...