创建maven时出错了

创建maven时出错了

http://img1.sycdn.imooc.com//climg/5da42f22090131ee11541100.jpg

请问下老师,这个需要怎么解决呢?

正在回答

登陆购买课程后可参与讨论,去登陆

8回答

同学你好,建议同学去本地仓库中,查找一下maven-compiler-plugin,如:

http://img1.sycdn.imooc.com//climg/5da45a4c09ec327407020247.jpg

建议同学删除3.1的版本,重新创建maven项目再试试。

如果在创建的过程中还遇到错误,建议同学将报错贴一下。

祝:学习愉快~

提问者 Angche 2019-10-21 15:39:37

可以了,找到的原因是lifecycleMappingMetadata配置问题导致的,这个应该怎么配置的呢,现在只是把对应的项给配置了,担心没有配置对后面还会有问题。

<?xml version="1.0" encoding="UTF-8" ?>

<lifecycleMappingMetadata>

    <pluginExecutions>

<pluginExecution>

            <pluginExecutionFilter>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-dependency-plugin</artifactId>

                <versionRange>[2.6, )</versionRange>

                <goals>

                    <goal>copy</goal>

                </goals>

            </pluginExecutionFilter>

            <action>

                <ignore />

            </action>

        </pluginExecution>

    </pluginExecutions>

</lifecycleMappingMetadata>


提问者 Angche 2019-10-21 14:15:16

不行,还是报错了。

Errors occurred during the build.

Errors running builder 'Maven Project Builder' on project 'fist-maven'.

Missing parameter for pluginExecutionFilter. groupId, artifactId, versionRange and goals must be specificed, but found: groupId = 'null'

artifactId = 'null'

versionRange = 'null'

goals = '[compile, test-compile]'


好帮手慕柯南 2019-10-16 11:06:22

同学你好,

可能是由于同学这里和之前的项目名称都是相同的,建议同学修改测试一下:

http://img1.sycdn.imooc.com//climg/5da6892209a866a709980279.jpg

如果我的回答解决了你的疑惑,请采纳,祝学习愉快~

提问者 Angche 2019-10-15 21:34:31

http://img1.sycdn.imooc.com//climg/5da5c76a0918054b11360520.jpg

http://img1.sycdn.imooc.com//climg/5da5c7760964fe4907240432.jpg

An internal error occurred during: "Creating project "maven-first"".

Missing parameter for pluginExecutionFilter. groupId, artifactId, versionRange and goals must be specificed, but found: groupId = 'null'

artifactId = 'null'

versionRange = 'null'

goals = '[compile, test-compile]'

老师好,按照操作提示这个了,也没找到相关的解决方法。

提问者 Angche 2019-10-14 18:15:53

http://img1.sycdn.imooc.com//climg/5da44a8a09d00b6412281084.jpg

http://img1.sycdn.imooc.com//climg/5da44a9509a4648112900602.jpg

http://img1.sycdn.imooc.com//climg/5da44abb09179a8307240668.jpg


An internal error occurred during: "Creating project "maven-first"".

Missing parameter for pluginExecutionFilter. groupId, artifactId, versionRange and goals must be specificed, but found: groupId = 'null'

artifactId = 'null'

versionRange = 'null'

goals = '[compile, test-compile]'


提问者 Angche 2019-10-14 18:12:37

http://img1.sycdn.imooc.com//climg/5da449e2093a0f1e16060916.jpg

http://img1.sycdn.imooc.com//climg/5da44a0809db41ea14740862.jpg

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile)

CoreException: Could not get the value for parameter compilerId for plugin execution default-testCompile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.codehaus.plexus:plexus-container-default:jar:1.5.5, org.codehaus.plexus:plexus-classworlds:jar:2.2.2, org.apache.xbean:xbean-reflect:jar:3.4, log4j:log4j:jar:1.2.12, commons-logging:commons-logging-api:jar:1.1, com.google.collections:google-collections:jar:1.0, junit:junit:jar:3.8.2: Failure to transfer org.codehaus.plexus:plexus-container-default:jar:1.5.5 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.codehaus.plexus:plexus-container-default:jar:1.5.5 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled.


好帮手慕阿满 2019-10-14 17:51:18

同学你好,问一下同学是在哪一步报的这个错误呢?建议同学详细描述一下。

祝:学习愉快~

  • 提问者 Angche #1
    老师好,在maven创建最开始就出错了,点击finish就报错了。查了下一些资料,按照他们给的方法没有配置好,不知道是不是我配置的问题。
    2019-10-14 18:17:12
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师