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
2 changes: 1 addition & 1 deletion .github/workflows/commit-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Check javadocs.
run : |
./mvnw -DskipTests install -pl modules/tools,modules/codegen2 -B -V && ./mvnw initialize -Pjavadoc -B -V
./mvnw -DskipTests install -pl modules/tools,modules/codegen -B -V && ./mvnw initialize -Pjavadoc -B -V
check-dotnet:
name: Сheck .NET code
Expand Down
1 change: 0 additions & 1 deletion assembly/dependencies-apache-ignite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
<exclude>${project.groupId}:ignite-examples</exclude>
<exclude>${project.groupId}:ignite-indexing</exclude>
<exclude>${project.groupId}:ignite-codegen</exclude>
<exclude>${project.groupId}:ignite-codegen2</exclude>
<exclude>${project.groupId}:ignite-schedule</exclude>
<exclude>${project.groupId}:ignite-appserver-test</exclude>
<exclude>${project.groupId}:ignite-websphere-test</exclude>
Expand Down
2 changes: 1 addition & 1 deletion modules/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-codegen2</artifactId>
<artifactId>ignite-codegen</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion modules/calcite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-codegen2</artifactId>
<artifactId>ignite-codegen</artifactId>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,7 @@ public void testGetAllColumns() throws Exception {
"SYS.NODES.NODE_ORDER.null",
"SYS.NODES.ADDRESSES.null",
"SYS.NODES.HOSTNAMES.null",
"SYS.NODES.DATA_CENTER_ID.null",
"SYS.NODE_ATTRIBUTES.NODE_ID.null",
"SYS.NODE_ATTRIBUTES.NAME.null",
"SYS.NODE_ATTRIBUTES.VALUE.null",
Expand Down
19 changes: 8 additions & 11 deletions modules/codegen2/README.md → modules/codegen/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Message Processor Module
# Code generation module

This Maven module provides an annotation processor that automatically generates efficient serializer classes for all types implementing the `Message` interface. It is designed to run during the Java compilation phase and integrates seamlessly into build process.
This Maven module provides annotation processors that automatically generate code, such as serializers, walkers, etc. It is designed to run during the Java compilation phase and integrates seamlessly into the build process.

## Purpose
## Message Processor

This annotation processor automatically generates efficient serializer classes for all types implementing the `Message` interface.

### Purpose

The `MessageProcessor` performs the following tasks:

Expand All @@ -13,7 +17,7 @@ The `MessageProcessor` performs the following tasks:
- A setter named after the field, accepting a single argument (e.g., `fieldName(Type val)`)
- **Access Modifiers**: Getters and setters for all fields annotated with `@Order` must be declared as `public`

## Usage
### Usage

1. **Prepare your Message class**

Expand All @@ -38,10 +42,3 @@ At compile time, a class `MyMessageSerializer` implemented `MessageSerializer` w
3. **Validation**

If the `@Order` values are not sequential starting from 0, or if getter/setter method names do not match the field name, compilation will fail with a meaningful error message pointing to the problematic element.

## **Maven codegen modules**

To avoid a circular dependency between `ignite-core` (which contains message classes) and `ignite-codegen` (which needs to know about them), the annotation processor is **temporarily placed in a separate module**. This separation allows the processor to remain independent of core classes during compilation.

In the future, this structure may be consolidated when build system constraints are resolved.

30 changes: 19 additions & 11 deletions modules/codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,7 @@
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-core</artifactId>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ignite-indexing</artifactId>
</dependency>

<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-calcite</artifactId>
<artifactId>ignite-commons</artifactId>
</dependency>
</dependencies>

Expand All @@ -61,6 +51,24 @@
<skip>true</skip>
</configuration>
</plugin>

<!--
Disables annotation processing (MessageProcessor) during compilation of the module itself.
If annotation processing is not explicitly disabled (-proc:none), the compiler may try to execute
the processor during its own compilation, which lead to a compilation error.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading
Loading