没有src

没有src

按照步骤一步步来的,还是没有src,试了很多遍了

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

正在回答 回答被采纳积分+1

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

5回答
好帮手慕小班 2020-02-14 10:42:41

同学你好,同学可以尝试如下方式再试一下:

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.cyc.pinyintest.PinYinTest</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>

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

好帮手慕小班 2020-02-13 19:02:05

同学你好,有用的报错信息是:

Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate。 显示同学的plugins中,有一个文件找不到,可能是同学下载的时候没有下载好。

同学可以打开本地maven仓库,删除/org/apache/maven/plugins/下的maven-archetype-plugin文件夹,比如我的位置在这里:

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

然后重新再试一下~

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

  • 提问者 XXXXg #1
    还是有问题 [ERROR] Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependencies could not be resolved: Could not transfer artifact org.apache.maven.plugins:maven-archetype-plugin:jar:3.1.2 from/to central (https://repo.maven.apache.org/maven2): GET request of: org/apache/maven/plugins/maven-archetype-plugin/3.1.2/maven-archetype-plugin-3.1.2.jar from central failed: Read timed out -> [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
    2020-02-13 20:16:04
提问者 XXXXg 2020-02-13 18:30:46

报错信息

"C:\Program Files\Java\jdk1.8.0_131\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\Users\12523\AppData\Local\Temp\archetype6tmp -Dmaven.home=D:\apache-maven-3.6.1 -Dclassworlds.conf=D:\apache-maven-3.6.1\bin\m2.conf -Dfile.encoding=UTF-8 -classpath D:\apache-maven-3.6.1\boot\plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version2019.1 -s D:\apache-maven-3.6.1\conf\settings.xml -DinteractiveMode=false -DgroupId=com.imooc -DartifactId=spring_ioc -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=RELEASE org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate

[INFO] Scanning for projects...

[INFO] 

[INFO] ------------------< org.apache.maven:standalone-pom >-------------------

[INFO] Building Maven Stub Project (No POM) 1

[INFO] --------------------------------[ pom ]---------------------------------

[INFO] 

[INFO] >>> maven-archetype-plugin:3.1.2:generate (default-cli) > generate-sources @ standalone-pom >>>

[INFO] 

[INFO] <<< maven-archetype-plugin:3.1.2:generate (default-cli) < generate-sources @ standalone-pom <<<

[INFO] 

[INFO] 

[INFO] --- maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom ---

Downloading from central: https://repo.maven.apache.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar

Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-common/3.1.2/archetype-common-3.1.2.jar

Downloading from central: https://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.4/commons-lang-2.4.jar

Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/2.4.16/groovy-2.4.16.jar

Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/3.1.2/archetype-catalog-3.1.2.jar

Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-provider-api/3.3.3/wagon-provider-api-3.3.3.jar

Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/3.1.2/archetype-catalog-3.1.2.jar (19 kB at 1.1 kB/s)

Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-artifact-transfer/0.11.0/maven-artifact-transfer-0.11.0.jar

Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar (1.3 MB at 5.4 kB/s)

Downloading from central: https://repo.maven.apache.org/maven2/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar

Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-provider-api/3.3.3/wagon-provider-api-3.3.3.jar (56 kB at 171 B/s)

Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-script-interpreter/1.0/maven-script-interpreter-1.0.jar

Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-script-interpreter/1.0/maven-script-interpreter-1.0.jar (21 kB at 57 B/s)

Downloading from central: https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.8.1/ant-1.8.1.jar

Downloaded from central: https://repo.maven.apache.org/maven2/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar (575 kB at 1.6 kB/s)

Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-artifact-transfer/0.11.0/maven-artifact-transfer-0.11.0.jar (128 kB at 338 B/s)

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  51:49 min

[INFO] Finished at: 2020-02-13T18:23:55+08:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate failed: Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven.archetype:archetype-common:jar:3.1.2, org.codehaus.groovy:groovy:jar:2.4.16, commons-lang:commons-lang:jar:2.4, org.apache.ant:ant:jar:1.8.1: Could not transfer artifact org.apache.maven.archetype:archetype-common:jar:3.1.2 from/to central (https://repo.maven.apache.org/maven2): GET request of: org/apache/maven/archetype/archetype-common/3.1.2/archetype-common-3.1.2.jar from central failed: Read timed out -> [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


提问者 XXXXg 2020-02-13 12:00:15

mybatis中maven就是这么配置的

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

spring-iocmaven配置相同啊

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

都对着啊

  • 可是查看你的报错信息The specified user settings file does not exist: D:\apache-maven-3.6.3\conf\settings.xml 就是对应的settings.xml有问题,你参考这个内容来修改一下,看是不是这个问题 https://blog.csdn.net/marooon/article/details/88790354 如果不是上述的问题,那你的控制台还有什么其他的报错吗,建议你还是将所有的报错信息贴出来吧,否则也猜不出来你的错误。
    2020-02-13 16:05:17
好帮手慕小班 2020-02-13 11:53:17

同学你好,查看同学的截图,存在报错信息,The specified user settings file does not exist: D:\apache-maven-3.6.3\conf\settings.xml   -->找不到对应的xml文件: D:\apache-maven-3.6.3\conf\settings.xml 。

打开idea的系统设置(Settings),

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

配置正确 maven 的xml文件,再来试一下。

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

  • 提问者 XXXXg #1
    我maven配置就是这样的
    2020-02-13 11:57:51
问题已解决,确定采纳
还有疑问,暂不采纳

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

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

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

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