RFR: 8086: Some refactoring for jmc/core [v8]
Alex Macdonald
aptmac at openjdk.org
Thu Jun 15 19:41:01 UTC 2023
On Thu, 15 Jun 2023 06:18:06 GMT, Christoph Langer <clanger at openjdk.org> wrote:
>> I worked on some improvements/refactoring for jmc/core. In detail:
>>
>> Better handling of Spotless and Checkstyle:
>> - Fix calling spotless/checkstyle directly in submodules by refering to a `$jmc.config.path` variable
>> - Integrate spotless into the regular build workflow
>>
>> Cleanup of core/pom.xml:
>> - URL cleanups
>> - Plugin version bumps
>>
>> Lighter test projects:
>> - They don't need to be p2 plugin projects since they only test basic functionality but not in the context of Eclipse/OSGI modules
>> - Disable some maven plugin executions that are not needed there
>
> Christoph Langer has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>
> JMC-8086
core/pom.xml line 423:
> 421: <plugin>
> 422: <groupId>org.apache.maven.plugins</groupId>
> 423: <artifactId>maven-install-plugin</artifactId>
I can reproduce this now; something (I believe the maven-install-plugin) is causing the test jars to not end up where they're expected. I ran a super clean build (by additionally nuking my ~/.m2 to start from scratch), and ran into application build errors because application couldn't find the test jars.
[ERROR] Failed to execute goal on project org.openjdk.jmc.ui.common: Could not resolve dependencies for project org.openjdk.jmc:org.openjdk.jmc.ui.common:eclipse-plugin:9.0.0-SNAPSHOT: The following artifacts could not be resolved: org.openjdk.jmc:common.test:jar:9.0.0-SNAPSHOT, org.openjdk.jmc:flightrecorder.test:jar:9.0.0-SNAPSHOT: Could not find artifact org.openjdk.jmc:common.test:jar:9.0.0-SNAPSHOT -> [Help 1]
I played around with this PR a bit today, and ended up at a point where if I remove the `maven-install-plugin` usage that has been added to core, my jars will end up in my m2 repo.
IIRC the CI on GitHub caches the maven repo, so if just testing this PR there's no overwriting of the test jars so they'll continue to be there for the application build.
With maven-install-plugin:

Without:

-------------
PR Review Comment: https://git.openjdk.org/jmc/pull/495#discussion_r1231454593
More information about the jmc-dev
mailing list