missing artifact xxx:jar

本文介绍了解决Maven项目中无法找到pom.xml文件中定义的jar包的问题。通过右击项目并选择Maven更新项目,勾选ForceUpdate选项,可以强制Maven删除错误的jar包并重新下载正确的版本。
1. 原因

maven项目中,找不到pom.xml文件中定义的jar包。

2. 解决

右击项目>>>Maven>>>update project>>>勾选Force Update of Snapshots/Releases

(Maven会对错误的jar包进行删除后重新下载)。

PS D:\Work\java VCompus\vcampus> mvn org.openjfx:javafx-maven-plugin:0.0.8:run [INFO] Scanning for projects... [INFO] [INFO] ----------------------------< com:Vcampus >----------------------------- [INFO] Building Vcampus 1.0-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] >>> javafx:0.0.8:run (default-cli) > process-classes @ Vcampus >>> [WARNING] The POM for com.alibaba:druid:jar:1.1.20 is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for com.alibaba:druid:1.1.20 [ERROR] 'dependencies.dependency.systemPath' for com.alibaba:jconsole:jar must specify an absolute path but is ${env.JAVA_HOME}/lib/jconsole.jar @ [ERROR] 'dependencies.dependency.systemPath' for com.alibaba:tools:jar must specify an absolute path but is ${env.JAVA_HOME}/lib/tools.jar @ [WARNING] The artifact mysql:mysql-connector-java:jar:8.0.33 has been relocated to com.mysql:mysql-connector-j:jar:8.0.33: MySQL Connector/J artifacts moved to reverse-DNS compliant Maven 2+ coordinates. [INFO] [INFO] --- resources:3.3.1:resources (default-resources) @ Vcampus --- [INFO] Copying 11 resources from src\main\resources to target\classes [INFO] [INFO] --- compiler:3.14.0:compile (default-compile) @ Vcampus --- [INFO] Nothing to compile - all classes are up to date. [INFO] [INFO] <<< javafx:0.0.8:run (default-cli) < process-classes @ Vcampus <<< [INFO] [WARNING] The artifact mysql:mysql-connector-java:jar:8.0.33 has been relocated to com.mysql:mysql-connector-j:jar:8.0.33: MySQL Connector/J artifacts moved to reverse-DNS compliant Maven 2+ coordinates. [INFO] [INFO] --- javafx:0.0.8:run (default-cli) @ Vcampus --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.900 s [INFO] Finished at: 2025-09-17T00:14:42+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.8:run (default-cli) on project Vcampus: The parameters 'mainClass' for goal org.openjfx:javafx-maven-plugin:0.0.8:run are missing or invalid -> [Help 1] [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/PluginParameterException
09-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值