Developer Sang Guy

[MAVEN] JAR, WAR 생성 시 Resource File Exclude 본문

Others

[MAVEN] JAR, WAR 생성 시 Resource File Exclude

은크 2023. 1. 26. 13:45

application.properties를 Jar, War 생성 시 제외하고 싶을 경우 pom.xml <build><plugins> 태그 안에 아래와 같이 코드 작성하면 된다.

 

JAR

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-jar-plugin</artifactId>
	<configuration>
		<excludes>
			This is where the exclusion occurs
			<exclude>**/application.properties</exclude>
		</excludes>
	</configuration>
</plugin>

 

WAR

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-war-plugin</artifactId>
	<configuration>
		<packagingExcludes>**/application.properties</packagingExcludes>
	</configuration>
</plugin>

'Others' 카테고리의 다른 글

[Wildfly] 로그가 안나와요(sl4j 충돌)  (0) 2023.03.30
[Mysql]Full Text Search ngram  (0) 2023.02.17
[Mysql]Full Text Search  (0) 2023.02.15
[Apache] ServerName, ServerAlias 동작 방식  (0) 2023.01.12
SRI 생성 방법  (0) 2022.12.16
Comments