To make sure that sources and classes generated and compiled during the AOT phase are available to program executions in STS and Eclipse in general, it would be nice if the process-aot goal was added to the lifecycle-mapping-metadata.xml for m2e.

<pluginExecution>
    <pluginExecutionFilter>
        <goals>
            <goal>process-aot</goal>
        </goals>
    </pluginExecutionFilter>
    <action>
        <execute>
            <runOnIncremental>false</runOnIncremental>
            <runOnConfiguration>true</runOnConfiguration>
        </execute>
    </action>
</pluginExecution>

I think we'd want to avoid running the goal for incremental compilation as it might take a few ms to run.

Comment From: odrotbohm

I've tried to add this snippet to my IDE locally, and it indeed causes the phase to be triggered when the project is updated. That said, this doesn't seem to cause the additional folders to be registered as source folders. I wonder if STS could notify m2e about the additional source folders? /cc @martinlippert

Comment From: martinlippert

Adding @BoykoAlex for awareness here

Comment From: martinlippert

@odrotbohm We should probably move this issue over to the Spring Tools project: https://github.com/spring-projects/sts4/issues - WDYT?

Comment From: odrotbohm

I don't think a move is the right option here because Boot would need to add the necessary metadata to their JAR files. So there is something to change here, assuming the suggestion is accepted. The additional registration of the source folders might be indeed something we should file a ticket for in the STS tracker.

Comment From: wilkinsona

Sorry, @odrotbohm. Looks like this one fell through a crack. I think your suggestion makes sense, particularly as we already have a lifecycle mapping for the build-info goal.