exasol / error-code-crawler-maven-plugin

Validator and crawler for exasol-error-codes in Java code
MIT License
1 stars 1 forks source link

Aggregate error reports in multi-module projects #98

Closed kaklakariada closed 7 months ago

kaklakariada commented 7 months ago

Situation

Error code crawler writes it's report to target/error_code_report.json for each Java project. For projects with only one Maven module this works fine. But for projects with multiple Maven modules this generates one report files for each Maven model. Example: https://github.com/exasol/project-keeper

This causes problems because https://github.com/exasol/error-catalog only loads a single artifact error_code_report.json from each release (see source code), so only the error codes from the root module are added to the error catalog.

Proposed implementation

The plugin automatically detects if there are multiple modules and aggregates all reports into a single target/error_code_report.json in the root directory of the project. To avoid confusion, the plugin does not create individual reports for each Maven module, only one single aggregated one.

kaklakariada commented 7 months ago

Already implemented: use the following in your root pom:

            <plugin>
                <groupId>com.exasol</groupId>
                <artifactId>error-code-crawler-maven-plugin</artifactId>
                <version>1.3.1</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>