war로 패키징되는 메이븐 프로젝트를 생성한 뒤 아래 에러가 발생했다.

Exception java.lang.ExceptionInInitializerError: 
Cannot access defaults field of Properties 
[in thread "Worker-30: Building"]

에러가 표시되는 부분은 pom.xml의 첫줄 <project xmlns=...이다.

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <groupId>in.wonj</groupId>
  <artifactId>myArtifact</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  
  <dependencies>
  	<dependency>
  		...(생략)...
  	</dependency>
    ...(생략)...
  </dependencies>
  
  <build>
  	<plugins>
  		<plugin>
  			<groupId>org.apache.maven.plugins</groupId>
  			<artifactId>maven-compiler-plugin</artifactId>
  			<version>3.10.1</version>
  			<configuration>
  				<release>18</release>
  				<encoding>utf-8</encoding>
  			</configuration>
  		</plugin>
  	</plugins>
  </build>
</project>

 

 

- 해결


pom.xml에 maven-war-plugin플러그인을 추가한다.

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <version>3.3.2</version>
</plugin>
AND