개발환경, 도구/Intellij

intellij에서 console에 메이븐 명령어 사용 ( mvn -U clean install ), maven 오류

gu9gu 2023. 9. 15. 14:41

cmd에서 mvn -version 

 

cmd 에서 mvn -U clean install

 

인텔리제이에서는 안되네..

인텔리제이 환경 변수 설정하는 부분 같은데, 이거 해도 안되네.. 나중에 다시..

 

테스트 돌렸을 때 다른 프로젝트 resource를 못 가져오는 문제였어서 rebuild project를 해서 해결해보기로 함.

 

 

 

-----------------------------

2023-12-05

된다!.

안 됐을 때는 명령창을 잘못 잡았던 건가? 무튼 된다.

 

1. terminal 중 Command Prompt 선택

2. 프로젝트가 있는 경로 이동해서 maven 실행 : mvn clean install -pl {프로젝트 이름} -am

  -pl : 프로젝트 하나만 빌드됨?

  -am : 의존성 걸려있는 프로젝트 같이 빌드됨?

 

 

 

 


maven 오류

 

1. Failed to execute goal......

 [ERROR] Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:2.0.0-RC.1:process-asciidoc (generate-docs) on project {프로젝트명}: Execution generate-docs of goal org.asciidoctor:asciidoctor-maven-plugin:2.0.0-RC.1:process-asciidoc failed: Plugin org.asciidoctor:asciido
ctor-maven-plugin:2.0.0-RC.1 or one of its dependencies could not be resolved: Failure to find io.spring.asciidoctor:spring-asciidoctor-extensions:jar:0.1.3.RELEASE in http://........ was cached in the local repository, resolution will 
not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

 

 

 1) maven 버전 맞추기

   1-1) pom.xml에 설정된 maven 버전에 맞게 설치 

<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>

 

   1-2) 시스템 환경변수 경로 설정

   1-3) 인텔리제이에서 경로 설정 : Maven > Runner - Environment variables : MAVEN_HOME=C:\Program Files\apache-maven-3.8.0\bin;JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_221

 

2) 해당 파일 local에서 찾아서 삭제

io.spring.asciidoctor:spring-asciidoctor-extensions:jar:0.1.3.RELEASE 

   -> C:\Users\{컴퓨터이름}\.m2\repository\io\spring\asciidoctor\spring-asciidoctor-extensions

 

 

 

 

 

참고

https://www.egovframe.go.kr/wiki/doku.php?id=egovframework:dev:dep:build:maven#%EB%A9%94%EC%9D%B4%EB%B8%90_%EA%B8%B0%EB%B3%B8_%EC%83%9D%EB%AA%85_%EC%A3%BC%EA%B8%B0

 

https://stackoverflow.com/questions/4856307/when-maven-says-resolution-will-not-be-reattempted-until-the-update-interval-of

 

 

https://kjyun.tistory.com/81