diff --git a/.github/workflows/validate-submission.yml b/.github/workflows/validate-submission.yml index bcb362f..a04aed0 100644 --- a/.github/workflows/validate-submission.yml +++ b/.github/workflows/validate-submission.yml @@ -11,13 +11,19 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- - name: Setup Java 11 uses: actions/setup-java@v4 with: java-version: '11' distribution: 'temurin' - cache: 'gradle' - name: Display received payload run: | @@ -118,45 +124,47 @@ jobs: echo "📄 Contenido de App.java:" cat example/actions-ejemplo/src/main/java/com/javatutor/App.java - - name: Run Gradle tests - id: gradle_test + - name: Run Maven tests + id: maven_test continue-on-error: true working-directory: example/actions-ejemplo run: | - echo "🧪 Ejecutando tests con Gradle..." - - # Hacer ejecutable el gradlew (por si acaso) - chmod +x gradlew + echo "🧪 Ejecutando tests con Maven..." - # Ejecutar tests y capturar salida - ./gradlew test --no-daemon --console=plain --stacktrace 2>&1 | tee test_output.log - exit_code=${PIPESTATUS[0]} - echo "exit_code=$exit_code">> $GITHUB_OUTPUT - echo "📄 Moviendo archivo de salida..." - mv test_output.log ../../test_output.log + # Ejecutar tests con flags de optimización + mvn test -B -q -T 1C \ + -Dmaven.test.failure.ignore=false \ + -Dmaven.javadoc.skip=true \ + -Drat.skip=true \ + -Dcheckstyle.skip=true \ + -Denforcer.skip=true + echo "exit_code=$?">> $GITHUB_OUTPUT - echo "📁 Archivos generados por Gradle:" - ls -la build/test-results/test/ || echo "⚠️ No se generaron resultados de tests" + echo "📁 Archivos generados por Maven:" + ls -la target/surefire-reports/ 2>/dev/null || echo "⚠️ No se generaron resultados de tests" - name: Parse test results id: parse_results run: | echo "🔍 Parseando resultados de tests..." - # Primero intentar leer desde XML de Gradle (más confiable) - XML_FILE="example/actions-ejemplo/build/test-results/test/TEST-com.javatutor.AppTest.xml" + # Buscar archivo XML de Maven + XML_FILE=$(find example/actions-ejemplo/target/surefire-reports -name "*.xml" -type f 2>/dev/null | head -n 1) if [ -f "$XML_FILE" ]; then - echo "✅ Archivo XML de resultados encontrado" + echo "✅ Archivo XML encontrado: $XML_FILE" - # Instalar xmllint si no está disponible - sudo apt-get update && sudo apt-get install -y libxml2-utils + # Usar grep/sed en lugar de xmllint (más rápido, no requiere instalar paquetes) + TESTS_RUN=$(grep -oP 'tests="\K[^"]+' "$XML_FILE" | head -1) + TESTS_FAILED=$(grep -oP 'failures="\K[^"]+' "$XML_FILE" | head -1) + TESTS_ERRORS=$(grep -oP 'errors="\K[^"]+' "$XML_FILE" | head -1) + TESTS_SKIPPED=$(grep -oP 'skipped="\K[^"]+' "$XML_FILE" | head -1) - # Extraer datos del XML - TESTS_RUN=$(xmllint --xpath "string(//testsuite/@tests)" "$XML_FILE" 2>/dev/null || echo "0") - TESTS_FAILED=$(xmllint --xpath "string(//testsuite/@failures)" "$XML_FILE" 2>/dev/null || echo "0") - TESTS_ERRORS=$(xmllint --xpath "string(//testsuite/@errors)" "$XML_FILE" 2>/dev/null || echo "0") - TESTS_SKIPPED=$(xmllint --xpath "string(//testsuite/@skipped)" "$XML_FILE" 2>/dev/null || echo "0") + # Valores por defecto si están vacíos + TESTS_RUN=${TESTS_RUN:-0} + TESTS_FAILED=${TESTS_FAILED:-0} + TESTS_ERRORS=${TESTS_ERRORS:-0} + TESTS_SKIPPED=${TESTS_SKIPPED:-0} # Calcular tests pasados TESTS_PASSED=$((TESTS_RUN - TESTS_FAILED - TESTS_ERRORS - TESTS_SKIPPED)) @@ -183,10 +191,14 @@ jobs: else echo "status=failed">> $GITHUB_OUTPUT - # Extraer mensaje de error del XML - ERROR_MSG=$(xmllint --xpath "//testcase/failure/text()" "$XML_FILE" 2>/dev/null || \ - xmllint --xpath "//testcase/error/text()" "$XML_FILE" 2>/dev/null || \ - echo "Tests fallaron sin mensaje de error") + # Extraer mensaje de error del XML (usando grep/sed, más rápido) + ERROR_MSG=$(grep -oP ']*>\K[^<]+' "$XML_FILE" 2>/dev/null | head -1) + if [ -z "$ERROR_MSG" ]; then + ERROR_MSG=$(grep -oP ']*>\K[^<]+' "$XML_FILE" 2>/dev/null | head -1) + fi + if [ -z "$ERROR_MSG" ]; then + ERROR_MSG="Tests fallaron sin mensaje de error" + fi # Limitar longitud del error ERROR_MSG="${ERROR_MSG:0:500}" @@ -196,56 +208,24 @@ jobs: echo "❌ Tests fallaron: $ERROR_MSG" fi - elif [ -f test_output.log ]; then - echo "⚠️ XML no encontrado, parseando desde test_output.log" + else + # Si no hay XML, asumir que el exit code indica el resultado + echo "⚠️ XML no encontrado, usando exit code de Maven" - # Verificar si hubo error de compilación (Gradle) - if grep -q "Compilation failed" test_output.log || grep -q "FAILURE: Build failed" test_output.log; then - echo "❌ Error de compilación detectado" - echo "status=error">> $GITHUB_OUTPUT - echo "tests_run=0">> $GITHUB_OUTPUT - echo "tests_passed=0">> $GITHUB_OUTPUT + EXIT_CODE="${{ steps.maven_test.outputs.exit_code }}" + if [ "$EXIT_CODE" = "0" ]; then + echo "status=success">> $GITHUB_OUTPUT + echo "tests_run=1">> $GITHUB_OUTPUT + echo "tests_passed=1">> $GITHUB_OUTPUT echo "tests_failed=0">> $GITHUB_OUTPUT - - ERROR_REPORT=$(grep -A 15 "error:" test_output.log | head -n 20) - ERROR_REPORT="${ERROR_REPORT:0:500}" - ERROR_REPORT=$(echo "$ERROR_REPORT" | sed 's/"/\\"/g' | tr '\n' ' ') - echo "error_report=Error de compilación: $ERROR_REPORT">> $GITHUB_OUTPUT + echo "error_report=">> $GITHUB_OUTPUT else - # Intentar extraer de output de Gradle - # Gradle output: "5 tests completed, 2 failed" - TESTS_RUN=$(grep -oP '\K\d+(?= tests? completed)' test_output.log | head -1 || echo "0") - TESTS_FAILED=$(grep -oP '\K\d+(?= failed)' test_output.log | head -1 || echo "0") - - TESTS_RUN=${TESTS_RUN:-0} - TESTS_FAILED=${TESTS_FAILED:-0} - TESTS_PASSED=$((TESTS_RUN - TESTS_FAILED)) - - echo "tests_run=$TESTS_RUN">> $GITHUB_OUTPUT - echo "tests_passed=$TESTS_PASSED">> $GITHUB_OUTPUT - echo "tests_failed=$TESTS_FAILED">> $GITHUB_OUTPUT - - if [ "$TESTS_FAILED" -eq "0" ] && [ "$TESTS_RUN" -gt "0" ]; then - echo "status=success">> $GITHUB_OUTPUT - echo "error_report=">> $GITHUB_OUTPUT - elif [ "$TESTS_RUN" -eq "0" ]; then - echo "status=error">> $GITHUB_OUTPUT - echo "error_report=No se ejecutaron tests">> $GITHUB_OUTPUT - else - echo "status=failed">> $GITHUB_OUTPUT - ERROR_REPORT=$(grep -A 10 "FAILED" test_output.log | head -n 20) - ERROR_REPORT="${ERROR_REPORT:0:500}" - ERROR_REPORT=$(echo "$ERROR_REPORT" | sed 's/"/\\"/g' | tr '\n' ' ') - echo "error_report=$ERROR_REPORT">> $GITHUB_OUTPUT - fi + echo "status=failed">> $GITHUB_OUTPUT + echo "tests_run=1">> $GITHUB_OUTPUT + echo "tests_passed=0">> $GITHUB_OUTPUT + echo "tests_failed=1">> $GITHUB_OUTPUT + echo "error_report=Test execution failed">> $GITHUB_OUTPUT fi - else - echo "❌ No se encontraron archivos de resultados" - echo "status=error">> $GITHUB_OUTPUT - echo "error_report=No se encontraron archivos de resultados">> $GITHUB_OUTPUT - echo "tests_run=0">> $GITHUB_OUTPUT - echo "tests_passed=0">> $GITHUB_OUTPUT - echo "tests_failed=0">> $GITHUB_OUTPUT fi - name: Report results to Firestore diff --git a/example/actions-ejemplo/GRADLE-MIGRATION.md b/example/actions-ejemplo/GRADLE-MIGRATION.md deleted file mode 100644 index 5a2726c..0000000 --- a/example/actions-ejemplo/GRADLE-MIGRATION.md +++ /dev/null @@ -1,166 +0,0 @@ -# 🚀 Migración de Maven a Gradle - -Este proyecto ha sido migrado de Maven a Gradle para mejorar el rendimiento de ejecución de tests en GitHub Actions. - -## 📊 Beneficios de la Migración - -- ⚡ **60% más rápido** en ejecuciones con caché -- 💾 **Caché más eficiente** (100-200 MB vs 150-300 MB) -- 🔄 **Builds incrementales** nativos -- 📦 **Configuración más simple** (25 líneas vs 65 líneas) -- 💰 **Menor costo** en GitHub Actions minutes - -## 📁 Archivos Nuevos - -``` -example/actions-ejemplo/ -├── build.gradle ← Reemplaza pom.xml -├── settings.gradle ← Configuración del proyecto -├── gradlew ← Script wrapper para Linux/Mac -├── gradlew.bat ← Script wrapper para Windows -└── gradle/ - └── wrapper/ - ├── gradle-wrapper.jar ← Descargador de Gradle - └── gradle-wrapper.properties ← Config del wrapper -``` - -## ⚠️ IMPORTANTE: Descargar gradle-wrapper.jar - -El archivo `gradle-wrapper.jar` no se puede crear manualmente. Necesitas descargarlo: - -### Opción 1: GitHub Actions lo descargará automáticamente -Cuando hagas push, el workflow de GitHub Actions descargará automáticamente el wrapper. - -### Opción 2: Descarga manual (si tienes Java instalado) - -```powershell -# Navegar al proyecto -cd example\actions-ejemplo - -# Descargar el wrapper (requiere Java instalado) -# En Windows, usar gradlew.bat -.\gradlew.bat wrapper - -# Verificar que funciona -.\gradlew.bat test -``` - -### Opción 3: Descargar desde GitHub - -```powershell -# Descargar gradle-wrapper.jar desde un release oficial -$url = "https://raw.githubusercontent.com/gradle/gradle/v8.5.0/gradle/wrapper/gradle-wrapper.jar" -$output = "gradle\wrapper\gradle-wrapper.jar" -Invoke-WebRequest -Uri $url -OutFile $output -``` - -## 🧪 Cómo Ejecutar Tests Localmente - -### Con Gradle (nuevo): -```bash -# Linux/Mac -./gradlew test - -# Windows -.\gradlew.bat test -``` - -### Comandos equivalentes: - -| Maven | Gradle | -|-------|--------| -| `mvn clean` | `.\gradlew.bat clean` | -| `mvn compile` | `.\gradlew.bat compileJava` | -| `mvn test` | `.\gradlew.bat test` | -| `mvn package` | `.\gradlew.bat build` | - -## 📝 Archivos de Tests - Sin Cambios - -**No se modificó ningún archivo de tests**. Los archivos `.java` son idénticos: - -- ✅ `src/main/java/com/javatutor/App.java` - Sin cambios -- ✅ `src/test/java/com/javatutor/AppTest.java` - Sin cambios - -Solo cambió la herramienta de build (Maven → Gradle). - -## 🔧 Workflow de GitHub Actions - -El workflow ahora usa Gradle: - -```yaml -- name: Setup Java 11 - uses: actions/setup-java@v4 - with: - cache: 'gradle' # ← Cambió de 'maven' a 'gradle' - -- name: Run tests - run: ./gradlew test # ← Cambió de 'mvn test' -``` - -## 📦 Resultados de Tests - -**Maven (antes):** -- Ubicación: `target/surefire-reports/` - -**Gradle (ahora):** -- XML: `build/test-results/test/*.xml` -- HTML: `build/reports/tests/test/index.html` - -## 🗑️ Archivos que se pueden eliminar (opcional) - -Si la migración funciona correctamente, puedes eliminar: - -``` -example/actions-ejemplo/ -├── pom.xml ← Ya no necesario -└── target/ ← Carpeta de Maven (reemplazada por build/) -``` - -**PERO** mantén `pom.xml` por ahora como backup hasta confirmar que todo funciona. - -## ✅ Checklist de Migración - -- [x] Crear `build.gradle` -- [x] Crear `settings.gradle` -- [x] Crear scripts wrapper (`gradlew`, `gradlew.bat`) -- [x] Crear `gradle-wrapper.properties` -- [ ] Descargar `gradle-wrapper.jar` (pendiente) -- [x] Actualizar workflow de GitHub Actions -- [x] Actualizar `.gitignore` -- [ ] Probar localmente (requiere wrapper completo) -- [ ] Hacer commit y push -- [ ] Verificar en GitHub Actions - -## 🐛 Troubleshooting - -### Error: "Could not find or load main class org.gradle.wrapper.GradleWrapperMain" - -**Solución:** Falta el archivo `gradle-wrapper.jar`. Ver "Opción 3" arriba. - -### Error: "Permission denied" en Linux/Mac - -**Solución:** -```bash -chmod +x gradlew -./gradlew test -``` - -### Tests no se ejecutan - -**Verificar:** -1. Archivos Java están en las carpetas correctas -2. `build.gradle` tiene `test { useJUnitPlatform() }` -3. Ejecutar con `--stacktrace` para ver detalles: - ```bash - ./gradlew test --stacktrace - ``` - -## 📚 Recursos - -- [Gradle Documentation](https://docs.gradle.org/8.5/userguide/userguide.html) -- [Migrating from Maven](https://docs.gradle.org/current/userguide/migrating_from_maven.html) -- [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) - ---- - -**Nota:** Esta migración mantiene 100% de compatibilidad con el código Java existente. Solo cambia la herramienta de build. diff --git a/example/actions-ejemplo/build.gradle b/example/actions-ejemplo/build.gradle deleted file mode 100644 index 0a54af3..0000000 --- a/example/actions-ejemplo/build.gradle +++ /dev/null @@ -1,89 +0,0 @@ -plugins { - id 'java' - id 'application' -} - -group = 'com.javatutor' -version = '1.0-SNAPSHOT' - -description = 'Java Tutor - Actions Ejemplo - Proyecto para validación de ejercicios con GitHub Actions' - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(11) - } -} - -application { - mainClass = 'com.javatutor.App' -} - -repositories { - mavenCentral() -} - -dependencies { - // JUnit 5 para tests (misma versión que tenías en Maven) - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3' -} - -test { - useJUnitPlatform() - - // Configuración de output detallado para GitHub Actions - testLogging { - events "passed", "skipped", "failed", "standardOut", "standardError" - exceptionFormat "full" - showStandardStreams = true - showExceptions = true - showCauses = true - showStackTraces = true - } - - // Generar reportes XML y HTML - reports { - junitXml.required = true - html.required = true - } - - // Incluir todos los tests (*Test.java) - include '**/*Test.class' -} - -// Task para limpiar solo los archivos Java generados (útil para el workflow) -tasks.register('cleanJavaFiles') { - doLast { - delete fileTree('src/main/java') { - include '**/*.java' - } - delete fileTree('src/test/java') { - include '**/*.java' - } - println '🗑️ Archivos Java limpiados' - } -} - -// Task personalizada para verificar estructura -tasks.register('verifyStructure') { - doLast { - def mainFile = file('src/main/java/com/javatutor/App.java') - def testFile = file('src/test/java/com/javatutor/AppTest.java') - - println "📁 Verificando estructura del proyecto..." - println "Main file exists: ${mainFile.exists()} - ${mainFile.absolutePath}" - println "Test file exists: ${testFile.exists()} - ${testFile.absolutePath}" - - if (!mainFile.exists()) { - throw new GradleException("❌ App.java no encontrado") - } - if (!testFile.exists()) { - throw new GradleException("❌ AppTest.java no encontrado") - } - - println "✅ Estructura verificada correctamente" - } -} - -// Hacer que test dependa de verifyStructure (opcional, para debugging) -// test.dependsOn verifyStructure diff --git a/example/actions-ejemplo/gradle/wrapper/gradle-wrapper.jar b/example/actions-ejemplo/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index d64cd49..0000000 Binary files a/example/actions-ejemplo/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/example/actions-ejemplo/gradle/wrapper/gradle-wrapper.properties b/example/actions-ejemplo/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 1af9e09..0000000 --- a/example/actions-ejemplo/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/example/actions-ejemplo/gradlew b/example/actions-ejemplo/gradlew deleted file mode 100644 index 893ce95..0000000 --- a/example/actions-ejemplo/gradlew +++ /dev/null @@ -1,233 +0,0 @@ -#!/bin/sh - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: 0ドル may be a link -app_path=0ドル - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}"> /dev/null && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -}>&2 - -die () { - echo - echo "$*" - echo - exit 1 -}>&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java>/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs>/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/example/actions-ejemplo/gradlew.bat b/example/actions-ejemplo/gradlew.bat deleted file mode 100644 index 93e3f59..0000000 --- a/example/actions-ejemplo/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version>NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/example/actions-ejemplo/pom.xml b/example/actions-ejemplo/pom.xml index 07b6cd4..58e6387 100644 --- a/example/actions-ejemplo/pom.xml +++ b/example/actions-ejemplo/pom.xml @@ -18,6 +18,12 @@ 11 11 5.9.3 + + + false + true + true + true @@ -46,6 +52,10 @@ 11 11 + false + false + false + false @@ -58,6 +68,33 @@ **/*Test.java + methods + 2 + 1 + true +
true + true + false + plain + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.1 + + true + + + + + org.apache.maven.plugins + maven-install-plugin + 3.1.1 + + true diff --git a/example/actions-ejemplo/settings.gradle b/example/actions-ejemplo/settings.gradle deleted file mode 100644 index 7e24937..0000000 --- a/example/actions-ejemplo/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'actions-ejemplo' diff --git a/index.html b/index.html index 2f1785c..8b3795e 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@