The problem is that the following command (...) does not create the src / main / resources / META-INF directory. This is important to me because I would like to get "persistence.xml" which is in this directory.
The maven quick launch archetype does not create src/main/resourcesand src/test/resources. There are several explanations:
- As indicated by its name, this archetype allows you to quickly launch a project, but you need to form it.
- Why
src/main/resourcesdoes this archetype create and not, say src/main/assembly,? - Creating empty directories is actually not possible for a long time (see ARCHETYPE-57 ).
, src/main/resources/META-INF/persistence.xml , .
mvn? "src/main/resources", META-INF/persistence.xml?
- , .
JPA:
mvn archetype:create \
-DgroupId=com.mycompany.project \
-DartifactId=my-project-domain \
-DpackageName=com.company.project.domain \
-DarchetypeGroupId=com.rfc.maven.archetypes \
-DarchetypeArtifactId=jpa-maven-archetype \
-DarchetypeVersion=1.0.0 \
-DremoteRepositories=http://maven.rodcoffin.com/repo
JPA:
$ tree my-project-domain/
my-project-domain/
βββ pom.xml
βββ src
βββ main
β βββ java
β β βββ com
β β βββ company
β β βββ project
β β βββ domain
β β βββ User.java
β βββ resources
β βββ META-INF
β βββ persistence.xml
βββ test
βββ java
β βββ com
β βββ company
β βββ project
β βββ domain
β βββ DbUnitDataLoader.java
β βββ UserTest.java
βββ resources
βββ user.db.xml
16 directories, 6 files