linux中用eclipse 新建maven project,pom.xml中报Missing artifact jdk.tools:jdk.tools:jar:1.7

解决方法:

在pom.xml中添加如下依赖:

<dependency>
        <groupId>jdk.tools</groupId>
        <artifactId>jdk.tools</artifactId>
        <version>1.7</version>
        <scope>system</scope>
        <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
    </dependency>

也可以在本地仓库中手动安装tools.jar,如下
    mvn install:install-file -DgroupId=jdk.tools -DartifactId=jdk.tools -Dpackaging=jar     -Dversion=1.6 -Dfile=tools.jar -DgeneratePom=true
    然后在pom.xml中添加:
        <dependency>
            <groupId>jdk.tools</groupId>
            <artifactId>jdk.tools</artifactId>
            <version>1.7</version>
        </dependency>

以上方法亲自验证过

Maven pom.xml 报 Missing artifact jdk.tools:jdk.tools:jar:1.7的更多相关文章

  1. maven工程pom.xml报Missing artifact net.sf.jasperreports:jasperreports:jar:6.2.0

    有时maven工程的pom.xml报以下类型错误: Description Resource Path Location TypeMissing artifact net.sf.jasperrepor ...

  2. 关于导入本地maven项目pom.xml出现missing artifact org....报错处理

    一.导入本地maven项目步骤:

  3. 【Java】SVN下载maven项目到eclipse之后,项目红叉,pom.xml出现Missing artifact fakepath:dubbo:jar:2.8.5等缺少jar包情况

    刚入公司,从svn上把代码弄下来之后导入eclipse,一般是maven项目,往往项目都会有红叉.如果排除代码本身问题,一般是jar包没有. 鼠标点开pom.xml文件,在约束那里一般有红叉,鼠标放上 ...

  4. maven pom.xml 报错

    首先介绍背景,在eclipse中导入一个maven的项目,在我之前的电脑上导入好用,在自己的电脑上导入居然pom报错了Missing artifact junit:junit:jar:4.11,还会有 ...

  5. Maven pom.xml报错解决

    用Maven建了一个web工程,总是在pom.xml头的地方报错: 大概是: Original error: Could not transfer artifact org.hamcrest:hamc ...

  6. maven pom.xml报错

    再在项目上强制update一下就可以了 如下: 此外使用maven时用默认的仓库速度会过慢 下载很小的jar包都需要很久 推介使用oschina的源 使用在这里:

  7. Maven搭建hadoop环境报Missing artifact jdk.tools:jdk.tools:jar:1.7

    今天,更新了工程,报错了. 项目中用了HBase,也有Hadoop相关的jar配置. pom文件, Missing artifact jdk.tools:jdk.tools:jar:1.7 Maven ...

  8. eclipse的maven项目报Missing artifact jdk.toos:jdk.toos:jar:1.6错

    很多框架都会依赖jdk中的tools.jar,但是maven仓库中却没有. 如在eclipse+maven编写mapreduce代码,就会报Missing artifact jdk.toos:jdk. ...

  9. maven 加入json-lib.jar 报错 Missing artifact net.sf.json-lib:json-lib:jar:2.4:compile

    <dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json-lib</art ...

随机推荐

  1. C++和.net的集合类对应

      Here's what I've found (ignoring the old non-generic collections): Array - C array, though the .NE ...

  2. springboot h2数据库的配置

    配置文件 #h2 数据库配置 #配置数据库连接地址spring.datasource.url=jdbc:h2:sunniwell:sos#配置数据库驱动spring.datasource.driver ...

  3. 如何使用FF的Firebug组件中的net工具查看页面元素加载消耗时间

    1.安装FF的Firebug组件:点击FF的Tools的Add-ons菜单,输入Firebug关键字,并选择合适的版本Install. 2.安装完毕后地址栏右边会出现一个小虫图标,右边还有一个下拉箭头 ...

  4. Navicat安装激活

    有条件的同学麻烦不要使用下面的激活步骤,仅供个人学习使用 ...... ...... ...... ...... 一.去官网下载最新Navicat软件https://www.navicat.com.c ...

  5. 页面载入时通过获取GridView某行某列的值来控制某一列的控件属性

    通过获取状态来控制"查看"button的Visible属性值. 在前台GridView中加入 OnRowDataBound="GridView1_RowDataBound ...

  6. Android ViewPager用法小结

    android-support-v4.jar 是谷歌提供给我们的一个兼容低版本号安卓设备的软件包.里面包囊了仅仅有在 Android 3.0 以上可用的API.而 ViewPager 就是当中之中的一 ...

  7. 使用Android编写录制视频小程序演示样例

    主要实现录制功能的类:Camera类和MediaRecorder类.功能描写叙述:首先进入视频录制界面,点击录像button进入录像功能界面,点击录制開始录制视频, 点击停止button,将录制的视频 ...

  8. Spring <context:annotation-config/> 说明

    在基于主机方式配置Spring的配置文件中,你可能会见到<context:annotation-config/>这样一条配置,他的作用是式地向 Spring 容器注册AutowiredAn ...

  9. 【转】Asp.Net MVC4 之Url路由

    MVC4常见路由的处理方式 //直接方法重载+匿名对象 routes.MapRoute( name: "Default", url: "{controller}/{act ...

  10. ZOJ2750_Idiomatic Phrases Game(最短路)

    Idiomatic Phrases Game Time Limit: 2 Seconds      Memory Limit: 65536 KB Tom is playing a game calle ...