Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create spring maven project in intellij IDEA [closed]

I'm trying to create spring + maven project in IntelliJ IDEA. I've read these official wiki, but when I finish steps, there is no maven in my project. I've tried to add it with my hands, but it seems, that I have hands not so good enough :(, because maven dependencies, lib folder and classes, that I want to use live their own lives (dependencies aren't in lib folder and I try to type classes from dependencies, there is no auto-complete). Does anyone has step-by-step guide or link?

like image 569
user3038475 Avatar asked Nov 26 '13 22:11

user3038475


People also ask

How do I close a Maven project in IntelliJ?

From the main menu, select File | Close All Projects. This action closes all projects that are currently opened in IntelliJ IDEA.

How do I create a project Maven project in IntelliJ?

In the Project tool window, right-click your project and select Add Framework Support. In the dialog that opens, select Maven from the options on the left and click OK. IntelliJ IDEA adds a default POM to the project and generates the standard Maven layout in Project tool window.

Why spring is not showing in IntelliJ?

Enable Spring support in IntelliJ IDEA This functionality is not available in IntelliJ IDEA Community Edition and IntelliJ IDEA Edu. Press Ctrl+Alt+S to open the IDE settings and select Plugins. Open the Installed tab, search for Spring and make sure that the checkboxes next to all relevant plugins are selected.

How do I create a spring project in IntelliJ IDEA?

1) If you're in an IntelliJ IDEA project already, select File > Project. Alternatively click the New Project button on the Welcome screen. 2) Select Spring Initializr on the left-hand side and then enter the following options:

How to install Maven on IntelliJ IDEA?

In IntelliJ IDEA’s initial screen, select Create New Project, located on the left side tab and select Maven, on the right side, select the JDK version and click next: When selecting the archetype, IntelliJ IDEA will assume that you will use Quickstart archetype, which is ok for our goal.

How to use Maven-archetype-Quickstart in IntelliJ IDEA?

maven-archetype-quickstart archetype plugin is used to create a quick and simple java application. Launch IntelliJ IDEA. Click on Create New Project. Select Maven build tool from the left menu. Check the option Create from the archetype. Select the quickstart archetype to create a simple java project and click on the Next button.

How do I build an application with IntelliJ IDEA ultimate?

This functionality is only available with IntelliJ IDEA Ultimate. This tutorial is based off Building an Application with Spring Boot. 1) If you're in an IntelliJ IDEA project already, select File > Project. Alternatively click the New Project button on the Welcome screen.


3 Answers

Go to https://start.spring.io and let the Initializr generate a Maven project for you with the desired dependencies.

You will get a zip file which you can then unpack in your dev folder.

Then open Intellij and select File | New | Project from Existing Sources. (Or Import Project from the welcome screen).

Select your unzipped folder, and then follow the wizard, selecting Maven when you are prompted to.

See here: https://www.jetbrains.com/help/idea/2016.2/importing-project-from-maven-model.html

like image 196
jhyot Avatar answered Oct 13 '22 17:10

jhyot


First create a spring project by going to File->New->Project and select spring. It will create a spring project. Then to add maven support, you can right click on the project and select "Add Framework Support". It will give you a pop up window, and from that select "maven".

like image 40
Dil Avatar answered Oct 13 '22 16:10

Dil


I think this is what you looking for?

Create new project File > New > Project

  • Click Maven on the left hand side of the new project dialog
  • Check Create from archetype
  • Click the Add Archetype button
  • Set Group Id to pl.codeleak
  • Set Artifact Id to spring-mvc-quickstart
  • Set Version to 1.0.0
  • Set Repository to http://kolorobot.github.io/spring-mvc-quickstart-archetype
  • Click next and create the project

Refer below link for more.

https://github.com/kolorobot/spring-mvc-quickstart-archetype

But I would refer the classic way. Generate the maven project using arch-type and import the maven project to the Intellij Then add the spring maven dependencies to the pom.xml. It's clear

like image 24
Menuka Ishan Avatar answered Oct 13 '22 18:10

Menuka Ishan