Java 如何覆盖插件库POM配置?

Java 如何覆盖插件库POM配置?,java,maven,Java,Maven,我已经解决的第一个问题是https错误,因此我在一个线程上发现: <pluginRepositories> <pluginRepository> <id>central</id> <name>Central Repository</name> <url>https://repo.maven.apache.org/maven2</url>

我已经解决的第一个问题是https错误,因此我在一个线程上发现:

<pluginRepositories>
    <pluginRepository>
        <id>central</id>
        <name>Central Repository</name>
        <url>https://repo.maven.apache.org/maven2</url>
        <layout>default</layout>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <releases>
            <updatePolicy>never</updatePolicy>
        </releases>
    </pluginRepository>
</pluginRepositories>
<repositories>
    <repository>
        <id>central</id>
        <name>Central Repository</name>
        <url>https://repo.maven.apache.org/maven2</url>
        <layout>default</layout>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

您已经修复的https错误是什么?你能分享完整的错误日志吗?这个错误是已知的,只允许从https安全URL/网站下载,因此它不能下载插件。如果它也允许下载jacoco,你能用完整的错误日志更新问题吗?您还可以使用
-X
标志和共享日志在调试模式下运行maven。因此,您不需要另一个存储库。第一个猜测:从错误消息中的问号可以得出结论,您的
jacocomaven插件中的
-
不是真正的破折号,而是其他东西。尝试再次手动输入它们。第二个猜测:你仍然有一个网络ISSUE,比如防火墙或代理。我已经更新了错误日志
<build>
    <plugins>
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco−maven−plugin</artifactId>
            <version>0.7.7.201606060606</version>
            <inherited>false</inherited>
            <executions>
                <execution>
                    <goals>
                        <goal>prepare−agent</goal>
                    </goals>
                </execution>
                <execution>
                    <id>report</id>
                    <phase>prepare−package</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
mvn -X error log:
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------        ------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.044 s
[INFO] Finished at: 2020-03-19 T 11:08:29Z
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format..(omitted)
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, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/NoGoalSpecifiedException

It appears to also give this error regardless of JaCoCo configs, although I can run the program still.