Is it possible to create 1 Spring component index for a multi-module project?

Viewed 263

We have a multimodule spring project, and we would like to create one component index for the entire project.

When adding the 'spring-context-indexer' to the POM(s) a seperate index is created per module in the project, however what we are looking for is one component index for all modules of the multi-module project together.

Does anyone know if it is possible to generate such an index?

1 Answers

Put this on the main pom, or on each module pom. Each package will have it's own index.

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${mavenCompilerVer}</version>
            <configuration>
                <source>11</source>
                <target>11</target>
                <annotationProcessorPaths>
                    <path>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-context-indexer</artifactId>
                        <version>${springContextIndexerVer}</version>
                    </path>
                    <path>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                        <version>${lombokVer}</version>
                    </path>
                </annotationProcessorPaths>
            </configuration>
        </plugin>
Related