RxGianYagami
RxGianYagami

Reputation: 76

How to create maven projects on VS code?

I've already succeed creating java project on vs code. I am installing Java extension pack which is auto install another plugin (like language support by red hat and etc), I am using jdk 8 (jdk1.8.0_241). I am using command palette to create new java project. But my new project doesn't contain pom.xml

Anyway I don't install dedicated maven, only Maven for java extension

I need maven for iReport/jaspers dependencies

Upvotes: 1

Views: 6539

Answers (2)

Bruno Borges
Bruno Borges

Reputation: 851

You are probably creating a new "Java Project", which is Eclipse-based structure, not Maven.

In the command pallet (Cmd+P on macOS), type Maven and you shall see "Maven: Create Maven Project".

enter image description here

Next step, the extension will ask you which Maven Archetype to use. Select "maven-archetype-quickstart".

enter image description here

You will be asked for input on the terminal after this.

Once the project is generated, type $ code to open a new VSC window.

Done.

Upvotes: 3

Nahuel Giani
Nahuel Giani

Reputation: 570

You can execute this by cmd:

mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DgroupId=com.mycompany.app -DartifactId=my-app

This will generate a maven-archetype-quickstar project.

Upvotes: 3

Related Questions