Я создаю maven архетип , но когда я генерирую проект с этим архетипом, источники пусты.
Чего-то не хватает?
Есть ли какой-нибудь простой архетип для начала? Я пробовал maven-архетипы, но каждый проект наследовал от родительского artifactId maven-archetype-bundles.
Maven-архетип
base-archetype
-src
-main
-java
-resources
-archetype-resources
-resources
-META-INF
messages.properties
-webapp
-WEB-INF
beans.xml
pom.xml(b)
-META-INF
-maven
archetype-metadata.xml
-test
-target
pom.xml(a)
pom. xml (а)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.javalabs</groupId>
<artifactId>simple-archetype</artifactId>
<version>0.0.1</version>
<packaging>maven-archetype</packaging>
...
<build>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>3.1.2</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>3.0.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
</build>
...
</project>
архетип-метаданные. xml
<archetype-descriptor
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0
http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="jakartaee-essentials-archetype">
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="true" packaged="false" encoding="UTF-8">
<directory>src/main/webapp</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</fileSet>
<fileSet>
<directory>src/test/java</directory>
</fileSet>
<fileSet filtered="false" packaged="false" encoding="UTF-8">
<directory></directory>
<includes>
<include>.gitignore</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>