在pom文件中添加<finalName>标签,标签内填写想要生成的jar包名称:

  <build>
        <finalName>eureka-server-1.2</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

转自https://blog.csdn.net/yaomingyang/article/details/85224368