로그를 살펴보면 내가 설정해주었던 메이븐이 아닌것을 파악했고 이를 어떻게 바꾸지 ~ ? 하고 고민하던 도중 이런 저런 시도를 했지만 아래의 위의 문제들을 해결하고(pom.xml이 없어서 mvn 빌드를 못하는 등의 문제...) 포스팅된 방법들도 해결을 했다.
[jdk 17 버전 사용을 위해서]
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>common-utils</artifactId>
<version>v1.0.0</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<JAVA_17_HOME>/Library/Java/JavaVirtualMachines/jdk-17.0.6.jdk</JAVA_17_HOME>
</properties>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.14.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>6.0.4</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.9.0</version>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.9.0</version>
<configuration>
<executable>${JAVA_17_HOME}/Contents/Home/bin/javac</executable>
<compilerVersion>17</compilerVersion>
</configuration>
</plugin>
</plugins>
</build>
</project>
[jitpack.yml]
jdk:
- openjdk17
before_install:
- echo "Before Install"
- bash ensure-java-17 install
install:
- echo "Install"
- if ! bash ensure-java-17 use; then source ~/.sdkman/bin/sdkman-init.sh; fi
- java -version
- mvn install
[ensure-17-java file]
#!/bin/bash
JV=`java -version 2>&1 >/dev/null | head -1`
echo $JV | sed -E 's/^.*version "([^".]*)\.[^"]*".*$/\1/'
if [ "$JV" != 17 ]; then
case "$1" in
install)
echo "Installing SDKMAN..."
curl -s "https://get.sdkman.io" | bash
source ~/.sdkman/bin/sdkman-init.sh
sdk version
sdk install java 17.0.6-amzn
;;
use)
echo "must source ~/.sdkman/bin/sdkman-init.sh"
exit 1
;;
esac
fi
로컬레포지토리를 settings.xml에 설정해서 진행했지만 사실 의미 없는 것 같다. 해당프로젝트 설정을 바꾸는거였으니까 ~