RFR: 8086: Some refactoring for jmc/core [v8]
Alex Macdonald
aptmac at openjdk.org
Fri Jun 16 15:55:09 UTC 2023
On Thu, 15 Jun 2023 19:33:18 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:
>> 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:
> 
Although, the removal of those test jars is one of the features of this PR.
Does this need additional changes to application poms? For example, the application/pom.xml (as well as uitests and test.jemmy) lists a dependency on `common.test` [[0]](https://github.com/openjdk/jmc/blob/master/application/pom.xml#L147) and `flightrecorder.test`, which is causing the error. Simply removing those two dependencies and the build gets quite a bit farther, but eventually fails trying to resolve testlib.
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:3.0.4:validate-classpath (default-validate-classpath) on project org.openjdk.jmc.rjmx.test: Execution default-validate-classpath of goal org.eclipse.tycho:tycho-compiler-plugin:3.0.4:validate-classpath failed: org.osgi.framework.BundleException: Bundle org.openjdk.jmc.rjmx.test cannot be resolved:org.openjdk.jmc.rjmx.test [128]
[ERROR] Unresolved requirement: Require-Bundle: org.openjdk.jmc.testlib
[0] https://github.com/openjdk/jmc/blob/master/application/pom.xml#L147
-------------
PR Review Comment: https://git.openjdk.org/jmc/pull/495#discussion_r1232426761
More information about the jmc-dev
mailing list