maven packaging project

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>

<plugin> 
                <artifactId>maven-assembly-plugin</artifactId> 
                <configuration> 
                    <archive> 
                        <manifest> 
                            <mainClass>zhan5.DemoApplication</mainClass> 
                        </manifest> 
                    </archive> 
                    <descriptorRefs> 
                        <descriptorRef>jar-with-dependencies</descriptorRef> 
                    </descriptorRefs> 
                </configuration> 
            </plugin>
</plugins>
</build>


[Right click]-”[Run As]-”[Maven build …]-” [Goals] of [Edit Configuration] fill in assembly: assembly ——" [Run], and two jar files are generated in the [target] folder, one with dependencies and one without

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326604193&siteId=291194637