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、为什么使用框架 框架为我们封装…

计算机专业合成词,大学计算机论文范文大全.docx

大学计算机论文范文大全浅谈大学计算机专业英语双语教学摘要&#xff1a;本文针对计算机专业双语教学中存在的学生抵触、教师理解不足和教法单一等问题提出了改进的方案。关键词&#xff1a;计算机;英语双语教学;教育2001年&#xff0c;教育部对双语教学提出了具体明确的要求。…

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;对象之间的关…

计算机网络子网划分路由配置实验报告,完整的子网划分与路由交换实验报告 珍藏版哦...

洛阳理工学院实验报告系别班级学号姓名 课程名称 计算机网络实验日期实验名称 子网的划分路由器的配置 成绩实验目的&#xff1a;1&#xff1a;知道如何配置路由器信息 2&#xff1a;知道如何划分子网信息实验条件&#xff1a;电脑一台 packet tracer 运行环境【实验内容】在本…

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夜景照明工程。项目一期包括八家…

Java SSM6——SSM整合

Java SSM6——SSM整合 1、Mybatis 1.1、数据库准备 CREATE TABLE person(id INT PRIMARY KEY,NAME VARCHAR(10),PASSWORD VARCHAR(10) ); INSERT INTO person VALUES (1,"root","123");1.2、创建maven工程&#xff0c;导入依赖 <dependencies>&l…

计算机基础知识掌握欠缺,浅谈计算机基础课程教学

浅谈计算机基础课程教学文章基于目前高职院校计算机基础课程的现状,重点对分(本文共2页)阅读全文>>本文主要通过对高职高专计算机课程的教学研究,提出教学中注重培养高素质,技能型人才的重...(本文共1页)阅读全文>>随着我国科技的快速发展,网络技术在各个行业领域都…

JAVA分布式篇1——Linux

JAVA分布式篇1——Linux 1、linux命令 1.1、常用指令 ls   显示文件或目录 -l 列出文件详细信息l(list)-a 列出当前目录下所有文件及目录&#xff0c;包括隐藏的a(all)mkdir 创建目录 -p 创建目录&#xff0c;若无父目录&#xff0c;则创建p…

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

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

华中科技大学计算机学院考研大纲,2021华中科技大学考研大纲参考书目汇总

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼资料下载地址&#xff1a;http://fangcai.100xuexi.com/Ebook/DigitalLibrary/BookNew.aspx?BookName%u534E%u4E2D%u79D1%u6280%u5927%u5B66[视频]华中科技大学社会学院《437社会工作实务》[专业硕士]网授精讲班【大纲精讲】 [视频…

JAVA分布式篇2——Zookeeper

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

用计算机弹奏曲子童年,5.这首曲子使我想起了我的童年.十.书面表达现在.计算机游戏非常盛行.这是一件好事还是一件坏事?请你用英语写一篇短文来陈述自己的观点.并说明理由.字数:80-120....

5&#xff0e;这首曲子使我想起了我的童年.十.书面表达现在.计算机游戏非常盛行.这是一件好事还是一件坏事?请你用英语写一篇短文来陈述自己的观点.并说明理由.字数:80-120.【查看更多】题目列表(包括答案和解析)将下列英语句子译成汉语&#xff0c;汉语句子译成英语每空填写一…

JAVA分布式篇3——Dubbo

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

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

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