Unrecognised tag: 'encoding' (position: START_TAG seen ...</version>\r\n\t\t\t\t<encoding>... @12:15

执行Maven Install打包的时候,出现以下错误信息:

[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project pro.test:pro-test:0.0.1-SNAPSHOT (F:\Workspaces\pro-test\pom.xml) has 1 error
[ERROR]     Malformed POM F:\Workspaces\pro-test\pom.xml: Unrecognised tag: 'encoding' (position: START_TAG seen ...</version>\r\n\t\t\t\t<encoding>... @12:15)  @ F:\Workspaces\pro-test\pom.xml, line 12, column 15 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException

经过检查才发现原来是<encoding>utf-8</encoding>标签放错位置了,应该放在<configuration>标签里面:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <encoding>utf-8</encoding>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.14.RELEASE</version> <relativePath/> </parent> <groupId>com.tplink.nbu.demo</groupId> <artifactId>basic-spring-boot</artifactId> <version>1.0.0</version> <name>basic-spring-boot</name> <description>Demo project for Spring Boot</description> <properties> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.33</version> </dependency> <!--监控--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> <version>1.1.19</version> </dependency> <!--jwt--> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-api</artifactId> <version>0.11.5</version> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-impl</artifactId> <version>0.11.5</version> <scope>runtime</scope> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-jackson</artifactId> <version>0.11.5</version> <scope>runtime</scope> </dependency> <!-- gRPC依赖 --> <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-netty-shaded</artifactId> <version>1.56.1</version> </dependency> <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-protobuf</artifactId> <version>1.56.1</version> </dependency> <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-stub</artifactId> <version>1.56.1</version> </dependency> <!-- Protocol Buffers依赖 --> <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> <version>3.23.4</version> </dependency> <groupId>net.devh</groupId> <artifactId>grpc-spring-boot-starter</artifactId> <version>2.14.0.RELEASE</version> </dependencies> <build> <extensions> <!-- 用于检测操作系统信息 --> <extension> <groupId>kr.motd.maven</groupId> <artifactId>os-maven-plugin</artifactId> <version>1.6.2</version> </extension> </extensions> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <!--protobuf 编译软件--> <plugin> <groupId>org.xolstice.maven.plugins</groupId> <artifactId>protobuf-maven-plugin</artifactId> <version>0.6.1</version> <configuration> <!-- 指定 protoc 工具,os.detected.classifier是os-maven-plugin 提供的动态属性 --> <protocArtifact>com.google.protobuf:protoc:3.23.4:exe:${os.detected.classifier}</protocArtifact> <!-- 指定 gRPC 插件 --> <pluginId>grpc-java</pluginId> <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.56.1:exe:${os.detected.classifier}</pluginArtifact> <!-- proto 文件路径 --> <protoSourceRoot>${project.basedir}/src/main/java/com/tplink/nbu/demo/basicspringboot/proto</protoSourceRoot> <!-- 生成的 Java 文件路径 --> <!-- <outputDirectory>${project.basedir}/src/main/java/com/tplink/nbu/demo/basicspringboot/proto/src</outputDirectory>--> </configuration> <executions> <execution> <goals> <goal>compile</goal> <goal>compile-custom</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> 我的mavenThe project com.tplink.nbu.demo:basic-spring-boot:1.0.0 (F:\lee\work\basic-spring-boot\pom.xml) has 1 error [ERROR] Malformed POM F:\lee\work\basic-spring-boot\pom.xml: Unrecognised tag: 'groupId' (position: START_TAG seen ...</dependency>\n\t\t<groupId>... @103:12) @ F:\lee\work\basic-spring-boot\pom.xml, line 103, column 12 -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging.报错如上,找找原因
08-27
<?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.ruoyi</groupId> <artifactId>ruoyi</artifactId> <version>3.9.0</version> <name>ruoyi</name> <url>http://www.ruoyi.vip</url> <description>若依管理系统</description> <properties> <ruoyi.version>3.9.0</ruoyi.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> <spring-boot.version>2.5.15</spring-boot.version> <druid.version>1.2.23</druid.version> <bitwalker.version>1.21</bitwalker.version> <swagger.version>3.0.0</swagger.version> <kaptcha.version>2.3.3</kaptcha.version> <pagehelper.boot.version>1.4.7</pagehelper.boot.version> <fastjson.version>2.0.58</fastjson.version> <oshi.version>6.8.3</oshi.version> <commons.io.version>2.19.0</commons.io.version> <poi.version>4.1.2</poi.version> <velocity.version>2.3</velocity.version> <jwt.version>0.9.1</jwt.version> <!-- override dependency version --> <tomcat.version>9.0.108</tomcat.version> <logback.version>1.2.13</logback.version> <spring-security.version>5.7.14</spring-security.version> <spring-framework.version>5.3.39</spring-framework.version> </properties> <!-- 依赖声明 --> <dependencyManagement> <dependencies> <!-- 覆盖SpringFramework的依赖配置--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-framework-bom</artifactId> <version>${spring-framework.version}</version> <type>pom</type> <scope>import</scope> </dependency> <!-- 覆盖SpringSecurity的依赖配置--> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-bom</artifactId> <version>${spring-security.version}</version> <type>pom</type> <scope>import</scope> </dependency> <!-- SpringBoot的依赖配置--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>${spring-boot.version}</version> <type>pom</type> <scope>import</scope> </dependency> <!-- 覆盖logback的依赖配置--> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>${logback.version}</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>${logback.version}</version> </dependency> <!-- 覆盖tomcat的依赖配置--> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-core</artifactId> <version>${tomcat.version}</version> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-el</artifactId> <version>${tomcat.version}</version> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-websocket</artifactId> <version>${tomcat.version}</version> </dependency> <!-- 阿里数据库连接池 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>${druid.version}</version> </dependency> <!-- 解析客户端操作系统、浏览器等 --> <dependency> <groupId>eu.bitwalker</groupId> <artifactId>UserAgentUtils</artifactId> <version>${bitwalker.version}</version> </dependency> <!-- pagehelper 分页插件 --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>${pagehelper.boot.version}</version> </dependency> <!-- 获取系统信息 --> <dependency> <groupId>com.github.oshi</groupId> <artifactId>oshi-core</artifactId> <version>${oshi.version}</version> </dependency> <!-- Swagger3依赖 --> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-boot-starter</artifactId> <version>${swagger.version}</version> <exclusions> <exclusion> <groupId>io.swagger</groupId> <artifactId>swagger-models</artifactId> </exclusion> </exclusions> </dependency> <!-- io常用工具类 --> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>${commons.io.version}</version> </dependency> <!-- excel工具 --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>${poi.version}</version> </dependency> <!-- velocity代码生成使用模板 --> <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity-engine-core</artifactId> <version>${velocity.version}</version> </dependency> <!-- 阿里JSON解析器 --> <dependency> <groupId>com.alibaba.fastjson2</groupId> <artifactId>fastjson2</artifactId> <version>${fastjson.version}</version> </dependency> <!-- Token生成与解析--> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> <version>${jwt.version}</version> </dependency> <!-- 验证码 --> <dependency> <groupId>pro.fessional</groupId> <artifactId>kaptcha</artifactId> <version>${kaptcha.version}</version> </dependency> <!-- 定时任务--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-quartz</artifactId> <version>${ruoyi.version}</version> </dependency> <!-- 代码生成--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-generator</artifactId> <version>${ruoyi.version}</version> </dependency> <!-- 核心模块--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-framework</artifactId> <version>${ruoyi.version}</version> </dependency> <!-- 系统模块--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-system</artifactId> <version>${ruoyi.version}</version> </dependency> <!-- 通用工具--> <dependency> <groupId>com.ruoyi</groupId> <artifactId>ruoyi-common</artifactId> <version>${ruoyi.version}</version> </dependency> </dependencies> </dependencyManagement> <modules> <module>ruoyi-admin</module> <module>ruoyi-framework</module> <module>ruoyi-system</module> <module>ruoyi-quartz</module> <module>ruoyi-generator</module> <module>ruoyi-common</module> </modules> <packaging>pom</packaging> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> <encoding>${project.build.sourceEncoding}</encoding> </configuration> </plugin> </plugins> </build> <repositories> <repository> <id>public</id> <name>aliyun nexus</name> <url>https://maven.aliyun.com/repository/public</url> <releases> <enabled>true</enabled> </releases> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>public</id> <name>aliyun nexus</name> <url>https://maven.aliyun.com/repository/public</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </project> 以上是pom.xml的内容,请问需要如何更改
最新发布
11-26
C:\Users\koreyoshi\.jdks\azul-17.0.11\bin\java.exe -Dmaven.multiModuleProjectDirectory=D:\zy-dbms -Dmaven.home=D:\Maven\apache-maven-3.8.4-bin\apache-maven-3.8.4 -Dclassworlds.conf=D:\Maven\apache-maven-3.8.4-bin\apache-maven-3.8.4\bin\m2.conf "-Dmaven.ext.class.path=D:\IDEA\IntelliJ IDEA 2021.2.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\IDEA\IntelliJ IDEA 2021.2.1\lib\idea_rt.jar=2037:D:\IDEA\IntelliJ IDEA 2021.2.1\bin" -Dfile.encoding=UTF-8 -classpath D:\Maven\apache-maven-3.8.4-bin\apache-maven-3.8.4\boot\plexus-classworlds-2.6.0.jar;D:\Maven\apache-maven-3.8.4-bin\apache-maven-3.8.4\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2021.2.1 -s D:\Maven\apache-maven-3.8.4-bin\apache-maven-3.8.4\conf\settings.xml clean [ERROR] Error executing Maven. [ERROR] 6 problems were encountered while building the effective settings [WARNING] Unrecognised tag: 'mirror' (position: START_TAG seen ...</url>-->\r\n <mirror>... @173:16) @ D:\Maven\apache-maven-3.8.4-bin\apache-maven-3.8.4\conf\settings.xml, line 173, column 16 [ERROR] 'mirrors.mirror.url' for default is missing @ D:\Maven\apache-maven-3.8.4-bin\apache-maven-3.8.4\conf\settings.xml [ERROR] 'mirrors.mirror.mirrorOf' for default is missing @ D:\Maven\apache-maven-3.8.4-bin\apache-maven-3.8.4\conf\settings.xml [WARNING] Unrecognised tag: 'mirror' (position: START_TAG seen ...</url>-->\r\n <mirror>... @173:16) @ D:\Maven\apache-maven-3.8.4-bin\apache-maven-3.8.4\conf\settings.xml, line 173, column 16 [ERROR] 'mirrors.mirror.url' for default is missing @ D:\Maven\apache-maven-3.8.4-bin\apache-maven-3.8.4\conf\settings.xml [ERROR] 'mirrors.mirror.mirrorOf' for default is missing @ D:\Maven\apache-maven-3.8.4-bin\apache-maven-3.8.4\conf\settings.xml 进程已结束,退出代码为 1 问题解决
09-29
/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Users/wangzhen/java/studyProject/weiyu/modules -Djansi.passthrough=true -DarchetypeCatalog=internal -Dmaven.home=/Users/wangzhen/java/DevTools/apache-maven-3.8.8 -Dclassworlds.conf=/Users/wangzhen/java/DevTools/apache-maven-3.8.8/bin/m2.conf -Dmaven.ext.class.path=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=51815:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Users/wangzhen/java/DevTools/apache-maven-3.8.8/boot/plexus-classworlds.license:/Users/wangzhen/java/DevTools/apache-maven-3.8.8/boot/plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version=2023.3.6 -s /Users/wangzhen/java/DevTools/apache-maven-3.8.8/conf/settings.xml org.apache.maven.plugins:maven-clean-plugin:3.4.1:clean [WARNING] [WARNING] Some problems were encountered while building the effective settings [WARNING] Unrecognised tag: 'repositories' (position: START_TAG seen ...<!-- weiyu ai -->\r\n<repositories>... @231:15) @ /Users/wangzhen/java/DevTools/apache-maven-3.8.8/conf/settings.xml, line 231, column 15 [WARNING] Unrecognised tag: 'repositories' (position: START_TAG seen ...<!-- weiyu ai -->\r\n<repositories>... @231:15) @ /Users/wangzhen/java/DevTools/apache-maven-3.8.8/conf/settings.xml, line 231, column 15 [WARNING] [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Non-resolvable import POM: com.alibaba.cloud.ai:spring-ai-alibaba-bom:pom:1.0.0.3-SNAPSHOT was not found in https://repo.spring.io/snapshot during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spring-snapshots has elapsed or updates are forced @ com.bytedesk:bytedesk-module-ai:${revision}, /Users/wangzhen/java/studyProject/weiyu/modules/ai/pom.xml, line 249, column 16 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project com.bytedesk:bytedesk-module-ai:0.9.1 (/Users/wangzhen/java/studyProject/weiyu/modules/ai/pom.xml) has 1 error [ERROR] Non-resolvable import POM: com.alibaba.cloud.ai:spring-ai-alibaba-bom:pom:1.0.0.3-SNAPSHOT was not found in https://repo.spring.io/snapshot during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spring-snapshots has elapsed or updates are forced @ com.bytedesk:bytedesk-module-ai:${revision}, /Users/wangzhen/java/studyProject/weiyu/modules/ai/pom.xml, line 249, column 16 -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException 进程已结束,退出代码为 1
11-11
"C:\Program Files\Java\jdk-22\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\JAVA_CODE\shop\mall-user -Djansi.passthrough=true -Dmaven.home=D:\maven\apache-maven-3.9.9 -Dclassworlds.conf=D:\maven\apache-maven-3.9.9\bin\m2.conf "-Dmaven.ext.class.path=D:\IntelliJ IDEA 2024.3\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\IntelliJ IDEA 2024.3\lib\idea_rt.jar=60000:D:\IntelliJ IDEA 2024.3\bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath D:\maven\apache-maven-3.9.9\boot\plexus-classworlds-2.8.0.jar;D:\maven\apache-maven-3.9.9\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2024.3 -s D:\maven\apache-maven-3.9.9\conf\settings.xml install [WARNING] [WARNING] Some problems were encountered while building the effective settings [WARNING] Unrecognised tag: 'profile' (position: START_TAG seen ...<!-- java1.8\u7248\u672c --> \n<profile>... @251:10) @ D:\maven\apache-maven-3.9.9\conf\settings.xml, line 251, column 10 [WARNING] Unrecognised tag: 'profile' (position: START_TAG seen ...<!-- java1.8\u7248\u672c --> \n<profile>... @251:10) @ D:\maven\apache-maven-3.9.9\conf\settings.xml, line 251, column 10 [WARNING] [INFO] Scanning for projects... [INFO] [INFO] ---------------------< com.cx.mall.user:mall-user >--------------------- [INFO] Building mall-user 1.0-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- resources:3.3.1:resources (default-resources) @ mall-user --- [INFO] Copying 1 resource from src\main\resources to target\classes [INFO] Copying 0 resource from src\main\resources to target\classes [INFO] [INFO] --- compiler:3.11.0:compile (default-compile) @ mall-user --- Downloading from aliyunmaven: https://maven.aliyun.com/repository/public/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar Downloaded from aliyunmaven: https://maven.aliyun.com/reposit
03-15
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值