7

When I use Maven archetype quickstart, it does not create src/main/resources folder and I have to create it myself. Why is it like this?

I want src/main/resources to be created automatically.

Is there a better archetype for this?

2
  • Somebody please answer this.... I know someone out there has the answer.
    – Mawia
    Sep 28, 2012 at 11:25
  • This is the way this archetype is done. It has no resource folder. Create a folder for one project or a new archetype if working on many projects. Oct 23, 2017 at 15:32

3 Answers 3

5

If you are frequently creating projects from quickstart but require a resources directory, then create your own custom archetype and install it to your repository (local cache or the one used by your team).

The source for the archetype, which you can check out anonymously and modify, is here:

http://svn.apache.org/viewvc/maven/archetypes/trunk/maven-archetype-quickstart/

4

This maven archetype is an enhanced combination of the quickstart and webapp maven archetypes:

    https://github.com/sabram/maven-archetype-quickweb

The project it creates will include both src/main/java and src/main/resources as well as src/test and src/webapp...

Feel free to use and delete any folders you don't need, or fork the archetype for your own needs.

0

That happened to me too. The only solution that I've found was create the /src/main/resources and also /src/main/java for myself. Other parts of maven-archetype works fine for me.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.