教你安装eclipse2021并配置内网maven中心仓库的图文详解

下载Eclipse2021并运行安装包,选择Eclipse IDE for Java Developers

默认安装路径 ,点击 INSTALL进行安装

安装 中。。。

安装完成,点击LAUNCH启动Eclipse2021

选择默认工作空间

 启

动并加载插件中...

成功启动并显示IDE界面

下面是内网Maven仓库

登陆内网仓库 并复制中心仓库地址:

添加maven路径

添加前提是你先安装好maven,这里安装的是maven 3.8.1

点击Finish完成添加

添加成功后会显示如下

添加maven配置路径

配置内网Maven私服:

<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<!--
 | This is the configuration file for Maven. It can be specified at two levels:
 |
 |  1. User Level. This settings.xml file provides configuration for a single user,
 |                 and is normally provided in ${user.home}/.m2/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -s /path/to/user/settings.xml
 |
 |  2. Global Level. This settings.xml file provides configuration for all Maven
 |                 users on a machine (assuming they're all using the same Maven
 |                 installation). It's normally provided in
 |                 ${maven.conf}/settings.xml.
 |
 |                 NOTE: This location can be overridden with the CLI option:
 |
 |                 -gs /path/to/global/settings.xml
 |
 | The sections in this sample file are intended to give you a running start at
 | getting the most out of your Maven installation. Where appropriate, the default
 | values (values used when the setting is not specified) are provided.
 |
 |-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
  <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
   -->

  <localRepository>c:\maven\repo</localRepository>

  <!-- interactiveMode
   | This will determine whether maven prompts you when it needs input. If set to false,
   | maven will use a sensible default value, perhaps based on some other setting, for
   | the parameter in question.
   |
   | Default: true
  <interactiveMode>true</interactiveMode>
  -->

  <!-- offline
   | Determines whether maven should attempt to connect to the network when executing a build.
   | This will have an effect on artifact downloads, artifact deployment, and others.
   |
   | Default: false
  <offline>false</offline>
  -->

  <!-- pluginGroups
   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
   | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
   | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
   |-->
  <pluginGroups>
    <!-- pluginGroup
     | Specifies a further group identifier to use for plugin lookup.
    <pluginGroup>com.your.plugins</pluginGroup>
    -->
  </pluginGroups>

  <!-- proxies
   | This is a list of proxies which can be used on this machine to connect to the network.
   | Unless otherwise specified (by system property or command-line switch), the first proxy
   | specification in this list marked as active will be used.
   |-->
  <proxies>
    <!-- proxy
     | Specification for one proxy, to be used in connecting to the network.
     |
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>proxyuser</username>
      <password>proxypass</password>
      <host>proxy.host.net</host>
      <port>80</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
    -->
  </proxies>

  <!-- servers
   | This is a list of authentication profiles, keyed by the server-id used within the system.
   | Authentication profiles can be used whenever maven must make a connection to a remote server.
   |-->
  <servers>
    <!-- server
     | Specifies the authentication information to use when connecting to a particular server, identified by
     | a unique name within the system (referred to by the 'id' attribute below).
     |
     | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
     |       used together.
     |
    <server>
      <id>deploymentRepo</id>
      <username>repouser</username>
      <password>repopwd</password>
    </server>
    -->

    <!-- Another sample, using keys to authenticate.
    <server>
      <id>siteServer</id>
      <privateKey>/path/to/private/key</privateKey>
      <passphrase>optional; leave empty if not used.</passphrase>
    </server>
    -->
  </servers>

  <!-- mirrors
   | This is a list of mirrors to be used in downloading artifacts from remote repositories.
   |
   | It works like this: a POM may declare a repository to use in resolving certain artifacts.
   | However, this repository may have problems with heavy traffic at times, so people have mirrored
   | it to several places.
   |
   | That repository definition will have a unique id, so we can create a mirror reference for that
   | repository, to be used as an alternate download site. The mirror site will be the preferred
   | server for that repository.
   |-->
<mirrors>
	 <mirror>
          <id>central</id>
          <mirrorOf>*</mirrorOf>
          <name>Central Repository</name>
          <url>http://192.168.1.90:8081/repository/maven-central/</url>
    </mirror>

	<mirror>
     <id>aliyunmaven</id>
     <mirrorOf>*</mirrorOf>
     <name>aliyunmaven_public</name>
     <url>https://maven.aliyun.com/repository/public</url>
    </mirror>

     <mirror>
     <id>aliyunmaven</id>
     <mirrorOf>*</mirrorOf>
     <name>aliyunmaven_google</name>
     <url>https://maven.aliyun.com/repository/google</url>
    </mirror>

    <mirror>
     <id>aliyunmaven</id>
     <mirrorOf>*</mirrorOf>
     <name>aliyunmaven_apache</name>
     <url>https://maven.aliyun.com/repository/apache-snapshots</url>
    </mirror>

    <mirror>
     <id>aliyunmaven</id>
     <mirrorOf>*</mirrorOf>
     <name>aliyunmaven_spring</name>
     <url>https://maven.aliyun.com/repository/spring</url>
    </mirror>

    <mirror>
     <id>aliyunmaven</id>
     <mirrorOf>*</mirrorOf>
     <name>aliyunmaven_spring-plugin</name>
     <url>https://maven.aliyun.com/repository/spring-plugin</url>
    </mirror>

    <mirror>
      <id>tencent</id>
      <name>tencent maven mirror</name>
      <url>https://mirrors.tencent.com/nexus/repository/maven-public/</url>
      <mirrorOf>*</mirrorOf>
    </mirror>

  </mirrors>

  <!-- profiles
   | This is a list of profiles which can be activated in a variety of ways, and which can modify
   | the build process. Profiles provided in the settings.xml are intended to provide local machine-
   | specific paths and repository locations which allow the build to work in the local environment.
   |
   | For example, if you have an integration testing plugin - like cactus - that needs to know where
   | your Tomcat instance is installed, you can provide a variable here such that the variable is
   | dereferenced during the build process to configure the cactus plugin.
   |
   | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
   | section of this document (settings.xml) - will be discussed later. Another way essentially
   | relies on the detection of a system property, either matching a particular value for the property,
   | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
   | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
   | Finally, the list of active profiles can be specified directly from the command line.
   |
   | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
   |       repositories, plugin repositories, and free-form properties to be used as configuration
   |       variables for plugins in the POM.
   |
   |-->
  <profiles>
    <!-- profile
     | Specifies a set of introductions to the build process, to be activated using one or more of the
     | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
     | or the command line, profiles have to have an ID that is unique.
     |
     | An encouraged best practice for profile identification is to use a consistent naming convention
     | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
     | This will make it more intuitive to understand what the set of introduced profiles is attempting
     | to accomplish, particularly when you only have a list of profile id's for debug.
     |
     | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
    <profile>
      <id>jdk-1.4</id>
      <activation>
        <jdk>1.4</jdk>
      </activation>
      <repositories>
        <repository>
          <id>jdk14</id>
          <name>Repository for JDK 1.4 builds</name>
          <url>http://www.myhost.com/maven/jdk14</url>
          <layout>default</layout>
          <snapshotPolicy>always</snapshotPolicy>
        </repository>
      </repositories>
    </profile>
    -->

    <!--
     | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
     | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
     | might hypothetically look like:
     |
     | ...
     | <plugin>
     |   <groupId>org.myco.myplugins</groupId>
     |   <artifactId>myplugin</artifactId>
     |
     |   <configuration>
     |     <tomcatLocation>${tomcatPath}</tomcatLocation>
     |   </configuration>
     | </plugin>
     | ...
     |
     | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
     |       anything, you could just leave off the <value/> inside the activation-property.
     |
    <profile>
      <id>env-dev</id>
      <activation>
        <property>
          <name>target-env</name>
          <value>dev</value>
        </property>
      </activation>
      <properties>
        <tomcatPath>/path/to/tomcat/instance</tomcatPath>
      </properties>
    </profile>
    -->

    <profile>
        <id>local-nexus</id>
        <repositories>
          <repository>
            <id>nexus</id>
            <url>http://192.168.1.90:8081/repository/maven-public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                 <enabled>true</enabled>
            </snapshots>
          </repository>
          <pluginRepositories>
            <pluginRepository>
              <id>nexus</id>
              <url>http://192.168.1.90:8081/repository/maven-public/</url>
              <releases>
                <enabled>true</enabled>
              </releases>
              <snapshots>
                  <enabled>true</enabled>
              </snapshots>
            </pluginRepository>
          </pluginRepositories>
        </repositories>
    </profile>

  </profiles>

  <!-- activeProfiles
   | List of profiles that are active for all builds.
   |
  <activeProfiles>
    <activeProfile>alwaysActiveProfile</activeProfile>
    <activeProfile>anotherAlwaysActiveProfile</activeProfile>
  </activeProfiles>
  -->

  <activeProfiles>
    <activeProfile>local-nexus</activeProfile>
  </activeProfiles>

</settings>

选择启动maven路径

到此这篇关于教你安装eclipse2021并配置内网maven中心仓库的图文详解的文章就介绍到这了,更多相关eclipse配置maven中心仓库内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!

(0)

相关推荐

  • eclipse上配置Maven的图文教程(推荐)

    1.下载Maven版本 官网地址:http://maven.apache.org/download.cgi 直接下载Maven网址:https://mirrors.tuna.tsinghua.edu.cn/apache//maven/ 后缀为tar.gz的可用于Linux系统上,后缀为zip可直接用于windows系统上 binary表示编译后的二进制文件 source表示包含了源码 2.修改Maven配置文件参数(以apache-maven-3.3.9为例) apache-maven-3.3.

  • Eclipse中配置Maven的图文教程

    一. 安装Maven 下载地址:http://maven.apache.org/检查 JAVA_HOME 环境变量. Maven 是使用 Java 开发的,所以必须知道当前系统环境中 JDK 的安装目录. 解压 Maven 的核心程序 将 apache-maven-3.6.3-bin.zip 解压到一个非中文无空格的目录下配置环境变量. 查看 Maven 版本信息验证安装是否正确 二.设置Maven的配置文件 1. 配置本地仓库 Maven 的核心程序并不包含具体功能,仅负责宏观调度.具体功能由

  • java 配置MyEclipse Maven环境具体实现步骤

     java 配置MyEclipse Maven环境 虽然我的大部分项目已经迁到Idea上去了,但是在写部分小的测试程序的时候还是习惯性的会点开MyEclipse.之前使用第三方库的时候 我会习惯的下载jar包,然后build path导入,但是在idea中貌似通过配置maven依赖更方便,于是我在MyEclipse中也想使用pom.xml来导入依赖,在尝试的过程中遇到了些问题,我这里是记录解决这些问题的方法. 环境 Myeclipse for spring  2014 JRE 8 Maven 3

  • eclipse maven 插件的安装和配置详解

    maven3 安装: 安装 Maven 之前要求先确定你的 JDK 已经安装配置完成.Maven是 Apache 下的一个项目,目前最新版本是 3.0.4,我用的也是这个. 首先去官网下载 Maven:http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.4-bin.tar.gz 下载完成之后将其解压,我将解压后的文件夹重命名成 maven,并将它放在 D:\Server 目录下,即 maven 最终的路径是:D

  • Eclipse中配置Maven build打包的方法步骤

    目的:在Eclipse中配置Maven build打包 项目右击-->Run As-->Run Configurations 在左侧Maven Build下选中自己的工程名 然后在右侧Goals输入框中输入"clean package" 点击Apply完成配置,如图 注意: [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------

  • Eclipse maven项目lombok安装配置图解

    1.官网下载jar包 https://projectlombok.org/all-versions 2.双击运行jar包,并选择指定IDE安装 检查eclipse.ini文件最后是否添加了lombok jar包 3.重启eclipse 4.maven中引入依赖 <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version&

  • Eclipse中导入Maven Web项目并配置其在Tomcat中运行图文详解

    今天因为实习的关系需要讲公司已经开发的项目导入进Eclipse,而公司的项目是用Maven来构建的所以,需要将Maven项目导入进Eclipse下. 自己因为没有什么经验所以搞了得两个多小时,在这里和大家分享一下自己的经验已经在这之中遇到的一些问题. 首先我通过svn将公司的项目checkout到了本地. 因为Maven遵循的是规约比配置重要的原则,所以Maven项目的结构一般是进入目录后是一个pom.xml文件和一个src文件夹,当然可能还存在一些README之类的这些都不重要,最关键的就是p

  • 教你安装eclipse2021并配置内网maven中心仓库的图文详解

    下载Eclipse2021并运行安装包,选择Eclipse IDE for Java Developers 默认安装路径 ,点击 INSTALL进行安装 安装 中... 安装完成,点击LAUNCH启动Eclipse2021 选择默认工作空间  启 动并加载插件中... 成功启动并显示IDE界面 下面是内网Maven仓库 登陆内网仓库 并复制中心仓库地址: 添加maven路径 添加前提是你先安装好maven,这里安装的是maven 3.8.1 点击Finish完成添加 添加成功后会显示如下 添加m

  • 从web到内网渗透的一次过程详解

    目录 记一次从web到内网的渗透 拓扑图 环境介绍 渗透过程 target1 target2 taget3 记一次从web到内网的渗透 拓扑图 环境介绍 现在有三台机器,分别为target1,target2,target3,里面分别有三个flag,每个flag的分值不同,需要通过拿下一个已知IP(target1)进而向内网里面进行渗透,最终要成功获得三台主机权限 渗透过程 target1 使用nmap进行扫描 可以看到开启了80端口 浏览器访问目标靶机80端口 可以看到就是apache的默认页面

  • 内网环境下registry搭建步骤详解

    目录 背景 docker环境 配置http可访问 重新加载docker 启动registry 启动registry-web 背景 在实际的开发运维过程中,经常需要使用镜像仓库的情况,虽然阿里云.腾讯云等都提供了带有免费额度的镜像仓库服务,但是由于账号等问题,我们还是需要自己搭建一个镜像仓库服务,供内网环境下使用. 大致的步骤: 准备docker环境 配置非http访问( Insecure Registries) 重新家在docker 启动registry 启动registry-web docke

  • vue内置组件transition简单原理图文详解(小结)

    基本概念 Vue 在插入.更新或者移除 DOM 时,提供多种不同方式的应用过渡效果 在 CSS 过渡和动画中自动应用 class 可以配合使用第三方 CSS 动画库,如 Animate.css 在过渡钩子函数中使用 JavaScript 直接操作 DOM 可以配合使用第三方 JavaScript 动画库,如 Velocity.js 简单用法 用 v-if/v-show 控制显示隐藏,使用transition 组件控制其变化过程 一个页面子组件 router-view 的消失隐藏,使用transi

  • Linux安装mysql并配置外网访问的实例

    配置步骤 1.查看是否配置DNS 如果没有配置DNS参照前文配置DNS 配置相关 如果没有配置DNS yum命令找不到Linux软件库的 DNS配置免费的 DNS1=114.114.114.114即可,也可以加一个备用的DNS2=119.29.29.29 2.用yum安装mysql yum -y install mysql mysql-server mysql-dev 这里用yum 进行-y 同意操作,后面的三个软件分别是mysql, mysql-server,mysql-dev无关顺序 3.启

  • hadoop基于Linux7的安装配置图文详解

    如上图 准备好该准备的食材(ps:其中的hadoop-3.1.2-src更改为hadoop-3.1.2 src为源文件的意思? 反正就是换了 大家注意一下 后面截图有错的地方有空我再改吧 肝疼) 安装好centos7 桌面右键打开terminal--输入ifconfig--查看ens33的ip--记住然后打开xftp6 点击新建 把食材多选,右键传输即可,内网传输速度不快不慢 所示很完美了 解压hadoop安装包 tar -zxvf hadoop-3.1.2-src.tar.gz 重新装了cen

  • windows系统下node.js环境配置与安装教程图文详解(详细版)

    国内目前关注最高,维护最好的一个关于nodejs的网站应该是http://www.cnodejs.org/ windows系统下简单nodejs环境配置. 第一步:下载安装文件 下载地址:官网https://nodejs.org/en/download/ 这里用的是 第二步:安装nodejs 下载完成之后,双击 node-v6.9.1-x64.msi,开始安装nodejs,默认是安装在C:\Program Files\nodejs下面 第三步:安装相关环境 打开C:\Program Files\

  • python3.6环境安装+pip环境配置教程图文详解

    1.python安装可以跨平台 2.有两个版本2.7和3.6,第三方库适用2.7版,两个版本不兼容 windows安装: 第一种方法官网安装: 在官网下载安装包如图: 图下点击是默认下载32位所以我们需要历史版本下载 如图点击: 下载途中标记的: 按照图中箭头执行: 这里选中存放的路径和把配置环境变量选项勾上,如图: 安装完成 测试结果 如果出现图下的就是环境变量没有配置好: 配置环境变量: 把图中2个路径配置到环境变量中 再次输入python 如图: python就安装好了; 第二种安装方法,

  • JDK13.0.1安装与环境变量的配置教程图文详解(Win10平台为例)

    一.下载与安装 Oracle官网下载:https://www.oracle.com/technetwork/java/javase/downloads/index.html,点击右侧下载 接受并下载对应平台文件(Win10为例) 打开安装包,一路安装,记住安装目录即可(安装路径无中文) 我的路径:F:\Java\jdk-13.0.1 下载安装完成 二.配置环境变量 JDK12以后是没有JRE的安装的,JDK本身包含JRE,网上有生成JRE的方法,这里我们直接修改环境变量(后续遇到问题在进行更正)

  • CLion安装、汉化、配置图文详解

    CLion是一款专为开发C及C++所设计的跨平台IDE.它是以IntelliJ为基础设计的,包含了许多智能功能来提高开发人员的生产力,提高开发人员的工作效率. 这种强大的IDE帮助开发人员在Linux.OS X和Windows上来开发C/C++,同时它还使用智能编辑器来提高代码质量.自动代码重构并且深度整合CMake编译系统,从而提高开发人员的开发效率. 我们下载: clion 2018怎么破解?Jetbrains CLion 2018.1安装激活汉化配置图文教程 一.CLion下载安装(Win

随机推荐