Programing

IntelliJ IDEA에서 프로젝트 이름 바꾸기

lottogame 2020. 11. 21. 08:18
반응형

IntelliJ IDEA에서 프로젝트 이름 바꾸기


프로젝트가 포함 된 디렉토리가 "코드"인 프로젝트가 있습니다.

IDEA를 열면 최근 프로젝트 목록에 그 이름 만 표시됩니다.

설정에서 이것을 변경하는 방법이 있습니까?

File-> Project Structure-> Project로 이동하려고했지만 IntelliJ IDEA 13에서 프로젝트 이름 옵션을 찾을 수 없습니다.

프로젝트 설정을 열 때 표시되는 내용입니다. 내 프로젝트 설정에서 볼 수 있습니다.


다음과 같이 최근 프로젝트 목록에 표시되는 이름프로젝트 이름을 변경할 수 있습니다 .

로 이동 Project Structure( Ctrl+ Alt+ Shift+ S) →Project Settings / Project → Project name:

여기에 이미지 설명 입력

이 이름을 루트 모듈의 이름이나 파일 시스템의 폴더 이름과 혼동해서는 안됩니다.이 이름은 비슷할 수도 있고 아닐 수도 있습니다.

편집하다

.idea프로젝트 폴더 로 이동하여 이름이 지정된 파일을 만들고 .name한 줄에 프로젝트 이름을 입력하십시오.

예 :

my-new-project-name

그런 다음 IntelliJ를 다시 시작하십시오.

이것은 .idea(.iws 파일 등으로 파일 기반이 아닌) 폴더 기반 아이디어 프로젝트를 사용하고 있다고 가정합니다.


한편 IntelliJ 2016.2에 대해 이야기합니다.

관련된 다양한 이름이 있습니다.

  1. 빨간색 폴더 이름. 즉, 프로젝트가있는 폴더입니다. 이 이름은 프로젝트 구조와 상단 창의 경로에 나타납니다.
  2. 파란색 은 iml 파일의 이름입니다. iml 파일의 이름을 바꿀 수 있습니다. iml 파일이 폴더 이름과 다른 경우 둘 다 프로젝트보기에 있습니다.
  3. 노란색 은 위의 응답에서 @vikingsteve (프로젝트 구조 (ctrl-alt-shift-s)-> 프로젝트 설정 / 프로젝트-> 프로젝트 이름)에 설명 된대로 프로젝트 이름을 설정할 수 있습니다. .idea 폴더의 ".name"파일에 작성된 프로젝트 이름을 찾을 수 있습니다. 최근 열린 파일 목록에 나타나는 이름이기도합니다.
  4. 갈색 프로젝트는 Maven 프로젝트 일 경우, 추가로 치어의 이슈 ID를해야합니다.

일반적으로 이러한 이름은 모두 동일하여 삶을 더 쉽게 만듭니다.

때로는 그렇지 않습니다. 그들이 달라야하는 이유는 많습니다. 예를 들어 두 브랜치에서 동일한 프로젝트를 동시에 사용할 때 프로젝트 버전을 차별화하는 데 도움이됩니다 (IntelliJ 2016.2의 이미지 배경 기능도 사용합니다).

이러한 이름을 변경하는 동안 IntellJ는 artifactId 이름 (갈색)으로 새 * .iml을 생성 할 수 있습니다. 이 경우 유지하지 않으려는 * .iml 파일을 삭제하면됩니다.

IntelliJ 프로젝트 이름


다음은 IntelliJ Idea Community Edition에서 따라야 할 단계입니다.

  1. 파일 >> 프로젝트 구조 >> 프로젝트> 프로젝트 이름으로 이동하십시오. 프로젝트 이름을 새 이름으로 업데이트하십시오.

  2. pom.xml 업데이트 프로젝트 이름으로 이동하십시오.

  3. "프로젝트"보기를 선택하고 프로젝트의 루트 폴더를 클릭 한 다음 이름을 리팩터링하십시오.

  4. IntelliJ Idea를 종료하고이 프로젝트 저장소가 저장된 Windows 디렉터리 구조에서 루트 폴더 이름을 변경합니다.

  5. IntelliJ Idea를 다시 시작하고 "기존 리소스에서 프로젝트 가져 오기"옵션을 사용하여 프로젝트를 가져옵니다.


Actually this is a maven project and its name is defined from the maven pom.xml So if you want to change the name you need to change its name in pom.xml
from

 <artifactId>Code</artifactId>

to

 <artifactId>My-prject-name</artifactId>

Am using intellij 2017.2.6

  • Go to project view

  • Right Click on the top root element

  • Choose Refactor-> Rename

  • Small dialog appear -> enter the desired name

  • Click ok

이미지 1

여기에 이미지 설명 입력


This worked for me:

  1. Renamed module folder
  2. Updated module name in settings.gradle
  3. Updated all build.gradle references
  4. rm -rf .idea/modules/[module]
  5. Rebuild project

Tips for renaming a Gradle project

  1. Exit IntelliJ IDEA

  2. Edit contents of the following files {project_root}/settings.gradle {project_root}/.idea/.name

  3. Open IntelliJ IDEA

  4. Refresh Gradle Project


  1. Rename project in project tree view
  2. Rename project folder in project files tree view
  3. Rename artifactId and id in pom.xml (if maven is used)

For Gradle Springboot intellij project:
1. settings.gradle :
rootProject.name = 'new-name-project'
add/edit the above line at the bottom of the page
2. application.properties
spring.application.name=new-name-project
add/edit the above line at the top of the page
3. Go to file > project stricture > Project> Project-name: new-name-project
4. Apply and restart Intellij


폴더에 구조화 된 intellij 프로젝트

I completed the renaming as below.

The attached image is structured in project folder.

Must make changes in the xml into a new project name.

  1. close IDEA intellij (14.0.2)

  2. change intellij project name (folder)

    e.g) old_project_name -> new_project_name

  3. change .idea in folder

We have only changed the

1) artifacts in folder -> xml

2) runConfigurations in folder -> xml

3) modules.xml

4) workspace.xml

5) [your_project_name].iml

(Depending on your project structure, your folder may not contain xml)

  1. restart IDEA intellij

  2. File -> Import Module...[your intellij project]

I hope this helps you :)


If your project is file based, you cannot rename the project from within IDEA.

Convert your project to a directory based format, and then you will have the option to rename it under "File > Project Structure > Project > Project Name".


I recently figured out a way to do this.

I wrote a bash script that you run from the root folder of your project (only tested on Mac) to rename all of the files in the .idea folder that contain your project name, and do a find-replace inside those files.

주의하십시오 : 프로젝트 이름이 고유한지 확인하십시오. 즉, 'towers-of-hanoi'와 같은 프로젝트 이름은 고유하고 스크립트에는 문제가 없지만 'a'의 모든 인스턴스와 마찬가지로 'a'라는 프로젝트는 문제가 없습니다. 파일에서 새 프로젝트 이름으로 대체됩니다.

참고 URL : https://stackoverflow.com/questions/21177495/renaming-a-project-in-intellij-idea

반응형