On 12/13/06, Barrie Treloar <[EMAIL PROTECTED]> wrote:
On 12/13/06, Nikunj Mehta <[EMAIL PROTECTED]> wrote:
> surefire-junit. However, I need to share the patch with others in my
> company as well as make the patched artifacts available for use on other
> machines.
>
> Therefore, I decided to create an internal repository to host these
> patched artifacts (call it internal.plugins). I chased down the
> "dragon's tail" and deployed the maven-surefire-plugin as well as
> surefire (and its child) projects on this internal repository. I named
> this version as 2.1-INTERNAL-r486153-pSUREFIRE-31 for surefire, and
> 2.3-INTERNAL-r486153-pSUREFIRE-31 for maven-surefire-plugin. All went
> fine up until this point.
>
> The trouble starts, however, when I try to use with these new artifacts
> by adding internal.plugins to the pluginRepositories of my project.
> Maven resolves maven-surefire-plugin as shown in the following debug
> output to central:
>
> [INFO] artifact org.apache.maven.plugins:maven-surefire-plugin: checking
> for updates from internal.plugins
> [INFO] artifact org.apache.maven.plugins:maven-surefire-plugin: checking
> for updates from apache.snapshots
> [INFO] artifact org.apache.maven.plugins:maven-surefire-plugin: checking
> for updates from central
> [DEBUG] maven-surefire-plugin: resolved to version
> 2.3-INTERNAL-r486153-pSUREFIRE-31 from repository central
> [DEBUG] Trying repository central
> Downloading:
> 
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.3-INTERNAL-r486153-pSUREFIRE-31/maven-surefire-plugin-2.3-INTERNAL-r486153-pSUREFIRE-31.pom
> [DEBUG] Artifact not found - using stub model: Unable to locate resource
> in repository

I wrote that document, but I have never seen your error before.
It is odd that the deployed version is resolving the version correctly
but incorrectly identifying the repository as central.

I have a mvn-proxy in the way (since we don't have direct internet
access) and so it could be that mvn-proxy is finding the plugin for me
even though it is attempting to access centrl.

It is interesting the mvn surefire-report:report resolves to version
2.2 and not the newer version.

I'm running mvn site now to see what is resolved, it should be the new
version since this is defined in the pom hierarchy.

I've got other things on for the next hour or so, so it will be a
little while before I have my investigation done and an answer.


Ok.
The 2.2 is incorrect as this is surefire-plugin not the
surefire-report-plugin, gotta be careful with that.

Just as a caveat, I'm a maven user not a developer.  I wrote those
wiki documents because I found nothing that would allow me to
"release" an internal snapshot version of a plugin while I am waiting
for an official release to arrive.  So they are more than likely not
complete.  I also have not got to the stage of trying the command outs
on another developer's machine to be sure that the instructions are
correct. That's likely another day or so before I get that far.  So
bear all that in mind when you follow the docs.

So to investigate this problem ...

I've run
* mvn help:effective-pom
* mvn -X surefire-report:report
* mvn -X surefire-report:report-only (my local patched version as per
http://jira.codehaus.org/browse/MSUREFIREREP-6)
* mvn -X site

and compared the output.  All of these correctly resolve to my version
of 2.1-INTERNAL-r485987-pMSUREFIREREP-6.

Now I deployed the artifact from this computer so the one on
internal.plugins is the one already in my local m2 repo.

When I do -cpu -U this is the log output
[INFO] artifact org.apache.maven.plugins:maven-surefire-report-plugin:
checking for updates from internal.plugins
[INFO] artifact org.apache.maven.plugins:maven-surefire-report-plugin:
checking for updates from central
[DEBUG] maven-surefire-report-plugin: resolved to version
2.1-INTERNAL-r485987-pMSUREFIREREP-6 from local repository

Now I deleted the plugins from my local m2 repository and the log output is:
[INFO] artifact org.apache.maven.plugins:maven-surefire-report-plugin:
checking for updates from internal.plugins
[INFO] artifact org.apache.maven.plugins:maven-surefire-report-plugin:
checking for updates from central
[DEBUG] maven-surefire-report-plugin: resolved to version
2.1-INTERNAL-r485987-pMSUREFIREREP-6 from repository central
[DEBUG] Trying repository central
Downloading: 
http://PROXY:9999/repository/org/apache/maven/plugins/maven-surefire-report-plugin/2.1-INTERNAL-r485987-pMSUREFIREREP-6/maven-surefire-report-plugin-2.1-INTERNAL-r485987-pMSUREFIREREP-6.pom
1/1K
1K downloaded
[DEBUG]   Artifact resolved


So you can see there is some bug somewhere in repository resolution
because the plugin resolved to central.
[DEBUG] maven-surefire-report-plugin: resolved to version
2.1-INTERNAL-r485987-pMSUREFIREREP-6 from repository central

I dont know why this is the case.

Looking at the meta data on the internal.plugin site I notice that the
released version is 2.0 and not 2.1-INTERNAL... like I expected.  This
may be because I am using deploy instead of release.

internal_plugins/org/apache/maven/plugins/maven-surefire-report-plugin/maven-metadata.xml
<?xml version="1.0" encoding="UTF-8"?><metadata>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-surefire-report-plugin</artifactId>
 <version>2.0</version>
 <versioning>
   <latest>2.1-INTERNAL-r485987-pMSUREFIREREP-6</latest>
   <release>2.0</release>
   <versions>
     <version>2.0</version>
     <version>2.1-INTERNAL-r485987-pMSUREFIREREP-6</version>
   </versions>
   <lastUpdated>20061212031657</lastUpdated>
 </versioning>
</metadata>

I will need to post to the dev list and see if someone can point me to
the maven-metadata.xml format as I can't find any information.

Hacking all 2.0's to 2.1s and deleting my local repo plugin again,
re-running mvn -X site gives the following output:
[INFO] artifact org.apache.maven.plugins:maven-surefire-report-plugin:
checking for updates from internal.plugins
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
'b0c93eb1aafec9aa8a237e88ce963c15717f9a3f'; remote =
'd03398cbe73cb9dde1a34dd56aff23f0480ee688' - RETRYING
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
'b0c93eb1aafec9aa8a237e88ce963c15717f9a3f'; remote =
'd03398cbe73cb9dde1a34dd56aff23f0480ee688' - IGNORING
[INFO] artifact org.apache.maven.plugins:maven-surefire-report-plugin:
checking for updates from central
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
'b0c93eb1aafec9aa8a237e88ce963c15717f9a3f'; remote =
'd03398cbe73cb9dde1a34dd56aff23f0480ee688' - RETRYING
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
'b0c93eb1aafec9aa8a237e88ce963c15717f9a3f'; remote =
'd03398cbe73cb9dde1a34dd56aff23f0480ee688' - IGNORING
[DEBUG] maven-surefire-report-plugin: resolved to version
2.1-INTERNAL-r485987-pMSUREFIREREP-6 from repository central
[DEBUG] Trying repository central
Downloading: 
http://PROXY:9999/repository/org/apache/maven/plugins/maven-surefire-report-plugin/2.1-INTERNAL-r485987-pMSUREFIREREP-6/maven-surefire-report-plugin-2.1-INTERNAL-r485987-pMSUREFIREREP-6.pom
1/1K
1K downloaded

I expected checksum to have failed (since I hacked it) but I didnt
expect central to be checked again.  This may be working for me and
not you because I am using mvnproxy and it incorrectly aggregates
everything it proxies, hence the contact to central.

So, i've deleted the mirror section from my settings.xml for internal
and lets try another
deleting my local repo plugin again, re-running mvn -X site:
[DEBUG] Skipping disabled repository apache.snapshots
[INFO] artifact org.apache.maven.plugins:maven-surefire-report-plugin:
checking for updates from internal.plugins
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
'b0c93eb1aafec9aa8a237e88ce963c15717f9a3f'; remote =
'd03398cbe73cb9dde1a34dd56aff23f0480ee688' - RETRYING
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
'b0c93eb1aafec9aa8a237e88ce963c15717f9a3f'; remote =
'd03398cbe73cb9dde1a34dd56aff23f0480ee688' - IGNORING
[INFO] artifact org.apache.maven.plugins:maven-surefire-report-plugin:
checking for updates from central
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
'b0c93eb1aafec9aa8a237e88ce963c15717f9a3f'; remote =
'd03398cbe73cb9dde1a34dd56aff23f0480ee688' - RETRYING
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
'b0c93eb1aafec9aa8a237e88ce963c15717f9a3f'; remote =
'd03398cbe73cb9dde1a34dd56aff23f0480ee688' - IGNORING
[DEBUG] maven-surefire-report-plugin: resolved to version
2.1-INTERNAL-r485987-pMSUREFIREREP-6 from repository central
[DEBUG] Trying repository central
Downloading: 
http://PROXY:9999/repository/org/apache/maven/plugins/maven-surefire-report-plugin/2.1-INTERNAL-r485987-pMSUREFIREREP-6/maven-surefire-report-plugin-2.1-INTERNAL-r485987-pMSUREFIREREP-6.pom
1/1K


So even though I am no longer contacting the mirror for
internal.plugins you can see that mvnproxy provies an aggregation, so
that it looks like it was available from central...


Next steps...
Turning off internal.plugin proxying for mvn-proxy and trying again.
That will have to wait for tomorrow.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to