Para generar un maven-archetype-quickstart
- windows
mvn archetype:generate ^
-DgroupId={project-packaging} ^
-DartifactId={project-name} ^
-DarchetypeArtifactId=maven-archetype-quickstart ^
-DinteractiveMode=false
- Linux/mac/unix
mvn archetype:generate \
-DgroupId={project-packaging} \
-DartifactId={project-name} \
-DarchetypeArtifactId=maven-archetype-quickstart \
-DinteractiveMode=false
- One Line
mvn archetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
cuando queremos hacer un jar gordo que tenga todo lo que necesita de clases para correr el jar usamos el siguiente plugin
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.0</version>
<executions>
<!-- Attach the shade into the package phase -->
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${your.package.qualify.MainClass}</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>