I have a project where when executing the mvn clean install command it creates the corresponding war of the project, but now I also need to have the jar of the project where the project is divided into different layers.
I have added the corresponding plugin to the pom
<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>test-jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
But when I run maven I can not create the jar, I also get the following notification by console:
--- maven-source-plugin: 3.0.1: test-jar-no-fork (attach-sources) No sources in project. Archive not created.
It may be missing something define?