Maven hits Fat package (full dependency of jar package) plugin

Source: Internet
Author: User

            <plugin> <artifactId> Maven-assembly-plugin </artifactId> <configuration> <descriptorRefs> <descriptorref>jar -with-dependencies</descriptorref> </descriptorRefs> <archive > <manifest> <mainclass>com.cetc.di.app</ma inclass> </manifest> </archive> </c                             Onfiguration> <executions> <execution>                             <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals                    >    </execution> </executions> </plugin> 


<mainClass>com.cetc.di.App</mainClass>   Declares the   main method of the Java-jar ****.jar runtime

The file that declares the main method for this display is extracted from the jar package: \meta-inf\manifest. MF inside shows the main method when the declaration is executed directly
such as: Main-class:com.corundumstudio.socketio.demo.chatlauncher

If there are other main methods in the JAR package to run such a command (Windows environment)
such as: Java-classpath. \demo-1.0.0-snapshot-jar-with-depeNdencies.jar Com.corundumstudio.socketio.demo.NamespaceChatLauncher
Package name--------------------------> contains the class name of the main method to execute

Maven hits Fat package (full dependency of jar package) plugin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.