idea新建maven项目没有src目录的操作方法

方法一:设置idea的maven运行参数
这里写图片描述

加:archetypeCatalog=internal
这里写图片描述

如果ctrl+alt+s进设置,只能对当前项目新建Module其作用:

这里写图片描述

方法二:在新建maven项目时候设置archetypeCatalog=internal,这种方式每次都需要设置,而且spring boot项目没这个设置,推荐第一种方法。
这里写图片描述

参考文章:
https://www.cnblogs.com/guochunyang2004/archive/2018/03/23/8629437.html

发布了68 篇原创文章 · 获赞 49 · 访问量 10万+
展开阅读全文

idea创建Maven项目没有src目录 Run有错误

11-02

![图片说明](https://img-ask.csdn.net/upload/201911/02/1572702296_122439.png) ``` "C:\Program Files\Java\jdk1.8.0_202\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\Users\dx\AppData\Local\Temp\archetype1tmp -Xms128m -Xmx512m -Duser.language=zh -Dfile.encoding=UTF-8 -Dmaven.home=E:\server\apache-maven-3.6.1 -Dclassworlds.conf=E:\server\apache-maven-3.6.1\bin\m2.conf "-Dmaven.ext.class.path=E:\IntelliJ IDEA 2019.2\plugins\maven\lib\maven-event-listener.jar" -classpath E:\server\apache-maven-3.6.1\boot\plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version2019.2 --offline -s E:\server\apache-maven-3.6.1\conf\settings.xml -Dmaven.repo.local=E:\server\Repository -DinteractiveMode=false -DgroupId=com -DartifactId=demo33333333 -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] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.140 s [INFO] Finished at: 2019-11-02T21:41:10+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE: Failed to resolve version for org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE: Could not find metadata org.apache.maven.plugins:maven-archetype-plugin/maven-metadata.xml in local (E:\server\Repository) -> [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 网上的解决方法我都试过了还是报错,有大佬帮忙看下吗? ``` 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 点我我会动 设计师: 上身试试

分享到微信朋友圈

×

扫一扫,手机浏览