Leiningen behind a local nexus repository


Today I tried to use leiningen on a development machine where I had set up a network-local nexus repository for my maven distribution management. And it took me some minutes to get leiningen to work, because it always failed with a message like this:

----------
1 required artifact is missing.

for artifact:
  org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
  clojure (http://mylocalrepository/nexus/content/groups/public),
  clojars (http://mylocalrepository/nexus/content/groups/public),
  clojure-snapshots (http://mylocalrepository/nexus/content/groups/public),
  central (http://mylocalrepository/nexus/content/groups/public)


        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:324)
        at org.apache.maven.artifact.ant.DependenciesTask.doExecute(Dependencies
Task.java:170)
        ... 34 more

I noticed that there was the URL to http://mylocalrepository in the error messages and that I probably hadn't all the clojure stuff configured there. In fact, I didn't think about that at all. I don't want the clojure dependencies to live in that repository, so I have to exclude it from my maven mirror settings in USERDIR/.m2/settings.xml:

<mirrors>
  <mirror>
    <id>nexus</id>
    <!-- use this mirror for everything excluding clojars and clojure: -->
    <mirrorOf>*,!clojars,!clojure</mirrorOf>
    <!-- use this mirror for all external repositories:
    <mirrorOf>*</mirrorOf>
    -->
    <url>http://mylocalrepository/nexus/content/groups/public</url>
  </mirror>
</mirrors>

After that leiningen downloaded all the dependencies and was generally more helpful. ;-)

Weitere Artikel

Unterschiedliche Sichtweisen

Vorbestellt: Sony Xperia XZ Premium

Giants Run 2017

Gelesen: SciFi Serie 'The Expanse'

Neue Tastatur: Pok3r Vortex RGB

New minecraft survival mod for 1.11.2

Änderungen beim Flug mit Quadkoptern

Ein paar Fotos

Nach den Crossfit Open

Crossfit Open WOD 17.5