sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

[aot repositories] smoothen support for repository aot sources/metadata

Open martinlippert opened this issue 7 months ago • 3 comments

The idea is to make it a lot easier to produce the AOT generated sources/metadata for Spring Data repositories (if applicable) from inside of the IDE.

This incudes:

  • produce the AOT bits via a command or (even better) incrementally while working with the project inside of the IDE
  • integrate the generated sources as source folders to allow setting breakpoints, etc.

martinlippert avatar May 19 '25 08:05 martinlippert

The command piece is being implemented in #1713

BoykoAlex avatar Nov 13 '25 07:11 BoykoAlex

The Gradle project turns out to work as expected: executing processAot task results in new source folders added in the IDE. (the project needs org.graalvm.buildtools.native in addition to org.springframework.boot plugin applied for Gradle). The maven project doesn't add the source folders in the IDE although it is sort of the same folders... Needs to be insvestigated. #1722 - addresses this for Gradle projects.

BoykoAlex avatar Nov 25 '25 19:11 BoykoAlex

I looked at this again and for Maven we need some kind of m2e support to automatically make aot generated artifacts Eclipse java project source folders. Alternatively we'd need a workaround like:

 <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>add-source</goal>
            </goals>
            <configuration>
                <sources>
                    <source>${project.build.directory}/generated-sources/java/</source>
                </sources>
            </configuration>
        </execution>
    </executions>
 </plugin>

It's best to start looking at this rather earlier than later in conjunction with #1722. Gradle projects are actually adding proper source folders in Eclipse.

Moving to 5.1. Cannot be completed for 5.0

BoykoAlex avatar Dec 04 '25 00:12 BoykoAlex