배포할 때 발생한 문제로, local 환경에서 java -jar로 테스트 했을 때도 발생하지 않았지만 Jenkins에서 빌드할 때 에러가 발생합니다.
아래는 빌드할 때 나온 로그입니다
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ front ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 3 resources
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.613 s
[INFO] Finished at: 2024-02-23T16:54:19+09:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project front: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources failed: newPosition < 0: (-1 < 0) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[JENKINS] Archiving /var/lib/jenkins/workspace/ckin-front/pom.xml to store.ckin/front/0.0.1-SNAPSHOT/front-0.0.1-SNAPSHOT.pom
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
maven-resources-plugin:3.2.0
플러그인 설정으로 빌드를 진행해서 발생하는 에러입니다....
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</plugin>
...
application.properties
에 있는 주석 지우는 방법으로도 오류가 해결 된다고 하여 해당 방법으로도 진행하였습니다.