Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven is using incorrect location for downloading plugin pom
    primarykey
    data
    text
    <p>(This question is asked on Maven User mailing list too)</p> <p>I have recently faced a strange problem, that I cannot even able to judge the cause or source of problem. It will be great if someone can give me some direction:</p> <p>(The story may be a bit long)</p> <p>I am using Nexus 1.8.0 as our company's repository manager. I use it as proxy of external repo, and hosting our own repository. There are many repositories in Nexus. I have one repository group (let's call it <strong>PUBLIC</strong>) which groups all public repositories, including maven central, codehaus etc. There is another repository group (let's call it <strong>EXT</strong>) which we put 3rd party artifacts.</p> <p>In our project, we used <code>org.codehaus.mojo:native2ascii-maven-plugin</code>. Due to a bug at that time, instead of using the publicly available <code>org.codehaus.mojo:native2ascii-maven-plugin:1.0-alpha-1</code>, I have fixed the bug and deploy it to our <strong>EXT</strong> repository, and called it <code>org.codehaus.mojo:native2ascii-maven-plugin:1.0-alpha-1.1</code> (i.e. used a new version number <code>1.0-alpha-1.1</code> instead of <code>1.0-alpha-1</code>)</p> <p>This have been running fine for several years.</p> <p>However recently a new developer tries to get the code and build, using Maven 2.2.1. Strange things happened: the build failed. By inspecting result of mvn -X clean install, it states that POM of <code>native2ascii-maven-plugin:1.0-alpha-1.1</code> cannot be downloaded from <strong>PUBLIC</strong>, therefore it will use a default emtpy POM, which cause the build problem. </p> <p>By inspecting the local repository, I found that only the JAR of <code>native2ascii-maven-plugin:1.0-alpha-1.1</code> was downloaded. I am sure that there is no <code>native2ascii-maven-plugin:1.0-alpha-1.1</code> in <strong>PUBLIC</strong> repository, and the SHA of the JAR matches with <code>native2ascii-maven-plugin:1.0-alpha-1.1</code> in <strong>EXT</strong>. It seems that, Maven is capable to download the JAR correctly from <strong>EXT</strong> repo, but when it tries to download the POM afterwards, Maven mistakenly think that it should be downloaded from <strong>PUBLIC</strong>. Because <strong>PUBLIC</strong> do not contains <code>1.0-alpha-1.1</code>, Maven assume there is no POM.</p> <p>I have <strong>EXT</strong> repo defined before <strong>PUBLIC</strong> in my settings.xml. What even more strange is, I tried to block accessing in Nexus for <code>native2ascii-maven-plugin</code> from <strong>PUBLIC</strong>. Maven, instead of getting the POM from repository <strong>EXT</strong>, it get from <strong>central</strong> directly. At last I add <strong>PUBLIC</strong> as mirror for <strong>central</strong>, and Maven can build correctly, because <strong>EXT</strong> is the the only repo that contains <code>native2ascii-maven-plugin</code>. Maven seems tries to download the POM from every repository else which contains <code>native2ascii-maven-plugin</code> in despite of the version number, except from <strong>EXT</strong></p> <p>I simply cannot understand why this will happen. This have been used for years, and it used to be fine even several weeks before (I have other new developers, who can correctly download the plugin, several weeks ago). May anyone guide me the possible cause of the problem? I have neither changed anything in my repo, nor changed version of Maven. Why Maven's "download" behavior suddenly changed?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload