Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven archetype quickstart with resources folder

Tags:

maven

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?

like image 628
Mawia Avatar asked Sep 28 '12 06:09

Mawia


People also ask

What is Quickstart archetype in Maven?

maven-archetype-quickstart is an archetype which generates a sample Maven project: project. |-- pom. xml.

When building a Maven archetype where do you put your prototype files?

the prototype files that are copied by the archetype plugin (directory: src/main/resources/archetype-resources/ ) the prototype pom ( pom. xml in: src/main/resources/archetype-resources )

What is the packaging of the quick start archetype?

The quickstart archetype is a simple project with JAR packaging and a single dependency on JUnit.


2 Answers

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/

like image 166
noahlz Avatar answered Nov 11 '22 07:11

noahlz


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.

like image 31
Shaun Abram Avatar answered Nov 11 '22 09:11

Shaun Abram