dji-sdk / DJI-Cloud-API-Demo

MIT License
112 stars 84 forks source link

1.9.0 jar cannot be launched #51

Open neilyoung opened 4 months ago

neilyoung commented 4 months ago

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 commented 4 months ago

Manifest of the current target:

image

Compared to manifest of the 1.8.0 target:

image
neilyoung commented 4 months ago

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>