Eddie's Blog

[spring boot] How to package a project with shell-executable jar 본문

programmings

[spring boot] How to package a project with shell-executable jar

eddie.y 2019. 2. 11. 18:12

1. pom.xml에 executable 설정

<build>

...

<plugins>

<plugin>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-maven-plugin</artifactId>

<configuration>

<executable>true</executable>

</configuration>

</plugin>

...

</plugins>

...

</build>


2. 패키징

$ mvn package


3. shell script로 패키징된 jar 실행

$ ./target/example-0.0.1-SNAPSHOT.jar

Comments