Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test compile fails when upgrading from 2024.4.15860.20240410T113939Z-240300 to latest release #62

Closed
mitcoding opened this issue Jun 19, 2024 · 3 comments · Fixed by #66

Comments

@mitcoding
Copy link

mitcoding commented Jun 19, 2024

For some reason starting with release 2024.5.16357.20240517T163826Z-240400 the test compile phase fails because maven dependency management auto downgrades johnzon-core, jakarta.json, jakarta.json-api, & org.apache.sling:org.apache.sling.contentparser.json (compare the two attached dependency tree files attached).

2024.4.15860.20240410T113939Z-240300 -- Dependency Tree
2024.6.16799.20240614T073455Z-240500 -- Dependency Tree

the fix needed was to manually add to our root pom:

<dependency>
        <groupId>org.apache.johnzon</groupId>
        <artifactId>johnzon-core</artifactId>
        <version>2.0.0</version>
	<scope>test</scope>
</dependency>
<dependency>
	<groupId>jakarta.json</groupId>
	<artifactId>jakarta.json-api</artifactId>
	<version>2.1.1</version>
	<scope>test</scope>
</dependency>
<dependency>
	<groupId>org.glassfish</groupId>
	<artifactId>jakarta.json</artifactId>
	<version>2.0.1</version>
	<scope>test</scope>
</dependency>
@stefanseifert
Copy link
Member

this sounds a bit similar to #60, see also my explanation in that issue for the reasons.

can you post here what are the actual problems you observed (e.g. stack traces) before manually adjusting the dependencies?

@royteeuwen
Copy link

I can say that at my side the issue is also fixed when adding the three libraries mentioned by @mitcoding .

I checked and we are not overriding the johnzon core nor geronimo from cloud-dependencies. The effective pom of our core bundle shows these versions:

<dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.commons.johnzon</artifactId>
        <version>2.0.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.johnzon</groupId>
        <artifactId>johnzon-core</artifactId>
        <version>1.2.21</version>
      </dependency>
      <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-json_1.1_spec</artifactId>
        <version>1.3</version>
      </dependency>

@stefanseifert
Copy link
Member

ok, i will apply a "fix forward" solution by switching back to JSONP 2.1 and Johnzon 2.0 by defaul in PR #66

additionally we prove a "mixin" POM to optionally switch back to JSONP 1.1 for projects that require it:
https://github.com/wcm-io/io.wcm.maven.aem-cloud-dependencies-mixin-jsonp11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants