Skip to content

Instantly share code, notes, and snippets.

@samsee
Created March 21, 2019 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samsee/24813b4bba118c75991ccccf354d0404 to your computer and use it in GitHub Desktop.
Save samsee/24813b4bba118c75991ccccf354d0404 to your computer and use it in GitHub Desktop.
Java Build
<!-- 의존성 jar를 포함하여 빌드 -->
<properties>
<main.class>YourMainClass</main.class> <!-- jar 실행할 메인 클래스 -->
</properties>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${main.class}</mainClass>
</transformer>
</transformers>
</configuration>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment