0

I am getting an exception when I try to download dependencies from maven repository in nexus when I run this command:

mvn clean deploy

here is the error:

[ERROR] Failed to execute goal on project lg-logger: Could not resolve dependencies for project com.toto.lg:lg-logger:jar:0.0.1-SNAPSHOT: Could not find artifact com.toto:logger:jar:0.0.1-SNAPSHOT -> [Help 1]

pom.xml file:

   </dependencies>
    <dependency>
      <groupId>com.toto</groupId>
      <artifactId>logger</artifactId>
      <version>0.0.1-SNAPSHOT</version>
    </dependency>
  </dependencies>
  <distributionManagement>
    <repository>
      <id>central</id>
      <name>Internal Releases</name>
      <url>https://nexus.lg.dev/repository/maven-snapshot</url>
      <snapshots><enabled>true</enabled></snapshots>
      <uniqueVersion>true</uniqueVersion>
    </repository>
    <snapshotRepository>
      <id>central</id>
      <name>Internal Snapshots</name>
      <url>https://nexus.lg.dev/repository/maven-snapshot</url>
    </snapshotRepository>
  </distributionManagement>

From nexus maven repository, we can see:

  • toto
    • logger
      • 0.0.1-SNAPSHOT
        • 0.0.1-20220210.160623-1
          • logger-0.0.1-20220210.160623-1.jar
Maurice Amar
  • 129
  • 1
  • 9
  • If you see tot.logger... but in your pom you have given groupId: `com.toto`...apart from that you should define the nexus in your settings.xml file instead in your pom file.... – khmarbaise Feb 10 '22 at 18:38

0 Answers0