Skip to content

Commit 900b78a

Browse files
committed
🐛 Corregir error de compilación Java 11: invalid target release: 11
**Cambios realizados:** ✅ **Workflows CI/CD:** - Añadir pasos de verificación de Java 11 en ci.yml y release.yml - Verificar JAVA_HOME y versión de Maven en cada ejecución - Asegurar configuración robusta de JDK 11 (Temurin) ✅ **Configuración Maven:** - Añadir configuración explícita del maven-compiler-plugin en pom.xml padre - Configurar source=11, target=11, release=11 en el plugin - Actualizar warmup-core/pom.xml con configuración específica de Java 11 **Solución al problema:** - El error 'invalid target release: 11' ocurría porque el entorno no detectaba correctamente Java 11 - Las verificaciones añadidas ayudarán a diagnosticar problemas de configuración - La configuración explícita del compiler plugin garantiza compatibilidad con Java 11
1 parent c99d8f5 commit 900b78a

4 files changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ jobs:
2424
java-version: ${{ matrix.java-version }}
2525
distribution: 'temurin'
2626

27+
- name: Verify Java version
28+
run: |
29+
java -version
30+
echo "JAVA_HOME: $JAVA_HOME"
31+
echo "Maven version:"
32+
mvn -version
33+
2734
- name: Cache Maven dependencies
2835
uses: actions/cache@v3
2936
with:
@@ -63,6 +70,13 @@ jobs:
6370
java-version: '11'
6471
distribution: 'temurin'
6572

73+
- name: Verify Java version
74+
run: |
75+
java -version
76+
echo "JAVA_HOME: $JAVA_HOME"
77+
echo "Maven version:"
78+
mvn -version
79+
6680
- name: Run benchmarks
6781
run: mvn clean test -Pbenchmark -B
6882

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ jobs:
1919
java-version: '11'
2020
distribution: 'temurin'
2121

22+
- name: Verify Java version
23+
run: |
24+
java -version
25+
echo "JAVA_HOME: $JAVA_HOME"
26+
echo "Maven version:"
27+
mvn -version
28+
2229
- name: Cache Maven dependencies
2330
uses: actions/cache@v3
2431
with:

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,16 @@
127127
</properties>
128128
<build>
129129
<plugins>
130+
<plugin>
131+
<groupId>org.apache.maven.plugins</groupId>
132+
<artifactId>maven-compiler-plugin</artifactId>
133+
<version>3.14.0</version>
134+
<configuration>
135+
<release>11</release>
136+
<source>11</source>
137+
<target>11</target>
138+
</configuration>
139+
</plugin>
130140
<plugin>
131141
<groupId>org.apache.maven.plugins</groupId>
132142
<artifactId>maven-surefire-plugin</artifactId>

warmup-core/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
<groupId>org.apache.maven.plugins</groupId>
2020
<artifactId>maven-compiler-plugin</artifactId>
2121
<version>3.14.0</version>
22+
<configuration>
23+
<source>11</source>
24+
<target>11</target>
25+
<release>11</release>
26+
</configuration>
2227
</plugin>
2328

2429
<!-- JaCoCo Plugin for Code Coverage -->

0 commit comments

Comments
 (0)