아래와 같이 pom.xml에 등록하면 됨
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 컴파일러 설정 -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>com.tistory.5dol.Starter</Main-Class> <!-- 실행시킬 Class 등록 -->
</manifestEntries>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.handlers</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.schemas</resource>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
'개발 이야기 > Java Story' 카테고리의 다른 글
Hostname 과 IP 가져오기 (0) | 2010.11.18 |
---|---|
Java GC의 원리 (0) | 2010.02.18 |
How to find bottleneck in J2EE application (조대협) (0) | 2010.02.11 |
JVM GC와 메모리 튜닝 (조대협) (0) | 2010.02.11 |
Java jstat로 메모리 모니터링 (0) | 2010.02.11 |