maven配置(个人记录向)(代码片段)

霜序0.2℃ 霜序0.2℃     2023-01-12     161

关键词:

<?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.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
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: $user.home/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
  <!--自己设置的-->
  <localRepository>D:/mavenRepository</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
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
    <mirror>
      <id>alimaven</id>
      <mirrorOf>central</mirrorOf>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
    </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>
      <id>jdk-1.8</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <jdk>1.8</jdk>
      </activation>

      <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
      </properties>
    </profile>

    <!-- 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>
    -->
  </profiles>

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

记录一下在学oracle中遇到的坑(个人记录向)(代码片段)

记录一下在学oracle中遇到的坑问题打不开OEM–>OC4JConfigurationissue.xxxnotfound–>查方法–>emctlstartdbconsole–>无法打开–>emca-configdbcontroldb-reposcreate–>然后发生错误重装之后输入emctlstartdbconsole;本来没安装客户端的,报错Env... 查看详情

github建立个人maven仓库(代码片段)

一、配置github创建mvn-repo仓库   首先在你的github上创建一个maven-repo仓库,这个最后将作为实际上jar包发布的仓库。设置name    在github的个人设置中,设置好自己的姓名。这个环节很重要,若不设置姓名... 查看详情

③maven创建maven工程,解读核心配置。(代码片段)

...学习社区:进去逛一逛~创建Maven工程,解读核心配置。一、创建Maven工程二、解读核心配置一、创建Maven工程生成Maven工程的命令行mvnarchetype:generateChooseanumberorapplyfilter(format:[groupId:]artifactId,casesensitivecontains):7:(默认选... 查看详情

maven中几个标签配置记录(代码片段)

一、dependencyManagement标签<dependencyManagement>标签在父工程的pom中定义,用于声明所依赖的jar包的版本号等信息,那么所有子项目再次引入此依赖jar包时则无需显式的列出版本号。Maven会沿着父子层级向上寻找拥有dependenc... 查看详情

maven中几个标签配置记录(代码片段)

一、dependencyManagement标签<dependencyManagement>标签在父工程的pom中定义,用于声明所依赖的jar包的版本号等信息,那么所有子项目再次引入此依赖jar包时则无需显式的列出版本号。Maven会沿着父子层级向上寻找拥有dependenc... 查看详情

个人博客设计mavenmaven的安装与配置(代码片段)

...ven来管理的,在使用之后,可以说是非常方便的。安装与配置安装第一步:下载镜像apache镜像(我下载的是3.3.9)第二步:解压缩我的解压缩目录是E:LOMTOM_STUecpliseapache-maven-3.3.9第四步:测试打开cmd,输入mvn-v配置第五步:配置jdk... 查看详情

idea个人常用配置记录.md(代码片段)

目录一、常用快捷键二、技巧一、常用快捷键调试Ctrl+D:调试运行F8:跳到下一步F7:进入方法内部Shift+F8:跳到下一个断点或者跳出方法重构?+Shift+V:访问历史粘贴板?+Shift+.:折叠指定方法、代码块?+Shift+-:折叠所有方法?+Shift++... 查看详情

运维日常集合(个人向坚持更新)(代码片段)

运维日常集合(个人向)日常运维常用集合,分三部分windows、linux、Python得益于python工具便利性,使得运维的工作大大减少。Shell清除其他终端who//查看在线终端pkill-9-tpts/2找出内存消耗的进程排序psaux--sort=-rss|head-n4找出CPU消耗的... 查看详情

hexo+githubpages搭建个人博客(代码片段)

由于希望通过配置个人博客逐步学习,之前有搭建过好几个,都因为长时间荒废,学习和记录目的都没有达到,这里重头开始记录。一是警醒自己,二是作为记录以便查阅。主要步骤:1.github个人代码仓库配置git配置设置user.name... 查看详情

ssm整合配置以及一个简单登陆案例(个人记录)(代码片段)

SSM 文件以及大部分参考博客 https://blog.csdn.net/qq598535550/article/details/51703190 简答的登陆注册案例下载链接在末尾补贴图了我建立的是IDEAmaven 项目 pomxml 文件如下1<?xmlversion="1.0"encoding="UTF-8"?>23& 查看详情

ruoyi-框架(分离版)个人学习记录(代码片段)

目录新建子模块网页标题修改 URL子路径追加打包新建子模块Maven多模块下新建子模块流程案例。1、新建一个业务模块目录bsdd-student。2、在 bsdd-student业务模块下新建pom.xml文件,以及src\\main\\java,src\\main\\resources目录。pom... 查看详情

idea使用maven进行打包详细记录(代码片段)

...运行成功。特此记录一下,用maven进行打包!一、配置pom.xml文件<build><plugins><plugin><groupId>org.springframew 查看详情

1.mybatis查询小测试-配置文件记录(代码片段)

1.pom.xml<?xmlversion="1.0"encoding="UTF-8"?><projectxmlns="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.0http://maven.apache.org/xsd/maven-4... 查看详情

jenkins+git+maven配置注意事项(坑)(代码片段)

jenkins+git+maven配置注意事项最近需要配置一套jenkins环境,将手上的一个项目整合。配置过程中遇到一些坑,以前也遇到过但没有记录下来,现在想不起具体原因,所以又把所以的坑踩了一遍花了大概半天时... 查看详情

mac下载maven并配置环境变量(代码片段)

一、背景每次重装系统或者更换新电脑都需要配置Maven环境变量。在这里简单记录下过程,方便后续再次配置时参考,也给需要的同学以参考。二、配置步骤2.0下载maven如果还没有下载,可以在官网下载:https://mave... 查看详情

mac下载maven并配置环境变量(代码片段)

一、背景每次重装系统或者更换新电脑都需要配置Maven环境变量。在这里简单记录下过程,方便后续再次配置时参考,也给需要的同学以参考。二、配置步骤2.0下载maven如果还没有下载,可以在官网下载:https://mave... 查看详情

vscode的一些个人配置(代码片段)

...来记录我在使用vsCode中的一些个人习惯设置。编辑器主题配置主题我是用的是escook-theme,这是我在看某视频教程时发现的一款看起来非常友好的vsCode主题。文件图标主题MaterialIconTheme这个用的人数还是挺多的,看起来也是很好的... 查看详情

githubpages+hexo搭建个人博客网站-github风格-采坑记录(代码片段)

目录1.本机安装nodejs2.github上创建仓库3.安装hexo4.hexo主题5.配置主题6.添加文章7.使用分类和标签8.增加文章目录9.推送github使用githubpages+hexo搭建个人博客,网上很多教程,这里并不具体记录,只是记录下自己搭建过程中遇到的一些... 查看详情