This is an automated email from the ASF dual-hosted git repository.
shishkovilja pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new f88fdddf9f9 IGNITE-28800 Add documentation code snippets compilation
check (#13257)
f88fdddf9f9 is described below
commit f88fdddf9f9904c5f3792c84c53c5abf578c38b1
Author: Aleksandr Chesnokov <[email protected]>
AuthorDate: Wed Jul 15 17:37:11 2026 +0300
IGNITE-28800 Add documentation code snippets compilation check (#13257)
---
.github/workflows/commit-check.yml | 4 +++
docs/_docs/code-snippets/java/pom.xml | 56 ++++++-----------------------------
pom.xml | 15 +++++-----
3 files changed, 20 insertions(+), 55 deletions(-)
diff --git a/.github/workflows/commit-check.yml
b/.github/workflows/commit-check.yml
index 3dc4cbbae05..88e1356b09a 100644
--- a/.github/workflows/commit-check.yml
+++ b/.github/workflows/commit-check.yml
@@ -129,6 +129,10 @@ jobs:
run : |
./mvnw -DskipTests install -pl modules/tools,modules/codegen -B -V
&& ./mvnw initialize -Pjavadoc -B -V
+ - name: Documentation code snippets compilation check
+ run: |
+ ./mvnw compile -Pdocs -pl :code-snippets -am -B -V
+
check-dotnet:
name: Сheck .NET code
runs-on: ubuntu-latest
diff --git a/docs/_docs/code-snippets/java/pom.xml
b/docs/_docs/code-snippets/java/pom.xml
index 3ddb1e62610..a67910da040 100644
--- a/docs/_docs/code-snippets/java/pom.xml
+++ b/docs/_docs/code-snippets/java/pom.xml
@@ -19,24 +19,26 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.ignite</groupId>
+
+ <parent>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-parent-internal</artifactId>
+ <version>${revision}</version>
+ <relativePath>../../../../parent-internal/pom.xml</relativePath>
+ </parent>
+
<artifactId>code-snippets</artifactId>
- <version>1.0.0-SNAPSHOT</version>
<properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <ignite.version>2.19.0-SNAPSHOT</ignite.version>
<ignite.extensions.version>1.0.0</ignite.extensions.version>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-core</artifactId>
- <version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-log4j2</artifactId>
- <version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -46,27 +48,22 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-slf4j</artifactId>
- <version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-indexing</artifactId>
- <version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-spring</artifactId>
- <version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-urideploy</artifactId>
- <version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-zookeeper</artifactId>
- <version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -92,7 +89,6 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-kubernetes</artifactId>
- <version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -103,7 +99,6 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-opencensus</artifactId>
- <version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>io.opencensus</groupId>
@@ -114,49 +109,16 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-compress</artifactId>
- <version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
- <version>8.0.13</version>
+ <version>${mysql.connector.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.6.2</version>
</dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
- <version>5.6.2</version>
- </dependency>
</dependencies>
- <build>
- <testSourceDirectory>src/main/java</testSourceDirectory>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.14.1</version>
- <configuration>
- <source>17</source>
- <target>17</target>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>3.5.4</version>
- <configuration>
- <includes>
- <include>**/*.java</include>
- </includes>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-failsafe-plugin</artifactId>
- <version>3.5.4</version>
- </plugin>
- </plugins>
- </build>
</project>
diff --git a/pom.xml b/pom.xml
index d666654f037..843bf433944 100644
--- a/pom.xml
+++ b/pom.xml
@@ -489,6 +489,13 @@
</modules>
</profile>
+ <profile>
+ <id>docs</id>
+ <modules>
+ <module>docs/_docs/code-snippets/java</module>
+ </modules>
+ </profile>
+
<profile>
<id>update-versions</id>
<!-- updates versions -->
@@ -508,14 +515,6 @@
<target>
<echo message="Update ignite.version
in docs" />
- <replaceregexp byline="true"
encoding="UTF-8">
- <regexp
pattern="(<ignite\.version>).+(</ignite\.version>)" />
- <substitution
expression="\1${project.version}\2" />
- <fileset
dir="${project.basedir}/docs/">
- <include
name="_docs/code-snippets/java/pom.xml" />
- </fileset>
- </replaceregexp>
-
<replaceregexp byline="true"
encoding="UTF-8">
<regexp pattern="(version: ).+" />
<substitution
expression="\1${project.version}" />