settings.xml的文件配置大全

settings.xml 文件中最常配置的还是这几个标签
localRepositorymirrors

settings.xml文件官方文档地址

<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 https://maven.apache.org/xsd/settings-1.0.0.xsd">
  
    
    <localRepository>${user.home}/.m2/repositorylocalRepository>
    
    <interactiveMode>trueinteractiveMode>
    
    <offline>falseoffline>
    
    
  	<pluginGroups>
    	<pluginGroup>org.apache.maven.pluginspluginGroup>
	pluginGroups>
	
    
    <servers>
        <server>
            <id>my-remote-repositoryid>
            <username>adminusername>
            <password>password123password>
        server>
    servers>
    
    
  	<mirrors>
      <mirror> 
            <id>alimavenid>  
            <name>aliyun mavenname>  
            <url>http://maven.aliyun.com/nexus/content/groups/public/url>  
            <mirrorOf>centralmirrorOf> 
      mirror>
  	mirrors>
  	
    
  	<proxies>
       <proxy>
          <id>example-proxyid>
          <active>trueactive>
          <protocol>httpprotocol>
          <host>proxy.example.comhost>
          <port>8080port>
          <username>proxyuserusername>
          <password>somepasswordpassword>
          <nonProxyHosts>www.google.com|*.example.comnonProxyHosts>
       proxy>
    proxies>
    
	
    <profiles>
        <profile>
            <id>windows-profileid>
            <activation>
                <os>
                    <family>Windowsfamily>
                os>
            activation>
            <properties>
                <path.separator>\path.separator>
            properties>
        profile>

        <profile>
            <id>unix-profileid>
            <activation>
                <os>
                    <family>unixfamily>
                os>
            activation>
            <properties>
                <path.separator>/path.separator>
            properties>
        profile>
    profiles>
    
    <activeProfiles>
       <activeProfile>dev-profileactiveProfile>
    activeProfiles>
settings>

nexus 私服信息一般时配置到pom.xml文件中,作为项目私有。

你可能感兴趣的:(xml,maven)