1

I have a complex project setup. in one of my sub-modules i am referencing below plugin without the version.

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
        </plugin>       
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
        </plugin>
    </plugins>
</build>  

Maven then decides that it will try resolve this dependency with version org.apache.maven.plugins:maven-jar-plugin:jar:3.0.2

I get the failure that it cannot find it on my Nexus Server?

It resolved alot of my other dependencies but it cannot pull this specific one from central maven (https://repo1.maven.org/maven2/)?

can anyone please tell me what could be the issue?


 Plugin org.apache.maven.plugins:maven-jar-plugin:3.0.2 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-jar-plugin:jar:3.0.2 in http://{nexus-server}:8082/repository/maven-public/

Nexus Server OSS 3.3.0-01

Wolver1ne
  • 125
  • 1
  • 11
  • 1
    Can I ask why are you hosting `maven-jar-plugin` in your own nexus, when it is publicly available? – Andrei May 19 '17 at 12:54
  • I am not hosting it as per my description (It resolved alot of my other dependencies but it cannot pull this specific one from central maven (https://repo1.maven.org/maven2/)). This is a proxy repository to maven central where the plugin is available. it is not pulling through to my **proxy** repository. – Wolver1ne May 22 '17 at 04:21
  • You could enable access logs on your proxy and see what is maven trying to access (what url on central) – Andrei May 22 '17 at 05:50
  • @Andrei, how do i enable that? – Wolver1ne May 22 '17 at 06:20
  • It is setup dependent. I see that Nexus seems to have some sort of UI that could allow this. Other than this, perhaps a conf logback file is in there? – Andrei May 22 '17 at 06:36
  • What are you referring to. you know that i am saying that i create a Proxy Repo that is in Nexus aswell that this is just a remote repository. – Wolver1ne May 22 '17 at 06:48

1 Answers1

1

I have found the problem. It was something wrong with the caching. There is a setting in the repository that was needed to be disabled.

Negative Cache Not found cache enabled: Cache responses for content not present in the proxied repository

Wolver1ne
  • 125
  • 1
  • 11