인테리제이는 국내 개발자들이 가장 많이 사용하는 IDE툴 중에 하나입니다. 이클립스를 사용하시는 분들도 계시고 인텔리제이를 사용하는 분들도 계시죠. 오늘은 intellij를 사용하다가 프로젝트를 빌드 했는데 갑자기 발생했을 때 해결하는 방법 2가지에 대해 알아보겠습니다.
1. 메시지 발생
아래 그림과 같은 메시지가 발생하면서 빌드가 되질 않습니다.
Error running 'your project name' : Command line is too long. Shorten command line for 'your project name' or also for Spring Boot default configuration.
▼ intellij 빌드 발생 에러
2. workspace.xml 찾기
프로젝트 루트 경로에서 .idea/workspace.xml에서 파일을 찾습니다.
3. xml 에서 PropertiesComponent 찾기.
PropertiesComponent를 검색해서 찾습니다.
4. dynamic.classpath 추가하기
<component name = "PropertiesComponent"> 내부에 <property name="dynamic.classpath" value="true" /> 를 추가합니다. 아래 그림처럼 되면 됩니다.
▼ 아래처럼 property를 추가합니다.
TIP. 만약에 xml파일에서 PropertiesComponent 보이질 않는다면,
아예 아래처럼 통으로 추가하세요.
<component name="PropertiesComponent">
<property name="dynamic.classpath" value="true" />
</component>
< 추가방법 >
위의 방법으로 잘 해결되지 않는다면
Run/Debug Configuration를 열고 Shorten command line의 옵션을 변경하는 방법도 있습니다.
Shorten command line 옵션에는 4가지가 있습니다.
- None
- JAR Manifest
- classpath file
- User-local default
이 중에서 JAR Manifest로 선택해보시길 바랍니다.
아래는 JAR manifest로 옵션을 바꾼 모습입니다.
▼ Run/Debug Configuration > Shorten command line 변경.