Skip to content

Conversation

@SentryMan
Copy link
Collaborator

So I was mildly inconvenienced when I was using this. It looks like when I try to use the AP with maven provided scope only in a project that doesn't use jackson at all. I get issues.

		<dependency>
			<groupId>io.avaje</groupId>
			<artifactId>avaje-inject-generator</artifactId>
			<version>${avaje.inject.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>io.avaje</groupId>
			<artifactId>avaje-jsonb-generator</artifactId>
			<version>${avaje.jsonb.version}</version>
		</dependency>
		<dependency>
			<groupId>io.avaje</groupId>
			<artifactId>avaje-http-javalin-generator</artifactId>
			<version>${avaje.http.version}</version>
			<scope>provided</scope>
		</dependency>

I get this error.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project 
avaje-javalin: Fatal error compiling: java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper: com.fasterxml.jackson.databind.ObjectMapper -> [Help 1]

It seems the jackson dependency isn't transitively pulled while the processor runs. If I add jackson or use the AP through the maven compiler plugin it works fine.

To solve this, I thought about just removing jackson.

@rbygrave
Copy link
Contributor

rbygrave commented Jan 8, 2023

Ok, interesting ...

@rbygrave rbygrave merged commit 263e0dc into avaje:master Jan 8, 2023
@rbygrave rbygrave added this to the 1.21 milestone Jan 8, 2023
@SentryMan SentryMan deleted the remove-jackson branch January 8, 2023 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants