Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/commit-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ jobs:
run: |
./mvnw test-compile -Pall-java,licenses,lgpl,checkstyle,examples,check-licenses -B -V -T 1C

- name: Documentation code snippets compilation check
run: |
./mvnw -Pdocs -pl :code-snippets -am compile -B -V

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things worth reconsidering here:

  1. Redundant full recompile. -am compile rebuilds the entire upstream dependency chain (ignite-core plus all transitive modules) from scratch, because the profile set here (-Pdocs) differs from the previous test-compile -Pall-java,… step, so none of the just-compiled classes are reused. That is a second full reactor build of those modules.

  2. Placement vs. class reuse. This step is inserted between the codestyle step and the "Run abandoned tests checks" step, and it overwrites the upstream modules' target/classes under a different profile than the abandoned-tests step expects (note the existing comment on that step about reusing classes / avoiding a full reactor recompile).

Suggestion: move this step to the very end of the job (after the javadoc check) so it doesn't perturb the reuse between the surrounding steps, or fold the docs profile + module into the existing test-compile reactor invocation to avoid the second recompile entirely.


- name: Run abandoned tests checks.
# Reuse classes from the previous step; the differing profiles otherwise trigger a full reactor recompile.
run : |
Expand Down
55 changes: 9 additions & 46 deletions docs/_docs/code-snippets/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -103,7 +100,6 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-opencensus</artifactId>
<version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>io.opencensus</groupId>
Expand All @@ -114,49 +110,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>
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,13 @@
</modules>
</profile>

<profile>
<id>docs</id>
<modules>
<module>docs/_docs/code-snippets/java</module>
</modules>
</profile>

<profile>
<id>update-versions</id>
<!-- updates versions -->
Expand Down
Loading