BecomeBetter
BecomeBetter

Reputation: 433

Why doesn't my intellij idea maven project have a src directory?

I 'm using intellij idea 15 community to build a maven project and I chose the maven-archetype-j2ee-simple archetype. enter image description here

The version of the maven I used was Bundled(Maven 2). enter image description here

However, I didn't find any directories like src and I didn't know where to write my java code. What's wrong with it?enter image description here

My working environment is Ubuntu 15.04.

Upvotes: 2

Views: 2496

Answers (3)

yu yang Jian
yu yang Jian

Reputation: 7171

This work for me:

1.Open IntelliJ IDEA and close any existing project.

2.From the Welcome screen, click Import Project.

3.open the pom.xml shows src.

reference link.

Upvotes: 0

khemlal sinha
khemlal sinha

Reputation: 41

Please check

  1. your maven path is set correctly https://www.tutorialspoint.com/maven/maven_environment_setup.htm

  2. run mvn --version and check if your maven is pointing to write jdk as well

  3. IF these two things set correctly while creating project " archetype" list show show . if it is still not showing that means there is a problem in your setup and maven will still create empty maven config

Upvotes: 0

OPK
OPK

Reputation: 4180

it does. you just need to allow maven to import changes. Your last screen shot pretty much says it all.

I just created one with archetype-je22-simple and it includes everything as starter project:enter image description here

Upvotes: 2

Related Questions