From 1b2f12f3bafbe9c2ac82bf75242105ad87bb3e25 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Wed, 4 Dec 2024 14:25:22 +0100 Subject: [PATCH 1/3] re-enabled integration tests for xtend-archetype --- full-build.sh | 3 +-- org.eclipse.xtend.maven.archetype/pom.xml | 11 +++++++---- .../resources/META-INF/maven/archetype-metadata.xml | 2 +- .../resources/projects/first/archetype.properties | 1 + 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/full-build.sh b/full-build.sh index d1e9da6c545..82330aac90e 100755 --- a/full-build.sh +++ b/full-build.sh @@ -2,7 +2,6 @@ MVN_ARGS=(\ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ - -Dit-archetype-tests-skip=true \ ) # args parsing inspired by https://gist.github.com/jehiah/855086 @@ -22,7 +21,7 @@ while [ "$1" != "" ]; do exit ;; --no-tests) - MVN_ARGS+=(-DskipTests=true) + MVN_ARGS+=(-DskipTests=true -Dit-archetype-tests-skip=true) ;; --local-repository) MVN_ARGS+=" -Dmaven.repo.local=$VALUE" diff --git a/org.eclipse.xtend.maven.archetype/pom.xml b/org.eclipse.xtend.maven.archetype/pom.xml index cfca1f4881c..5f6b5c41f9e 100644 --- a/org.eclipse.xtend.maven.archetype/pom.xml +++ b/org.eclipse.xtend.maven.archetype/pom.xml @@ -12,7 +12,8 @@ ${basedir}/.. - true + false + false @@ -53,14 +54,16 @@ maven-archetype-plugin ${it-archetype-tests-skip} - true + ${it-archetype-tests-debug} integration-test - true + + ${it-archetype-tests-debug} + @@ -84,7 +87,7 @@ - true + true diff --git a/org.eclipse.xtend.maven.archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/org.eclipse.xtend.maven.archetype/src/main/resources/META-INF/maven/archetype-metadata.xml index c5a92b2250c..ffa54f457b6 100644 --- a/org.eclipse.xtend.maven.archetype/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/org.eclipse.xtend.maven.archetype/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -9,7 +9,7 @@ UTF-8 - 1.8 + 17 diff --git a/org.eclipse.xtend.maven.archetype/src/test/resources/projects/first/archetype.properties b/org.eclipse.xtend.maven.archetype/src/test/resources/projects/first/archetype.properties index be7e417f87a..06f281f182b 100644 --- a/org.eclipse.xtend.maven.archetype/src/test/resources/projects/first/archetype.properties +++ b/org.eclipse.xtend.maven.archetype/src/test/resources/projects/first/archetype.properties @@ -2,5 +2,6 @@ sourceEncoding=UTF-8 groupId=integrationtest.group artifactId=integrationtest.artifactId version=1.0.0-SNAPSHOT +javaVersion=17 package=org.eclipse.xtend.xtend.archetype.integrationtest packageInPathFormat=org/eclipse/xtend/xtend-archetype/integrationtest From 0cf3b4e06f4feb61bcfb64b05f51f7cb7b7f9192 Mon Sep 17 00:00:00 2001 From: Lorenzo Bettini Date: Wed, 4 Dec 2024 14:53:51 +0100 Subject: [PATCH 2/3] use the invoker plugin to install dependencies before archetype ITs --- org.eclipse.xtend.maven.archetype/pom.xml | 32 +++++++++++++++++++++-- org.eclipse.xtend.maven.parent/pom.xml | 4 +++ org.eclipse.xtend.maven.plugin/pom.xml | 1 - 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/org.eclipse.xtend.maven.archetype/pom.xml b/org.eclipse.xtend.maven.archetype/pom.xml index 5f6b5c41f9e..14c01ed9458 100644 --- a/org.eclipse.xtend.maven.archetype/pom.xml +++ b/org.eclipse.xtend.maven.archetype/pom.xml @@ -14,6 +14,8 @@ ${basedir}/.. false false + + ${project.basedir}/target/.m2test @@ -50,11 +52,37 @@ + + + org.apache.maven.plugins + maven-invoker-plugin + + + + org.eclipse.xtext:xtext-dev-bom:${project.version}:pom + + ${localMavenRepositoryPath} + + + + install dependencies in local test repo + pre-integration-test + + install + + + test + + + + maven-archetype-plugin - ${it-archetype-tests-skip} ${it-archetype-tests-debug} + ${localMavenRepositoryPath} @@ -62,7 +90,7 @@ integration-test - ${it-archetype-tests-debug} + ${it-archetype-tests-skip} diff --git a/org.eclipse.xtend.maven.parent/pom.xml b/org.eclipse.xtend.maven.parent/pom.xml index b6002a28098..cdea2edec20 100644 --- a/org.eclipse.xtend.maven.parent/pom.xml +++ b/org.eclipse.xtend.maven.parent/pom.xml @@ -110,6 +110,10 @@ maven-source-plugin 3.2.1 + + maven-invoker-plugin + 3.5.0 + diff --git a/org.eclipse.xtend.maven.plugin/pom.xml b/org.eclipse.xtend.maven.plugin/pom.xml index f006b463a9e..c8798f6eda1 100644 --- a/org.eclipse.xtend.maven.plugin/pom.xml +++ b/org.eclipse.xtend.maven.plugin/pom.xml @@ -174,7 +174,6 @@ org.apache.maven.plugins maven-invoker-plugin - 3.5.0