使用intelliJ使用quickstart创建了一个maven项目,似乎没有生成任何dir结构? [英] Created a maven project using quickstart using intelliJ, didn't seem to generate any dir structure?
问题描述
此处使用了哪种原型: http://maven.apache.org/guides/getting-started/index.html
Which archetype was used here: http://maven.apache.org/guides/getting-started/index.html
它说应该为您创建一个目录结构,例如:
It says a directory structure should have been created for you like:
/src/main/java/...
/src/test/....
我正在使用intelliJ,并且使用quickstart原型创建了一个新的maven项目.
I am using intelliJ, and I created a new maven project using the quickstart archetype.
该项目目前除pom.xml文件外没有其他内容,我想所有快速入门原型都随模板一起提供了吗?
The project doesn't seem to have anything other than a pom.xml file at the moment, I guess that is all the quickstart archetype comes with template wise?
我可以轻松地创建目录结构,但是只是很好奇,根据上面的Maven入门链接,哪种原型会生成文件夹结构?
I can easily create the directory structure, but was just curious what archetype would generate a folder structure as per the maven getting started link above?
我正在创建一个简单的Java库,因此一直在寻找合适的原型.
I am creating a simple java library, so was looking for a suitable archetype.
推荐答案
如果尚未将IntelliJ配置为指向有效的Maven安装,它将不会创建Maven结构/等.它不包括自己的行家.
If you haven't configured your IntelliJ to point at a valid Maven install, it won't create the Maven structure/etc. It does not include its own maven.
将M2_HOME环境目录设置为Maven目录.在Linux机器上,我最终将其导出到启动脚本中.在OS X下,我编辑了/etc/launchd.conf
并添加了setenv M2_HOME /my/maven/dir
.在Windows IIRC下,我编辑了启动脚本.很酷,我不必记住.
Set your M2_HOME environment directory to your Maven directory. On my Linux box I ended up exporting it within the startup script. Under OS X I edited /etc/launchd.conf
and added a setenv M2_HOME /my/maven/dir
. Under Windows IIRC I edited the startup script. It's cool I don't have to remember.
完成此操作后,从原型创建Maven项目即可.
Once you've done that, creating a Maven project from an archetype will work.
这篇关于使用intelliJ使用quickstart创建了一个maven项目,似乎没有生成任何dir结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!