1

Why am I getting the error above when I add the dependency below to my project:

<dependency>
    <groupId>org.eclipse.egit</groupId>
    <artifactId>org.eclipse.egit.gitflow</artifactId>
    <version>5.8.1.202007141445-r</version>
</dependency>

> [ERROR] Failed to execute goal on project myproject: Could not resolve
> dependencies for project
> com.example:myproject:maven-plugin:0.0.1-SNAPSHOT: Failure to find
> org.eclipse.egit:org.eclipse.egit.gitflow:jar:51.202007141445-r 
>[ERROR]
>[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
>[ERROR] Re-run Maven using the -X switch to enable full debug logging.
>[ERROR]
>[ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
>[ERROR] [Help 1]
>http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

The dependency does exist: https://mvnrepository.com/artifact/org.eclipse.egit/org.eclipse.egit.gitflow/5.8.1.202007141445-r

auser
  • 6,307
  • 13
  • 41
  • 63
  • Try running the command with `-X` flag to enable debug logs and check the root cause in those logs. – Smile Aug 14 '20 at 17:42
  • @Smile Thanks will try that – auser Aug 14 '20 at 17:53
  • Could someone please explain how the linked question is the same as this question? – auser Aug 14 '20 at 17:53
  • Ok, so I've dug a little deeper - looks like that dependency has it's packing set as eclipse-plugin. I assume this is the problem. – auser Aug 14 '20 at 18:25
  • @auser Consider adding a answer – TheMaster Aug 14 '20 at 18:28
  • I don't know what the solution is :). I didn't think it was possible to publish artifacts to maven with custom . The jar in maven looks pretty standard, so if I can get maven to pull it down everything else should work. – auser Aug 14 '20 at 18:28

1 Answers1

1

The dependency doesn't exist in the default Maven Central, it's part of the Eclipse Public Repository. Specifically it is here:

https://repo.eclipse.org/content/groups/releases/org/eclipse/egit/org.eclipse.egit.gitflow/5.8.1.202007141445-r/

Try adding:

    <repositories>
        <repository>
            <id>epl</id>
            <url>https://repo.eclipse.org/content/groups/releases</url>
        </repository>
    </repositories>
drekbour
  • 2,895
  • 18
  • 28