# docker run --rm -it fedora:40 /bin/bash
# yum install -y maven
rm -rf /app/ws/test; cd /app/ws
mvn archetype:generate -DgroupId=com.example -DartifactId=test -DinteractiveMode=false -DoutputDirectory=/app/ws
# test.value 라는 변수명을 생성 및 사용
cat <<'EOF' > /app/ws/test/pom.xml
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>test</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>test</name>
<url>http://maven.apache.org</url>
<properties>
<test.value>19</test.value>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${test.value}</source>
<target>${test.value}</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
EOF
cd /app/ws/test; mvn install
# 빌드된 자바 소스 파일 버전 확인
# major version: 63(Java 19)
javap -v /app/ws/test/target/classes/com/example/App.class | grep major