Is there no way to create an empty boilerplate Maven project in Idea?
Every way I've tried to start out a Maven project (no code, no importing because there ain't no pom.xml file yet!) it's tried to force me to find an existing maven project. Which is the problem. There isn't one. I just want to simply say "Ok, time to start that new project. Let's create a default Maven project/pom/directory structure. Click!"
But it doesn't seem like this is possible? I'm just trying Idea instead of Eclipse and this is a brick wall right out front. I'd love to get by it though.
Thanks in advance.
-sf
请先登录再写评论。
Hey sf,
just do the following:
Open a command line, go into the directory where you keep your projects. Then type:
mvn archetype:generate -DgroupId= -DartifactId=]]>
(make sure you've got maven bin directory in PATH variable)
Then choose an archetype you'd like to generate from the list maven gives you. Finally, import the project into IDEA.
(see this page for further info on archetype:generate -- http://maven.apache.org/plugins/maven-archetype-plugin/usage.html)
HTH
Denis
WOW. I wonder why I have never seen this before.
I would still like it if I could do this as part of IntelliJ. Why leave my editor if it can do all that I want?
You're not the only one seeking such a feature in IDEA.
There are to (identical?) feature requests in JIRA:
http://www.jetbrains.net/jira/browse/IDEA-16760
http://www.jetbrains.net/jira/browse/IDEA-18169
The only feature that would have even higher value for me would be a dialog to (search for and) add Maven dependencies to a current module (http://www.intellij.net/forums/thread.jspa?threadID=276042).
Current maven support is quite lacking wrt these two (very common) operations, compared to the Eclipse maven plugin.
might want to have a look at the IDEA plugin : MavenProjectHelper (http://code.google.com/p/mavenprojecthelper/)
I didn't actually use it but it is supposed to allow to create IDEA projects from archetypes
Indeed, the Eclipse integration for searching/adding dependencies is quite nice. It doesn't always catch every one, but for the big guys, it's a quick add.
For the ones that it can't find, there's always http://mvnrepository.com/ which even provides snippets to cut & paste.
Hello Norris,
Maven archetypes support is planned for IDEA 8.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
this is available as a third party plugin in IDEA : Maven Repo search http://plugins.intellij.net/plugin/?id=1696
Maven Archetypes may be better (more recent updates) http://plugins.intellij.net/plugin/?id=1789
Great. Thanks.