Maven使用私服setting.xml中的配置

Maven使用私服setting.xml中的配置


setting.xml中的配置

使用maven,每次都是从中央仓库下载依赖包,网络很渣,只有使用Nexus搭建个私服。

下面是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">
    <!-- 本地仓库的地址 -->
  <localRepository>D:/repository</localRepository>
  <pluginGroups>
  </pluginGroups>
  <proxies>
  </proxies>
  <servers>
    <!-- server的账户 -->
   <server>
        <id>releases</id>
        <username>admin</username>
        <password>admin123</password>
    </server>
  </servers>
  <mirrors>
    <mirror>
        <!-- 私服的地址-->
        <id>public</id>
        <name>internal nexus repository</name>
      <url> http://192.168.1.120:8081/nexus/content/groups/public/</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>
  <profiles>
  </profiles>
</settings>

版权声明:本文为博主原创文章,未经博主允许不得转载。

时间: 2024-08-26 14:34:43

Maven使用私服setting.xml中的配置的相关文章

maven私服setting 和pom的配置信息

<?xml version="1.0" encoding="UTF-8"?> <!-- -------------------------------------------------在父类POM的配置如下: --> <!-- 本地快照 和release 发布 的配置 --> <distributionManagement> <repository> <!-- ID要和MAVEN中conif/set

Servlet在web.xml中的配置

import javax.servlet.*; import java.io.IOException; import java.io.PipedWriter; import java.io.PrintWriter; /** * Created with IntelliJ IDEA. * User: wbb * Date: 14-6-17 * Time: 上午11:56 * To change this template use File | Settings | File Templates.

springmvc在web.xml中的配置详解

                          <servlet> <servlet-name>springMvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-

NHibernate支持的数据库 NHibernate连接配置 hibernate.cfg.xml中的配置

使用下列数据库时hibernate.cfg.xml中的配置 Microsoft SQL Server 2005/2000 配置如下: <?xml version="1.0" ?>  <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >      <session-factory>          <property name="co

Maven3在setting.xml中配置代理

在特殊的网络策略环境下,可能要需要开发人员通过代理服务器来访问互联网.此时就需要给Maven配置代理服务来访问仓库.更新相关资源. 打开setting.xml文件 <proxies> <proxy> <id>myProxy</id> <active>true</active> <protocol>http</protocol> <host>123.123.123.123</host> &

maven的配置文件setting.xml详解

<?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 h

IDEA导入maven工程以及web.xml中spring配置文件文件加载不到的问题

使用idea导入maven工程,工程只留了src和pom.xml文件 1.从打开idea中导入:File ----> New -----> Project from Existing Sources.如下图: 2.选择你所要导入的项目.点击ok 3.一定要选择; 第二个  :Import project from external model    从外部模型导入项目,然后点击Next 4.下一步......选择你需要的jdk.然后:项目名称一定和文件名称一致,然后点击Filish就OK了 首

Spring之AOP在XML中的配置方法

AOP 即 Aspect Oriental Program 面向切面编程 先来一个栗子: <aop:config> <aop:pointcut id="loggerCutpoint" expression= "execution(* com.how2java.service.ProductService.*(..)) "/> <aop:aspect id="logAspect" ref="loggerAsp

spring mvc在web.xml中的配置

spring mvc将所有的请求都经过一个servlet控制器-DispatcherServlet,这个servlet的工作就是将一个客户端的request请求分发给不同的springmvc控制器,既然是一个控制器Servlet就需要在web.xml中配置. <servlet> <servlet-name>springmvc</servlet-name> <servlet-class>org.springframework.web.servlet.Dispa