DJI-Cloud-API-Demo icon indicating copy to clipboard operation
DJI-Cloud-API-Demo copied to clipboard

1.9.0 jar cannot be launched

Open neilyoung opened this issue 1 year ago • 2 comments

Seems to be missing main class entry in Manifest:

ubuntu@ca:~/backend$ java -jar /home/ubuntu/backend/sample/target/sample-1.9.0.jar
no main manifest attribute, in /home/ubuntu/backend/sample/target/sample-1.9.0.jar

neilyoung avatar Feb 28 '24 13:02 neilyoung

Manifest of the current target:

image

Compared to manifest of the 1.8.0 target:

image

neilyoung avatar Feb 28 '24 14:02 neilyoung

Found it. This section is missing from sample/src/pom.xml:

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>1.1.12.RELEASE</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

neilyoung avatar Feb 28 '24 14:02 neilyoung