Java SSM1——Maven

Java SSM1——Maven

1、下载

maven 官网:https://maven.apache.org/download.cgi

maven 百度云:https://pan.baidu.com/s/18XKbJp7P5x_BkKyc0VF0tw提取码:4zr9

2、安装

解压到想安装的目录下

在这里插入图片描述

添加环境变量

在这里插入图片描述

添加MAVEN_HOME变量

MAVEN_HOME
D:\apache-maven-3.6.3

在这里插入图片描述

在PATH中添加

%MAVEN_HOME%\bin

在这里插入图片描述

3、配置

本地仓库

<localRepository>D:\apache-maven-3.6.3\Repository</localRepository>

镜像

<mirror><id>nexus-aliyun</id>  <mirrorOf>*,!jeecg,!jeecg-snapshots</mirrorOf>  <name>Nexus aliyun</name>  <url>http://maven.aliyun.com/nexus/content/groups/public</url> 
</mirror>

完整配置

<?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 athttp://www.apache.org/licenses/LICENSE-2.0Unless 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:\apache-maven-3.6.3\Repository</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>nexus-aliyun</id>  <mirrorOf>*,!jeecg,!jeecg-snapshots</mirrorOf>  <name>Nexus aliyun</name>  <url>http://maven.aliyun.com/nexus/content/groups/public</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| 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>

4、pom.xml详解

<?xml version="1.0" encoding="UTF-8"?><!--Maven版本和头文件-->
<project 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><!--这里就是我们刚才配置的GAV--><groupId>com.kuang</groupId><artifactId>javaweb-01-maven</artifactId><version>1.0-SNAPSHOT</version><!--Package:项目的打包方式jar:java应用war:JavaWeb应用--><packaging>war</packaging><!--配置--><properties><!--项目的默认构建编码--><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><!--编码版本--><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target></properties><!--项目依赖--><dependencies><!--具体依赖的jar包配置文件--><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.11</version></dependency></dependencies><!--项目构建用的东西--><build><finalName>javaweb-01-maven</finalName><pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --><plugins><plugin><artifactId>maven-clean-plugin</artifactId><version>3.1.0</version></plugin><!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging --><plugin><artifactId>maven-resources-plugin</artifactId><version>3.0.2</version></plugin><plugin><artifactId>maven-compiler-plugin</artifactId><version>3.8.0</version></plugin><plugin><artifactId>maven-surefire-plugin</artifactId><version>2.22.1</version></plugin><plugin><artifactId>maven-war-plugin</artifactId><version>3.2.2</version></plugin><plugin><artifactId>maven-install-plugin</artifactId><version>2.5.2</version></plugin><plugin><artifactId>maven-deploy-plugin</artifactId><version>2.8.2</version></plugin></plugins></pluginManagement></build>
</project>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/557463.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

2021年广西艺术高考成绩查询,2021年广西美术高考成绩查询网址:https://www.gxeea.cn/...

【导语】2021年广西美术高考成绩查询入口开通后&#xff0c;考生可登录广西教育考试院(https://www.gxeea.cn/)高考服务平台或点击下方链接进入广西美术考成绩查询系统。具体如下&#xff1a;2021年广西美术高考成绩查询入口开通后&#xff0c;考生可以通过黑龙江教育考试院(ht…

齐浩亮 计算机科学与技术,齐浩亮

齐浩亮&#xff0c;男&#xff0c;1972年2月出生&#xff0c;计算机科学与技术系副教授&#xff0c;工学博士。2007年5月获哈尔滨工业大学计算机应用技术专业博士学位。现任黑龙江工程学院计算机应用技术研究所所长&#xff0c;哈尔滨院士专家团成员&#xff0c;YOCSEF哈尔滨20…

Java SSM篇2——框架的基本认识

Java SSM篇2——框架的基本认识 1、什么是框架 框架就是一套规范&#xff0c;既然是规范&#xff0c;你使用这个框架就要遵守这个框架所规定的约束框架可以理解为半成品软件&#xff0c;框架做好以后&#xff0c;接下来在它基础上进行开发 2、为什么使用框架 框架为我们封装…

Java SSM篇3——Mybatis

Java SSM篇3——Mybatis 1、JDBC存在的问题 数据库连接创建、释放频繁造成系统资源浪费从而影响系统性能sql 语句在代码中硬编码&#xff0c;造成代码不易维护&#xff0c;实际应用 sql 变化的可能较大&#xff0c;sql 变动需要改变java 代码查询操作时&#xff0c;需要手动将…

在职研究生计算机科学与技术考研考哪些科目,计算机在职研究生考试科目

计算机在职研究生以三种方式来报考&#xff0c;分别是同等学力申硕、中外合作办学硕士、非全日制研究生。三种报考方式考试科目不同&#xff0c;下面为大家具体介绍一下。一、同等学力申硕考试科目&#xff1a;该方式考试科目主要有两科&#xff1a;外国语和学科综合。外国语&a…

Java SSM4——Spring

Java SSM4——Spring Spring是一个轻量级的控制反转(IoC)和面向切面(AOP)的容器&#xff08;框架&#xff09; Spring的优势 方便解耦&#xff0c;简化开发 Spring就是一个容器&#xff0c;可以将所有对象创建和关系维护交给Spring管理 什么是耦合度&#xff1f;对象之间的关…

html文件怎么导出stl文件,3D建模软件导出STL文件的小技巧(一)

很多用户在提交3D模型文件的时候&#xff0c;常常有这样的困惑&#xff1a;什么是STL 格式文件&#xff0c;怎么获取STL 格式文件呢&#xff1f;STL 格式文件是在计算机图形应用系统中&#xff0c;用于表示三角形网格的一种文件格式。它也是3D打印机在执行3D打印程序时&#xf…

Java SSM篇5——SpringMVC

Java SSM篇5——SpringMVC 1、MVC模式 MVC是软件工程中的一种软件架构模式&#xff0c;它是一种分离业务逻辑与显示界面的开发思想 M&#xff08;model&#xff09;模型&#xff1a;处理业务逻辑&#xff0c;封装实体V&#xff08;view&#xff09; 视图&#xff1a;展示内容…

空中最亮的星用计算机弹数字,赤峰——夜空中最亮的星_数字展示在线

8月25日&#xff0c;赤峰新区夜景照明改造升级PPP项目在新区管委会签约&#xff0c;这标志着全国首个城市夜景照明PPP项目正式落地。一切都从这一张照片开始在一个晴朗的夜晚摄影师拍下这张夜景之后赤峰便美得一发不可收拾这就是赤峰全国首个PPP夜景照明工程。项目一期包括八家…

计算机仿真在电力领域的应用,仿真技术在电力系统中的应用实例

自20世纪80年代末至今&#xff0c;我国的仿真技术获得了极大的发展。在电力系统中&#xff0c;应用较多的培训仿真系统有电厂仿真、电网运行工况仿真和变电所仿真。一般说来&#xff0c;凡是需要有一个或一组熟练人员进行操作、控制、管理与决策的实际系统&#xff0c;都需要对…

JAVA分布式篇2——Zookeeper

JAVA分布式篇2——Zookeeper 1、简介 Zookeeper是一个开源的分布式&#xff08;多台服务器干一件事&#xff09;的&#xff0c;为分布式应用提供协调服务的 Apache项目 2、工作机制 Zookeeper从设计模式角度来理解&#xff1a;是一个基于观察者模式&#xff08;一个人干活&a…

JAVA分布式篇3——Dubbo

JAVA分布式篇3——Dubbo 1、架构演变 1.1、单应用架构 当网站流量很小时&#xff0c;只需要一个应用&#xff0c;将所有的功能部署到一起&#xff08;所有业务都放在一个tomcat 里&#xff09;&#xff0c;从而减少部署节点和成本用于简化 增删改查 工作量的数据访问框架 &a…

淮北市成人学计算机学校,安徽淮北市成人学电脑?

安徽淮北市成人学电脑&#xff1f;-"零基础"入学,签订就业协议,保证就业薪资,先就业后付款让你学习无忧就业无忧!成人学电脑 安徽成人学电脑 淮北市成人学电脑学电脑找高薪就业it专业就选择VR环境艺术创意设计师&#xff1a;专业优势&#xff0c;装饰行业需要人才时代…

Java分布式篇4——Redis

Java分布式篇4——Redis 1、互联网架构的演变历程 1.1、第一阶段 数据访问量不大&#xff0c;简单的架构即可搞定&#xff01; 1.2、第二阶段 数据访问量大&#xff0c;使用缓存技术来缓解数据库的压力不同的业务访问不同的数据库 1.3、第三阶段 主从读写分离。 之前的缓存…

计算机win7无法安装,新机装不了Win7?照这个方法5分钟搞定!

昨天有小伙伴在评论留言7代酷睿装不了Win7&#xff0c;评论回复有字数限制&#xff0c;小编今天就着重针对100/200系列主板安装Win7给大家推送一个教程&#xff0c;包括USB 3.0驱动和NVME驱动全部搞定&#xff0c;装Win7没有那难&#xff01;首先&#xff0c;下载Win7的原版镜像…

Java分布式篇5——FastDFS

Java分布式篇5——FastDFS 分布式文件系统 1、主流的分布式文件系统 1.1、 HDFS (Hadoop Distributed File System)Hadoop 分布式文件系统 高容错的系统&#xff0c;适合部署到廉价的机器上能提供高吞吐量的数据访问&#xff0c;非常适合大规模数据应用HDFS采用主从结构&a…

如何导出计算机硬盘重数据,硬盘对拷教程,100%保存原硬盘数据

硬盘对拷是老生常谈的问题&#xff0c;网上教程一搜一大把&#xff0c;这里也不是我原创了&#xff0c;就拷贝中关村的一篇写的比较详细的&#xff0c;普及下小白吧&#xff01;●Ghost硬盘对拷优点&#xff1a;全盘完全100%对拷&#xff0c;包括原有操作系统也可使用。新硬盘对…

Java分布式篇6——RabbitMQ

Java分布式篇6——RabbitMQ 1、MQ&#xff08;Message Queue&#xff09;消息队列 消息队列中间件&#xff0c;是分布式系统中的重要组件主要解决&#xff0c;异步处理&#xff0c;应用解耦&#xff0c;流量削峰等问题实现高性能&#xff0c;高可用&#xff0c;可伸缩和最终一…

windows7计算机启动修复怎么办,Win7电脑开机提示启动修复无法进入系统怎么办?...

近日一位Win7系统用户向我们反映&#xff0c;他的电脑在开机的过程中出现了启动修复的提示&#xff0c;导致无法正常进入系统&#xff0c;对于该问题应该如何解决呢&#xff1f;其实这个问题是很多Win7用户都碰到过的&#xff0c;因此本文就给大家介绍三种有效的解决方法。启动…

Java微服务篇1——SpringBoot

Java微服务篇1——SpringBoot 1、什么是springboot 1.1、Spring出现的问题 Spring是Java企业版&#xff08;Java Enterprise Edition&#xff0c;JEE&#xff0c;也称J2EE&#xff09;的轻量级代替品。无需开发重量级的 Enterprise Java Bean&#xff08;EJB&#xff09;&am…