【发布时间】:2016-09-27 22:15:38
【问题描述】:
我已经查看了有关类似问题的所有建议。没有任何效果。也许有人知道问题出在哪里?在 pom 文件和控制台下方出现错误。
<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>pezal2</groupId>
<artifactId>pezal2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.5.0</version>
<configuration>
<mainClass>com.pezal.Main</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
控制台
[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:8.5.0:jar (default-cli) on project pezal2: Execution default-cli of goal com.zenjava:javafx-maven-plugin:8.5.0:jar failed: Plugin com.zenjava:javafx-maven-plugin:8.5.0 or one of its dependencies could not be resolved: Could not find artifact javafx-packager:javafx-packager:jar:1.8.0_20 at specified path C:\Program Files\Java\jre1.8.0_101/../lib/ant-javafx.jar -> [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/PluginResolutionException
【问题讨论】:
-
看起来你从 java 1.8.0_20 升级到了 1.8.0_101;试试
mvn -U -
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, -
你能多说一些吗?
-
@Bartek - 你尝试运行什么 Maven 目标?
-
我所做的一切都像视频中的LINK
标签: java maven javafx javafx-8 maven-3