IDEA generate empty pom.xml when creating new maven project

已回答

IDEA just gives me an empty pom.xml  instead of a  template whenever I create a maven project. How can I solve it?

Thanks

P.S. I did not change any setting.

0

Please provide idea.log file (Help | Show Log in ... action) after reproducing.

For uploading you can use https://uploads.jetbrains.com or any file sharing service.

0

I have the same isue.
Here's upload ID
Upload id: 2023_07_02_cihAVkL4DT8njnvKhsdGHg (file: idea.log)
Please help. StackOverflow can't ))

PS: Solved it. It was jdk-20.  Do 17 and it'll be fine.

0
Do you have the template in `Preferences/Settings | Editor | File and Code Templates` ? Can you please attach the screenshot of the New Project wizard UI?
1

There are some templates there. Which exactly do you mean?

0

Which version of the IDE do you have? Does it help if you switch the JDK to 17?

I mean the Maven pom templates in `Settings | Editor | File and Code Templates | select Other tab`.

 

 

 

 

1

You know, switching to JDK17 solved the problem.
But wonder if I can use JDK20. What is the problem with it and how can I fix it?

0
Please install the latest version of the IDE. It supports Java 20 from 2023.1: https://www.jetbrains.com/help/idea/supported-java-versions.html
0

Followed your lead, now it works. 
Thanks for your support.

0

Working with Java 17. I tried with Java 22 faced empty pom.xml issue.

0

Anjanipriya789 Thank you for reporting this!

Could you please share more details:

  • How exactly the Project was created: with IDEA (regular Project or an Archetype), with Maven directly, etc. 
  • IDEA's Logs (Help → Collect Logs and Diagnostic Data). Logs can be shared using our upload service.
0

Hello Ethan Yin 

I am facing this same issue.

My pom.xml file is completely blank. I want to add the <dependency> tags. However, the entire file itself is empty. Could you please assist me on this.

Below are the screenshots for your reference:

 

 

 

I don't want to downgrade my IDE.

Hence could you please assist me on this.
Ticket Number: #7739723
Logs uploaded on this ticket as well.

 

0

请先登录再写评论。