You are currently viewing [SOLVED] Maven Could not find artifact io.confluent:kafka-avro-serializer:jar:3.3.1 in central (https://repo.maven.apache.org/maven2) – trvial reason and easy solution in 1 min!
Photo by Árpád Czapp on Unsplash
Could You Please Share This Post? I Appreciate It And Thank YOU! :) Have A Nice Day!
4.9
(2114)

Cause of Maven Could Not Find Artifact

This is typical error [ Maven could not find artifact ] when you first time use dependencies which are not coming from the most popular maven repository. In this case I wanted to use package which is coming from Confluent Maven repository.

Solution

You need to add missing repository. You can do it in two ways. You need to choose which one is better for you. In first option the repository will be only visible in this particular project. If you will go with second option the new repository will be visible for all your projects – it means that if you will create in the future the another project which requires packages from this repository, it will be able to pull dependencies.

  • adding directly to your project pom.xml file.
  • adding to settings.xml file

Option #1

Please include this snip of xml code in your pom.xml file:

<repositories>
	<repository>
		<id>confluent</id>
		<url>http://packages.confluent.io/maven/</url>
		<releases>
			<enabled>true</enabled>
		</releases>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
	</repository>
</repositories>

Option #2

Put above xml code in existing profile in setting.xml or create the new one, but:

Remember: if you will create new profile you must remember to add this profile in section <activeProfiles>

Could You Please Share This Post? 
I appreciate It And Thank YOU! :)
Have A Nice Day!

BigData-ETL: image 7YOU MIGHT ALSO LIKE

How useful was this post?

Click on a star to rate it!

Average rating 4.9 / 5. Vote count: 2114

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?