1

I have a pom.xml with the following dependency:

<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-databind</artifactId>
  <version>2.9.6</version>
  <type>bundle</type>
</dependency>

The dependency exists in Maven's central repo: https://search.maven.org/artifact/com.fasterxml.jackson.core/jackson-databind/2.9.6/bundle

But when (using Eclipse) i right click on my pom.xml file and choose Run As -> Maven install, it downloads a bunch of dependencies related to that artifact, but finishes with the following error:

[ERROR] Failed to execute goal on project jackson-json-demo: Could not resolve dependencies for project com.elad:jackson-json-demo:jar:1.0.0: Could not find artifact com.fasterxml.jackson.core:jackson-databind:bundle:2.9.6 in central (https://repo.maven.apache.org/maven2) -> [Help 1]

I tried a couple of other versions and also deleting the dependency from my local repo and trying again, but it didn't help. What could be the issue?

Gambit2007
  • 3,260
  • 13
  • 46
  • 86
  • Are you behind a proxy? Are there issues with other dependencies too or just this one? – kutschkem Nov 25 '20 at 15:42
  • I'm not behind a proxy, and i will try another dependency and update the post. – Gambit2007 Nov 25 '20 at 15:44
  • @kutschkem - no issues with other dependencies. – Gambit2007 Nov 25 '20 at 15:45
  • @Gambit2007 I saw some post regarding same :https://stackoverflow.com/questions/5389691/what-is-the-meaning-of-type-bundle-in-a-maven-dependency#:~:text=The%20plugin%20treats%20all%20the,to%20bundle%20into%20a%20jar. Remove type and it will work. – Satyendra Sharma Jan 23 '21 at 00:37

1 Answers1

3

I have never heard of an artifact type bundle. Here's a list of some of the valid artifact type strings.

Just remove the <type /> tag from your dependency block and it will default to jar.

Janez Kuhar
  • 3,705
  • 4
  • 22
  • 45
  • That was it, thank you!! I'm surprised that it was included in the dependency snippet on the maven repo.. – Gambit2007 Nov 25 '20 at 16:38
  • 1
    @Gambit2007 That might have been a typo in the docs! :) The following link, for example, also works: https://search.maven.org/artifact/com.fasterxml.jackson.core/jackson-databind/2.9.6/nonsense – Janez Kuhar Nov 25 '20 at 16:43