Where to put new packages in a Maven project in eclipse?

Asked

Viewed 21 times

0

I am learning to use JPA with Maven in Eclipse, and I intend to use the MVC design pattern, when I create the project, I have the following vision: inserir a descrição da imagem aqui

Well, I wanted to know in which folder I should create new packages Model, View, Controller, etc. Thanks in advance.

1 answer

0

Before you know where you should put what things within the project, I suggest a brief reading on Getting Started by Maven. This will help you understand various details and conventions used in a Maven project, so you don’t understand the dynamics of the tool, and not that "it should be like this because someone just told me".

Your question is related to the standard package structure used by Maven, and for what it serves each of them, this convention can be found in the Standard Directory Layout of documentation:

Standard Directory Layout da documentação do Maven

In your case, application-related packages and source code should be placed in src/main/java and src/main/resources.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.