Any hints from anyone?
Thanks
--
Regards,
Adrian Shum
________________________________
From: Adrian Shum (HK/IT-AD)
Sent: Thursday, October 06, 2011 4:23 PM
To: 'Maven Users List'
Subject: Incorrect location for downloading plugin pom
Dear all,
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:
(The story may be a bit long)
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 PUBLIC) which groups all public repositories, including maven central,
codehaus etc.
There is another repository group (let's call it EXT) which we put 3rd party
artifacts.
In our project, we used org.codehaus.mojo:native2ascii-maven-plugin.
Due to a bug at that time, instead of using the publicly available
org.codehaus.mojo:native2ascii-maven-plugin:1.0-alpha-1, I have fixed the bug
and deploy it to our EXT repository, and called it
org.codehaus.mojo:native2ascii-maven-plugin:1.0-alpha-1.1 (i.e. used a new
version number 1.0-alpha-1.1 instead of 1.0-alpha-1)
This have been running fine for several years.
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 native2ascii-maven-plugin:1.0-alpha-1.1
cannot be downloaded from *PUBLIC*, therefore it will use a default emtpy POM,
which cause the build problem.
By inspecting the local repository, I found that only the JAR of
native2ascii-maven-plugin:1.0-alpha-1.1 was downloaded. I am sure that there
is no native2ascii-maven-plugin:1.0-alpha-1.1 in PUBLIC repository, and the SHA
of the JAR matches with native2ascii-maven-plugin:1.0-alpha-1.1 in EXT. It
seems that, Maven is capable to download the JAR correctly from EXT repo, but
when it tries to download the POM afterwards, Maven mistakenly think that it
should be downloaded from PUBLIC. Because PUBLIC do not contains
1.0-alpha-1.1, Maven assume there is no POM.
I have EXT repo defined before PUBLIC in my settings.xml. What even more
strange is, I tried to block accessing in Nexus for native2ascii-maven-plugin
from PUBLIC. Maven, instead of getting the POM from repository EXT, it get
from Maven Central directly. At last I add PUBLIC as mirror for central, and
Maven can build correctly, because EXT is the the only repo that contains
native2ascii-maven-plugin.
I simply cannot understand why this will happen. 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?
I really wish someone can guide me some directions on this.
Hundred thanks
--
Regards,
Adrian Shum
This email is confidential. If you are not the intended recipient, please
delete it from your system and notify the sender immediately. Any unauthorized
use, disclosure, dissemination or copying of this email is prohibited. Haitong
International Securities Group, its group companies and their content providers
("Parties") shall not be responsible for the accuracy or completeness of this
email or its attachment, if any, which could contain virus, be corrupted,
destroyed, incomplete, intercepted, lost or arrive late. The Parties do not
accept liability for any damage caused by this e-mail.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]