Skip to content

Commit

Permalink
use the invoker plugin to install dependencies before archetype ITs
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoBettini committed Dec 4, 2024
1 parent 1b2f12f commit 0cf3b4e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
32 changes: 30 additions & 2 deletions org.eclipse.xtend.maven.archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<root-dir>${basedir}/..</root-dir>
<it-archetype-tests-skip>false</it-archetype-tests-skip>
<it-archetype-tests-debug>false</it-archetype-tests-debug>
<!-- The local Maven repository for our IT tests -->
<localMavenRepositoryPath>${project.basedir}/target/.m2test</localMavenRepositoryPath>
</properties>

<build>
Expand Down Expand Up @@ -50,19 +52,45 @@
</plugins>
</pluginManagement>
<plugins>
<!-- install test dependencies, including the xtend-maven-plugin in the local .m2 repository
that will be used by the integration test to build the test project generated with the archetype -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<extraArtifacts>
<!-- our BOM is not a dependency (it's just imported), thus, we must
install it explicitly in the local maven repository -->
<extraArtifact>org.eclipse.xtext:xtext-dev-bom:${project.version}:pom</extraArtifact>
</extraArtifacts>
<localRepositoryPath>${localMavenRepositoryPath}</localRepositoryPath>
</configuration>
<executions>
<execution>
<id>install dependencies in local test repo</id>
<phase>pre-integration-test</phase>
<goals>
<goal>install</goal>
</goals>
<configuration>
<scope>test</scope>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<configuration>
<skip>${it-archetype-tests-skip}</skip>
<debug>${it-archetype-tests-debug}</debug>
<localRepositoryPath>${localMavenRepositoryPath}</localRepositoryPath>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<debug>${it-archetype-tests-debug}</debug>
<skip>${it-archetype-tests-skip}</skip>
</configuration>
</execution>
</executions>
Expand Down
4 changes: 4 additions & 0 deletions org.eclipse.xtend.maven.parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
</plugin>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>3.5.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
1 change: 0 additions & 1 deletion org.eclipse.xtend.maven.plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<extraArtifacts>
<!-- our BOM is not a dependency (it's just imported), thus, we must
Expand Down

0 comments on commit 0cf3b4e

Please sign in to comment.