学习写代码呀

导航

springboot-jar打包配置maven

<plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

 

-------------------------下面这种有问题---------------------

<plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <configuration>
              <descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs>
              <archive>
              <manifest>
                  <mainClass>com.RunApplication</mainClass>
              </manifest>
              </archive>
        </configuration>
        <executions>
            <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
            <goal>single</goal>
            </goals>
            </execution>
        </executions>
    </plugin>

posted on 2022-04-06 17:15  学习写代码呀  阅读(69)  评论(0编辑  收藏  举报