본문 바로가기
Web/Spring

[Maven] 최초 build시 잡아야 하는 configuration

by 정고정 2021. 11. 7.
반응형

Profile 설정

The requested profile "pom.xml" could not be activated because it does not exist.

maven build할 때 뜨는 configuration 창에서 profile부분을 보면 "pom.xml"이 써 있다.

얘가 왜 들어가 있는지 모르겠는데 지워주면 해결된다.

 

DefaultGoal 설정

No goals have been specified for this build

gradle이랑 달리 maven은 goal을 설정해줘야 build가 가능하다고 한다.

pom.xml에 default goal을 추가해주거나 edit configuration에 install을 추가해주자...

<build> 
	<defaultGoal>install</defaultGoal>
</build>

 

Goal 종류

https://choiseonjae.github.io/java/maven/goal/

 

Maven 명령어(Goal)이란?

앞에서 말헀듯이 Goal은 어떤 작업을 수행할 지 지정할 수 있다.몇몇 goal들은 이미 내장되어 있어 Maven이 알아서 작업을 수행한다.

choiseonjae.github.io

 

 

gradle쓰려다가 maven 쓰니까 진짜 생각지도 못한 곳에서 에러가 터지는데 잡는 게 진짜...

쓰고 싶은 거 전부 적용해놓고 편하게 개발하려고 했는데 삼일째 잡은 에러만 몇개인지 모르겠다

 

진짜 이해 안 가는 거

Test패키지 정리하다가 ApplicationTest를 실수로 다른 패키지에 옮겨버려서 

Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test에러가 떴다. 

그래서 다시 최상단 패키지에 넣어줬는데 계속 에러가 뜬다.

메이븐 업데이트 클린 빌드 루트 꼬박꼬박 해줬는데 계속 뜬다

뭐가 문제인지 모르겠다

 

-> 해결함

다시 다른 패키지에 옮겨줬는데 이게 move가 아니라 copy로 들어갔다

default package에 왜 뭐가 차 있다고 뜨는지 궁금했는데 아 진짜... 아 진짜 STS......

 

 

 

 

 

반응형

댓글