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

Version 4.0.0 broke jar import #238

Open
jgordijn opened this issue Jan 24, 2025 · 2 comments
Open

Version 4.0.0 broke jar import #238

jgordijn opened this issue Jan 24, 2025 · 2 comments

Comments

@jgordijn
Copy link

jgordijn commented Jan 24, 2025

When I upgrade the plugin from 3.5.0 to 4.0.0 the jar dependencies with AVSC files are no longer unpacked and compiled. During compilation I see this message:

[warn] there's a key that's not used by any other settings/tasks:
[warn]  
[warn] * project / avroDependencyIncludeFilter

I have the enablePlugins(SbtAvro).

I have this in my sbt project:

    // I don't know how to publish an artifact from Maven with the `type` set to Artifact.SourceType (source), so only check the AvroClassifier
    avroDependencyIncludeFilter := artifactFilter(classifier = AvroClassifier),

This happens for avroUnpackDependencies The actual jar is published from another project that uses maven.

@jgordijn
Copy link
Author

Seems that I have to change the filter into:

    Compile / avroDependencyIncludeFilter := artifactFilter(classifier = AvroClassifier),

After which it works. I'm not sure what caused the change.

@RustedBones
Copy link
Collaborator

RustedBones commented Jan 26, 2025

The new plugin release introduced new configuration scopes:

  • avro-compiler: for the compiler dependencies
  • avro: for the avro schemas to generate sources for the Compile scope
  • avro-test: for the avro schemas to generate sources for the Test scope

You probably missed that during the upgrade. You'll need to scope the dependency with avro now:

libraryDependencies += Seq(
-  "org" % "library" % "version" classifier "avro"
+  "org" % "library" % "version" % "avro" classifier "avro" intransitive()
)

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

No branches or pull requests

2 participants