maven package all the code, including the dependent code

 < Build > 
        < plugins > 
        
            < plugin > 
                < the artifactId > Maven-Assembly-plugin </ the artifactId > 
                < Configuration > 
                    <-! This optional part, then coupled directly generate a runnable jar package -> 
                    <! - <Archive> -> 
                    <-! <the manifest> -> 
                    <-! <mainClass> exec.mainClass $ {} </ mainClass> -> 
                    <-! </ the manifest> -> 
                    < ! - </ Archive> -> 
                    < descriptorRefs > 
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>

        </plugins>
    </build>

 

Guess you like

Origin www.cnblogs.com/whm-blog/p/11580035.html