知识分享之Java——Maven的settings常用配置文件

简介: 日常我们开发时,我们会遇到各种各样的奇奇怪怪的问题(踩坑o(╯□╰)o),这个常见问题系列就是我日常遇到的一些问题的记录文章系列,这里整理汇总后分享给大家,让其还在深坑中的小伙伴有绳索能爬出来。同时在这里也欢迎大家把自己遇到的问题留言或私信给我,我看看其能否给大家解决。

知识分享之Java——Maven的settings常用配置文件

背景

日常我们开发时,我们会遇到各种各样的奇奇怪怪的问题(踩坑o(╯□╰)o),这个常见问题系列就是我日常遇到的一些问题的记录文章系列,这里整理汇总后分享给大家,让其还在深坑中的小伙伴有绳索能爬出来。
同时在这里也欢迎大家把自己遇到的问题留言或私信给我,我看看其能否给大家解决。

开发环境

  • 系统:windows10
  • JDK:openjdk11
  • 开发工具:IDEA 教育版
  • 框架:SpringBoot
  • 包管理:Gradle

内容

本篇主要用于记录日常我们比较常用的settings配置文件,大家有需要的可以直接复制文章中的配置信息快速使用。

<?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">
  <profiles>
    <profile>
      <id>pentaho</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>pentaho-public</id>
          <name>Pentaho Public</name>
          <url>https://repo.orl.eng.hitachivantara.com/artifactory/pnt-mvn/</url>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>pentaho-public</id>
          <name>Pentaho Public</name>
          <url>https://repo.orl.eng.hitachivantara.com/artifactory/pnt-mvn/</url>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
    <profile>
        <id>aliyun</id>
        <repositories>
            <repository>
                <id>aliyun</id>
                <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>aliyun</id>
                <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </pluginRepository>
        </pluginRepositories>
    </profile>
    <profile>
      <id>activiti-repos2</id>
      <repositories>
        <repository>  
          <id>activiti-repos2</id>  
          <name>Activiti Repository 2</name>  
          <url>https://app.camunda.com/nexus/content/groups/public</url>
        </repository>  
      </repositories>
    </profile>
    <profile> 
      <id>mvnrepository</id>
      <repositories> 
        <repository> 
          <id>mvnrepository</id> 
          <name>mvnrepository</name> 
          <url>http://www.mvnrepository.com</url> 
        </repository> 
      </repositories> 
    </profile>
  </profiles>

  <!-- this lets you call plugins from these groups in their short form -->
  <pluginGroups>
    <pluginGroup>org.pentaho.maven.plugins</pluginGroup>
    <pluginGroup>com.pentaho.maven.plugins</pluginGroup>
    <pluginGroup>com.github.spotbugs</pluginGroup>
  </pluginGroups>
  <activeProfiles>
      <activeProfile>aliyun</activeProfile>
      <activeProfile>pentaho</activeProfile>
      <activeProfile>activiti-repos2</activeProfile>
      <activeProfile>mvnrepository</activeProfile>
  </activeProfiles>
</settings>

这里面包含了很多我们的常用库,使用时将不需要的去除即可。

本文声明:

5330898-d1c72b6c90e378f3.png
知识共享许可协议
本作品由 cn華少 采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可。

目录
相关文章
|
15天前
|
XML Java Maven
Maven 构建配置文件
Maven 构建配置文件
|
19天前
|
XML Java Maven
Maven 构建配置文件
Maven 构建配置文件
|
21天前
|
XML Java Maven
Maven 构建配置文件
Maven 构建配置文件
|
9天前
|
XML Java Maven
Maven 构建配置文件
Maven 构建配置文件
|
13天前
|
XML Java Maven
Maven 构建配置文件
Maven 构建配置文件
|
11天前
|
XML Java Maven
Maven 构建配置文件
Maven 构建配置文件
|
17天前
|
XML Java Maven
Maven 构建配置文件
Maven 构建配置文件
|
25天前
|
XML Java Maven
Maven 构建配置文件
Maven 构建配置文件
|
23天前
|
XML Java Maven
Maven 构建配置文件
Maven 构建配置文件
|
19天前
|
XML Java Maven
Maven 构建配置文件
Maven 构建配置文件
下一篇
无影云桌面