[maven] scopes 管理 profile 测试覆盖率

news2024/9/21 16:44:28

[maven] scopes & 管理 & profile & 测试覆盖率

这里将一些其他的特性和测试覆盖率(主要是 jacoco)

scopes

maven 的 scope 主要就是用来限制和管理依赖的传递性,简单的说就是,每一个 scope 都有其对应的特性,并且会决定依赖包在打包和运行时是否会被使用

这里主要谈论的差别是 compile classpath 和 runtime classpath,前者是编译时存在的环境,后者是运行时存在的环境。

总共有 6 个 scopes

  • compile (default)

    这个是默认的 scope,这个 scope 下的依赖会被打包到代码的最终代码里,它也代表着该依赖会被保存到 compile classpath 和 runtime classpath,粗暴的理解就是,打包好的 jar/war 文件会包含 runtime classpath 的代码

  • provided

    这个 scope 代表着在部署时,JDK 或者容器在运行时会提供该依赖,所以在 compile classpath 可以找到这个依赖,但是 runtime classpath 中不会

    例子就是 tomcat 这种 servlet api,编译时肯定是需要的,但是部署时肯定,环境里自己会启一个 servlet,因此 runtime classpath 不需要包涵

  • runtime

    这个 scope 意味着依赖在编译时不需要,但是运行时需要,比如说 JDBC driver

  • test

    顾名思义,只需要用在编译和测试,不会打包到最终的代码里

  • system

    这个挺少用的,因为一旦用它就代表着要用到 systemPath 相关,也就会变得非常依赖于系统,似的其可移植性变低

  • import

    比较特殊的 scope,用在 BOM 这种特殊的依赖,主要用来管理其他依赖版本

目前来说,从 central repo 上拉下来的 scope 还是比较准的,比如说 junit 相关的 scope 就是 test,不过这也可以按需修改。

项目管理

这里分为三个部分:

  • 依赖管理
  • 插件管理
  • 版本管理

主要应用场景都是对于依赖/插件的版本控制。重载版本的情况下,越下层(靠近执行项目的 pom)的值会取代上层设置的值

依赖管理

这个主要是通过在父元素中实现 dependencyManagement,这样子元素中就不用重新声明版本,方便进行统一管理。

在父元素中定义 junit 的版本:

<?xml version="1.0" encoding="UTF-8"?>

<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>

	<groupId>com.goldenaarcher.product</groupId>
	<artifactId>productparent</artifactId>
	<version>1.0</version>
	<packaging>pom</packaging>

	<name>productparent</name>
	<!-- FIXME change it to the project's website -->
	<url>http://www.example.com</url>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.11</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<modules>
		<module>productservices</module>
		<module>productweb</module>
	</modules>
</project>

这个时候,如果子项目中重新声明了版本,eclipse 就会出现这样的报错:

在这里插入图片描述

子项目中的 pom 荏苒需要按需定义使用的依赖,只不过就可以跳过版本声明,方便统一管理

插件管理

插件管理有个相似的 pluginManagement,不过它需要被放到 build 下:

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.0</version>
					<configuration>
						<release>17</release>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

同理,子项目中也是需要声明同样的插件,但是可以不用实现 versionconviguration

版本管理

除了直接将版本写到 version 中,如果一些依赖(如 spring 全家桶)都需要使用同一个版本,与其重复 cv,也可以在 properties 中声明版本变量,方便管理:

	<properties>
		<java.version>17</java.version>
		<junit.version>5.10.0</junit.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-engine</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.0</version>
					<configuration>
						<release>${java.version}</release>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

profiles

profile 是一些配置型的内容,可以用来重写默认值。

maven 中也可以用不同的项目家在加载不同的配置文件,祈祷方便管理的作用。

创建新项目

选择 quickstart 创建一个新的 demo 项目即可

创建配置文件

这里的 profile 和 main 同级,新建 3 个案例即可:

❯ tree src
src
├── main
│   ├── java
│   │   └── com
│   │       └── goldenaarcher
│   │           └── maven
│   │               └── profiledemo
│   │                   └── App.java
│   └── profiles
│       ├── dev
│       │   └── application.properties
│       ├── prod
│       │   └── application.properties
│       └── test
│           └── application.properties
└── test
    └── java
        └── com
            └── goldenaarcher
                └── maven
                    └── profiledemo
                        └── AppTest.java

里面的内容也很简单:

cat src/main/profiles/dev/application.properties
db.url=devurl
db.userName=dev
db.password=dev%

其实 profiles 也可以放在其他地方,我记得一个项目是放到 resources 里,这点看项目习惯

配置 profile

profile 直接放在 xml 下即可:

	<profiles>
		<profile>
			<id>dev</id>
			<properties>
				<build.profile.id>dev</build.profile.id>
			</properties>
			<build>
				<resources>
					<resource>
						<directory>src/main/profiles/dev</directory>
					</resource>
				</resources>
			</build>
		</profile>

		<profile>
			<id>prod</id>
			<properties>
				<build.profile.id>prod</build.profile.id>
			</properties>
			<build>
				<resources>
					<resource>
						<directory>src/main/profiles/prod</directory>
					</resource>
				</resources>
			</build>
		</profile>

		<profile>
			<id>test</id>
			<properties>
				<build.profile.id>test</build.profile.id>
			</properties>
			<build>
				<resources>
					<resource>
						<directory>src/main/profiles/test</directory>
					</resource>
				</resources>
			</build>
		</profile>
	</profiles>

只有一个 profile 的话不需要设置 id,有一个以上不设置会报错

profile 使用案例

命令行执行 profile

语法为: mvn <lifecycle-phase> -P<profile-name>

如:

❯ mvn install -Pdev
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.goldenaarcher.maven:profiledemo >-----------------
[INFO] Building profiledemo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ profiledemo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ profiledemo ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/louhan/study/maven/profiledemo/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ profiledemo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/louhan/study/maven/profiledemo/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ profiledemo ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/louhan/study/maven/profiledemo/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ profiledemo ---
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.goldenaarcher.maven.profiledemo.AppTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.022 s - in com.goldenaarcher.maven.profiledemo.AppTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ profiledemo ---
[INFO] Building jar: /Users/louhan/study/maven/profiledemo/target/profiledemo-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ profiledemo ---
[INFO] Installing /Users/louhan/study/maven/profiledemo/target/profiledemo-0.0.1-SNAPSHOT.jar to /Users/louhan/.m2/repository/com/goldenaarcher/maven/profiledemo/0.0.1-SNAPSHOT/profiledemo-0.0.1-SNAPSHOT.jar
[INFO] Installing /Users/louhan/study/maven/profiledemo/pom.xml to /Users/louhan/.m2/repository/com/goldenaarcher/maven/profiledemo/0.0.1-SNAPSHOT/profiledemo-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.714 s
[INFO] Finished at: 2023-09-14T22:44:31-04:00
[INFO] ------------------------------------------------------------------------

如果解压打包好的 jar 文件,就能看到里面的 application.properties 内容如下:

cat target/profiledemo-0.0.1-SNAPSHOT/application.properties
db.url=devurl
db.userName=dev
db.password=dev%

eclipse 中设置

这个在 project properties 修改就行:

在这里插入图片描述

jacoco 代码覆盖率

sonarqube 执行失败

jacoco

修改 pom:

    <build>
		<plugins>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.7</version>
				<executions>
					<execution>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
    </build>

这个 plugin 放到 pluginManagement 下管理会报错,但是拉出来直接放到 build 下就好了,原因未明,从 Stack Overflow 上找到的解决方法:maven jacoco: not generating code coverage report

简单的过一遍 xml 的配置,goal 在 [maven] maven 简述及使用 maven 管理单个项目 提过了,execution 没有。

goal 是 plugin 提供的,这里只是负责调用。

execution 是用来配置 goal 应该在哪个 phase 中执行,这里有两个 execution,第一个 goal 就是 jacoco 提供的 prepare-agent,其他忽略代表着会从头开始执行。

第二个 execution 指定的是生成报告的阶段,生成测试报告的 phase 应该是测试,所以就是在测试这个 phase 执行 report 这个 goal。

运行结果:

# 这里需要用verify不能用test,test会跳过report
❯ mvn clean verify
[INFO] Scanning for projects...
[INFO]
[INFO] -------------< com.goldenaarcher.product:productservices >--------------
[INFO] Building productservices 1.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ productservices ---
[INFO] Deleting /Users/louhan/study/maven/parent/productservices/target
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.7:prepare-agent (default) @ productservices ---
[INFO] argLine set to -javaagent:/Users/louhan/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/Users/louhan/study/maven/parent/productservices/target/jacoco.exec
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ productservices ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/louhan/study/maven/parent/productservices/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ productservices ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 5 source files to /Users/louhan/study/maven/parent/productservices/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ productservices ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/louhan/study/maven/parent/productservices/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ productservices ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /Users/louhan/study/maven/parent/productservices/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ productservices ---
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.goldenaarcher.product.dao.ProductDAOImplTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.07 s - in com.goldenaarcher.product.dao.ProductDAOImplTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.7:report (report) @ productservices ---
[INFO] Loading execution data file /Users/louhan/study/maven/parent/productservices/target/jacoco.exec
[INFO] Analyzed bundle 'productservices' with 3 classes
[INFO]
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ productservices ---
[INFO] Building jar: /Users/louhan/study/maven/parent/productservices/target/productservices-1.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.440 s
[INFO] Finished at: 2023-09-15T00:01:59-04:00
[INFO] ------------------------------------------------------------------------

可以看到,运行到测试这里,jacoco 的 goal 被执行了:jacoco-maven-plugin:0.8.7:report (report) @ productservices,最终生成报告的目录与结果:

❯ tree target/site
target/site
└── jacoco
    ├── com.goldenaarcher.product.bo
    │   ├── ProductBOImpl.html
    │   ├── ProductBOImpl.java.html
    │   ├── index.html
    │   └── index.source.html
    ├── com.goldenaarcher.product.dao
    │   ├── ProductDAOImpl.html
    │   ├── ProductDAOImpl.java.html
    │   ├── index.html
    │   └── index.source.html
    ├── com.goldenaarcher.product.dto
    │   ├── Product.html
    │   ├── Product.java.html
    │   ├── index.html
    │   └── index.source.html
    ├── index.html
    ├── jacoco-resources
    │   ├── branchfc.gif
    │   ├── branchnc.gif
    │   ├── branchpc.gif
    │   ├── bundle.gif
    │   ├── class.gif
    │   ├── down.gif
    │   ├── greenbar.gif
    │   ├── group.gif
    │   ├── method.gif
    │   ├── package.gif
    │   ├── prettify.css
    │   ├── prettify.js
    │   ├── redbar.gif
    │   ├── report.css
    │   ├── report.gif
    │   ├── session.gif
    │   ├── sort.gif
    │   ├── sort.js
    │   ├── source.gif
    │   └── up.gif
    ├── jacoco-sessions.html
    ├── jacoco.csv
    └── jacoco.xml

6 directories, 36 files

在这里插入图片描述

sonarqube

sonarqube 也是一个挺好用的代码测试工具,不过它需要修改本机 proxy,并启动一个本地服务器去执行剩下的操作,很不幸的是工作机的 proxy 没法改,所以这里就……

它的运行方式还是挺简单的,sonarqube 提供了 sh/bat 文件,直接运行就能启动服务器,登陆后在 dashboard 生成一串登陆编号,maven 运行时添加登录编号 sonarqube 就可以对其进行分析,属于不太要修改 maven 配置的工具

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

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

相关文章

大语言模型如何生成内容

大语言模型生成内容主要基于语言模型算法。语言模型是一种机器学习算法&#xff0c;它可以根据给定文本来预测下一个词语或字符的出现的概率。语言模型通过大量的文本数据来学习语言的统计特征&#xff0c;进而生成具有相似统计特征的新文本。其核心目标是建立一个统计模型&…

zemax像散与消像散

打开zemax自带的例子 点列图可以观察到像散 我们旋转3D视图 这个角度似乎聚焦在像平面上&#xff0c;我们旋转90度 可以看到这一方向上其实已经聚焦 像散就是光斑在像面上子午方向和弧矢方向的不一致性 从光纤光扇图中可以具体的看出&#xff0c;两者不一致&#xff1a; 消除…

安卓毕业设计各种app项目,Android毕设设计,Android课程设计,毕业论文

作为一位从事软件开发多年的专业人士&#xff0c;您积累了丰富的经验和技能&#xff0c;解决了许多不同类型的问题。除了开发原创项目&#xff0c;您还愿意分享您的知识&#xff0c;指导实习生和在校生。这种乐于助人的行为对于行业的发展和新一代软件开发者的成长都起着积极的…

腾讯云镜像TencentOS Server操作系统介绍、性能稳定性测评

腾讯云TencentOS Server镜像是腾讯云推出的Linux操作系统&#xff0c;完全兼容CentOS生态和操作方式&#xff0c;TencentOS Server操作系统为云上运行的应用程序提供稳定、安全和高性能的执行环境&#xff0c;TencentOS可以运行在腾讯云CVM全规格实例上&#xff0c;包括黑石物理…

系列七、Nginx负载均衡配置

一、目标 浏览器中访问http://{IP地址}:9002/edu/index.html&#xff0c;浏览器交替打印清华大学8080、清华大学8081. 二、步骤 2.1、在tomcat8080、tomcat8081的webapps中分别创建edu文件夹 2.2、将index.html分别上传至edu文件夹 注意事项&#xff1a;tomcat8080的edu文件…

lv4 嵌入式开发-9 静态库与动态库的使用

目录 1 库的概念 2 库的知识 3 静态库特点 4 静态库 4.1静态库创建 4.2 编译生成目标文件 4.3 创建静态库 hello 4.4 查看库中符号信息 4.5 链接静态库 5 共享库特点 6 共享库 6.1 共享库创建 6.2 编译生成目标文件 6.3 创建共享库 common 6.4为共享库文件创建…

启动微服务,提示驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接

说明&#xff1a;启动一些微服务后&#xff0c;一直在报下面这个错误&#xff1b; com.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“The server selected protocol version TLS10 is not acc…

扩散模型在图像生成中的应用:从真实样例到逼真图像的奇妙转变

一、扩散模型 扩散模型的起源可以追溯到热力学中的扩散过程。热力学中的扩散过程是指物质从高浓度往低浓度的地方流动&#xff0c;最终达到一种动态的平衡。这个过程就是一个扩散过程。 在深度学习领域中&#xff0c;扩散模型&#xff08;diffusion models&#xff09;是深度生…

《数据结构、算法与应用C++语言描述》使用C++语言实现二维数组对角矩阵

《数据结构、算法与应用C语言描述》使用C语言实现二维数组对角矩阵 对角矩阵定义 如下图所示&#xff1a; 代码实现 _9diagonalMatrix.h 模板类 /* Project name : allAlgorithmsTest Last modified Date: 2022年8月13日17点38分 Last Version: V1.0 Descriptions: …

pdf添加水印

给pdf文件添加水印 引入依赖 <dependency><groupId>com.itextpdf</groupId><artifactId>itextpdf</artifactId><version>5.5.13.3</version></dependency>添加水印 package com.it2.pdfdemo02.util;import com.itextpdf.tex…

解决npm install遇到的问题:Error while executing:

目录 一、遇到问题 二、解决办法 三、备用方案 一、遇到问题 npm ERR! Error while executing: npm ERR! D:\IT_base\git\Git\cmd\git.EXE ls-remote -h -t ssh://gitgithub.com/sohee-lee7/Squire.git npm ERR! npm ERR! fatal: unable to access https://github.com/so…

go-GMP和Scheduler

GPM模型 G 待执行的goroutine&#xff0c;结构定义在runtime.g M 操作系统中的线程&#xff0c;它由操作系统的调度器 进行 调度和管理, 结构定义在runtime.m P 处理器&#xff0c;是GM的中间件&#xff0c;它通过一个队列绑定了GM&#xff0c;每个P都有一个局部queue&#x…

【单线图的系统级微电网仿真】基于 PQ 的可再生能源和柴油发电机组微电网仿真(Simulink)

&#x1f4a5;&#x1f4a5;&#x1f49e;&#x1f49e;欢迎来到本博客❤️❤️&#x1f4a5;&#x1f4a5; &#x1f3c6;博主优势&#xff1a;&#x1f31e;&#x1f31e;&#x1f31e;博客内容尽量做到思维缜密&#xff0c;逻辑清晰&#xff0c;为了方便读者。 ⛳️座右铭&a…

华硕电脑怎么录屏?分享实用录制经验!

“华硕电脑怎么录屏呀&#xff0c;刚买的笔记本电脑&#xff0c;是华硕的&#xff0c;自我感觉挺好用的&#xff0c;但是不知道怎么录屏&#xff0c;最近刚好要录一个教程&#xff0c;怎么都找不到在哪里录制&#xff0c;有人能教教我吗&#xff1f;” 随着电脑技术的不断发展…

腾讯mini项目-【指标监控服务重构】2023-08-20

今日已办 PPT制作 答辩流程 概述&#xff1a;对项目背景、架构进行介绍&#xff08;体现我们分组的区别和需求&#xff09;人员&#xff1a;小组成员进行简短的自我介绍和在项目中的定位&#xff0c;分工进展&#xff1a;对项目进展介绍&#xff0c;其中a、b两组的区别和工作…

笔试面试相关记录(4)

&#xff08;1&#xff09;实现防火墙的主流技术有哪些&#xff1f; 实施防火墙主要采用哪些技术 - 服务器 - 亿速云 (yisu.com) &#xff08;2&#xff09; char arr[][2] {a, b, c, d}; printf("%d", *(arr1)); 输出的是谁的地址&#xff1f;字符c 测试代码如下…

Vue.js的服务器端渲染(SSR):为什么和如何

&#x1f337;&#x1f341; 博主猫头虎&#xff08;&#x1f405;&#x1f43e;&#xff09;带您 Go to New World✨&#x1f341; &#x1f984; 博客首页——&#x1f405;&#x1f43e;猫头虎的博客&#x1f390; &#x1f433; 《面试题大全专栏》 &#x1f995; 文章图文…

Tomcat服务启动失败:java.lang.OutOfMemoryError: Java heap space

具体报错&#xff1a; java.lang.OutOfMemoryError: Java heap space 报错分析&#xff1a; 这个报错表明Java程序运行时内存不足。Tomcat服务在启动时需要占用一定的内存资源&#xff0c;如果分配的内存不足&#xff0c;就会出现该错误。通常情况下&#xff0c;出现该错误的原…

[maven] maven 创建 web 项目并嵌套项目

[maven] maven 创建 web 项目并嵌套项目 这里主要就创建另外一个 web 项目&#xff0c;并且创建一个 parent 项目比较方便的管理一下两个子项目。 maven web 项目 web 创建和 quickstart 的过程是差不多的&#xff0c;只不过这里换乘 webapp&#xff0c;配置方便的话可以搞的…

Android 实战项目分享(一)用Android Studio绘制贝塞尔曲线的艺术之旅

一、项目概述 欢迎来到创意之源&#xff01;我们精心打造的绘图应用程序将带你进入一个充满艺术和技术的奇妙世界。通过使用Android Studio&#xff0c;我们实现了绘制贝塞尔曲线的功能&#xff0c;让你能够轻松创作出令人惊叹的艺术作品。不论你是热爱绘画的大学生还是渴望学习…