老师这些需要删除吗 我是用idea的 jdk8.55
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<build>
<finalName>o2o</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>
正在回答
同学你好。建议删去,由于这些内容老师的代码中都有指定,重复指定可能会造成问题。使用老师的代码更为稳妥。简单解释下他们的含义:
1、<properties>中定义的是全局参数,语法是<name>value</name>,定义后可在pom文件中使用${name}来得到对应的value:
1)<project.bulid.sourceEncoding>的含义是设置项目文件创建时的编码
2)<maven-compiler-source>的含义是maven编译时读取的版本,同学如果要用可以设置为1.8
3)<maven-compiler-target>的含义是编译后生成的版本,同理可修改为1.8
2、后面的plugins是maven相关的插件,版本可能是同学的IDEA默认版本。
如果解答了同学的疑问,望采纳~
祝学习愉快~
- 参与学习 人
- 提交作业 323 份
- 解答问题 8263 个
本阶段将带你学习主流框架SSM,以及SpringBoot ,打通成为Java工程师的最后一公里!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星