Nice programing

IntelliJ에서 전체 프로젝트에 대해 "단축 명령 줄"방법을 구성하는 방법

nicepro 2020. 11. 30. 19:51
반응형

IntelliJ에서 전체 프로젝트에 대해 "단축 명령 줄"방법을 구성하는 방법


테스트를 실행할 때 "명령 줄이 너무 깁니다"라는 오류 메시지가 나타납니다. 특정 메서드 또는 클래스에 대해 Run / Debug 구성의 "Shorten command line"메서드를 "JAR manifest"로 설정하면 작동하지만 전체 프로젝트에 대해 어떻게 설정합니까 아니면 IDE 전역 설정이 있습니까?


기본 JUnit 실행 / 디버그 구성 템플릿 변경하여 명령 줄을 단축하고 추가 구성을위한 템플릿으로 사용하는 기본 방법을 설정할 수 있습니다 . 그러면 프로젝트에서 생성 한 모든 새 실행 / 디버그 구성이 동일한 옵션을 사용합니다.

다음은 구성 가능한 명령 줄 단축기 옵션에 대한 관련 블로그 게시물 입니다.


.idea 폴더 내에서 workspace.xml 파일을 변경하십시오.

더하다

<property name="dynamic.classpath" value="true" />

...에

  <component name="PropertiesComponent">
.
.
.
  </component>

 <component name="PropertiesComponent">
    <property name="project.structure.last.edited" value="Project" />
    <property name="project.structure.proportion" value="0.0" />
    <property name="project.structure.side.proportion" value="0.0" />
    <property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
    <property name="dynamic.classpath" value="true" />
  </component>

보이지 않는 경우 직접 추가하세요.

 <component name="PropertiesComponent">
    <property name="dynamic.classpath" value="true" />
  </component>

Intellij 2018.2.5

실행 => 구성 편집 => 왼쪽에서 노드 선택 => 환경 확장 => 명령 줄 옵션 단축 => 클래스 경로 파일 또는 JAR 매니페스트 선택

명령 줄 옵션을 보여주는 실행 / 디버그 구성 스크린 샷

참고 URL : https://stackoverflow.com/questions/47926382/how-to-configure-shorten-command-line-method-for-whole-project-in-intellij

반응형