Maven packages a Java project into a jar and executes it through the Java-jar command, which is typically configured.
Example: Java Project structure diagram
Maven POM Configuration
<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> image_handle</groupid> <artifactId>image_handle</artifactId> < version>1.0-snapshot</version> <packaging>jar</packaging> <name& gt;image_handle</name> <url>http://maven.apache.org</url> < properties> <project.build.sourceencoding>utf-8</ project.build.sourceencoding> </properties> <dependencies> &NB Sp <dependency> <groupId>junit</groupId>   <artifactId>junit</artifactId> &L t;version>3.8.1</version> <scope>test</scope> & nbsp </dependency> <dependency> &NBS P <groupId>jmagick</groupId> <artifactid>jmagick</ artifactid> <version>6.6.9</version> </dependency> </dependencies> <build> <F inalname>image</finalname> <plugins> <plugin> <groupid>org.apache.maven.plugins</ groupid> <artifactId>maven-jar-plugin</artifactId> & nbsp <version>2.4</version> <config uration> <archive> &NB Sp <manifest> <addClasspath>true</addClasspath> &NBSP ; <classpathprefix>lib/</classpathprefix > <mainclass>im Age_handle. app</mainclass> </manifest>
; &NBsp </archive> </configuration> </plugin> </p lugins> </build> </project>
Using Maven-package, you can call the jar directly