[
https://issues.apache.org/jira/browse/MNG-6679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16870670#comment-16870670
]
Michael Osipov commented on MNG-6679:
-------------------------------------
I have no tried to verified this, running with {{mvn install -U
"-Dmaven.repo.local=D:\repo" -C}}:
{noformat}
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @
maven-source-plugin ---
Downloading from UK:
http://mikaw10/repo-redirect/org/apache/maven/shared/maven-shared-utils/0
.4/maven-shared-utils-0.4.pom
[WARNING] Checksum validation failed, expected
20a5f96a873ad02124be3dafded7acba5fdcb70b but is
6913faa6201fe1d792a5a1b0e14db80512ef9374 from UK for
http://mikaw10/repo-redirect/org/apache/
maven/shared/maven-shared-utils/0.4/maven-shared-utils-0.4.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.609 s
[INFO] Finished at: 2019-06-23T22:51:59+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-install-plugin:2.5.2:install (de
fault-install) on project maven-source-plugin: Execution default-install of
goal org.apache.ma
ven.plugins:maven-install-plugin:2.5.2:install failed: Plugin
org.apache.maven.plugins:maven-i
nstall-plugin:2.5.2 or one of its dependencies could not be resolved: Failed to
collect depend
encies at org.apache.maven.plugins:maven-install-plugin:jar:2.5.2 ->
org.apache.maven.shared:m
aven-shared-utils:jar:0.4: Failed to read artifact descriptor for
org.apache.maven.shared:mave
n-shared-utils:jar:0.4: Could not transfer artifact
org.apache.maven.shared:maven-shared-utils
:pom:0.4 from/to UK (http://mikaw10/repo-redirect): Checksum validation failed,
expected 20a5f
96a873ad02124be3dafded7acba5fdcb70b but is
6913faa6201fe1d792a5a1b0e14db80512ef9374 -> [Help 1
]
{noformat}
Here is another test where I have overriden {{central}} in my {{settings.xml}}
and setup a local mirror:
{noformat}
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @
maven-source-plugin ---
Downloading from apache:
http://mikaw10/repo-redirect/commons-codec/commons-codec/1.6/commons-codec-1.6.pom
Downloaded from apache:
http://mikaw10/repo-redirect/commons-codec/commons-codec/1.6/commons-codec-1.6.pom
(0 B at 0 B/s)
Downloading from apache:
http://mikaw10/repo-redirect/org/apache/maven/shared/maven-shared-utils/0.4/maven-shared-utils-0.4.pom
[WARNING] Checksum validation failed, expected
20a5f96a873ad02124be3dafded7acba5fdcb70b but is
6913faa6201fe1d792a5a1b0e14db80512ef9374 from apache for
http://mikaw10/repo-redirect/org/apache/maven/shared/maven-shared-utils/0.4/maven-shared-utils-0.4.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.424 s
[INFO] Finished at: 2019-06-23T23:05:26+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-install-plugin:2.5.2:install (default-install)
on project maven-source-plugin: Execution default-install of goal
org.apache.maven.plugins:maven-install-plugin:2.5.2:install failed: Plugin
org.apache.maven.plugins:maven-install-plugin:2.5.2 or one of its dependencies
could not be resolved: Failed to collect dependencies at
org.apache.maven.plugins:maven-install-plugin:jar:2.5.2 ->
org.apache.maven.shared:maven-shared-utils:jar:0.4: Failed to read artifact
descriptor for org.apache.maven.shared:maven-shared-utils:jar:0.4: Could not
transfer artifact org.apache.maven.shared:maven-shared-utils:pom:0.4 from/to
apache (http://mikaw10/repo-redirect): Checksum validation failed, expected
20a5f96a873ad02124be3dafded7acba5fdcb70b but is
6913faa6201fe1d792a5a1b0e14db80512ef9374 -> [Help 1]
{noformat}
The command line here was different: {{mvn install -U
"-Dmaven.repo.local=D:\repo"}}
All tests have been performed with Maven 3.5.4. I will retry with Maven
3.6.2-SNAPSHOT.
> HTML content in POM: Maven should validate content before storing in local
> repo
> -------------------------------------------------------------------------------
>
> Key: MNG-6679
> URL: https://issues.apache.org/jira/browse/MNG-6679
> Project: Maven
> Issue Type: Bug
> Environment: both with maven 3.6.0 in CMD or in Eclipse 4.9.0
> Reporter: Jörg Hohwiller
> Assignee: Michael Osipov
> Priority: Major
> Fix For: waiting-for-feedback
>
>
> For some odd reasons somethimes errors just happen and a maven repo delivers
> an HTML error or login page for a request of a POM or JAR file. It seems as
> if the status code is valid then Maven (might be anything under the hood,
> maybe even ether?) is saving the result without any sanity check or
> validation.
> Therefore I frequently end up with "POM" or "JAR" files in my local repo that
> are no XML but HTML nonsens.
>
> Example:
> {code:java}
> <!--
> DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
>
> Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
>
> The contents of this file are subject to the terms
> of the Common Development and Distribution License
> (the License). You may not use this file except in
> compliance with the License.
> You can obtain a copy of the License at
> https://opensso.dev.java.net/public/CDDLv1.0.html or
> opensso/legal/CDDLv1.0.txt
> See the License for the specific language governing
> permission and limitations under the License.
> When distributing Covered Code, include this CDDL
> Header Notice in each file and include the License file
> at opensso/legal/CDDLv1.0.txt.
> If applicable, add the following below the CDDL Header,
> with the fields enclosed by brackets [] replaced by
> your own identifying information:
> "Portions Copyrighted [year] [name of copyright owner]"
> $Id: index.html,v 1.2 2008/06/25 05:48:51 qcheng Exp $
> -->
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
> <html>
> <head>
> <title>Please Wait While Redirecting to Login page</title>
> <script language="JavaScript"> <!--
> function redirectToAuth() {
> var params = getQueryParameters();
> var url = 'UI/Login';
> if (params != '') {
> url += params;
> }
> top.location.replace(url);
> }
> function getQueryParameters() {
> var loc = '' + location;
> var idx = loc.indexOf('?');
> if (idx != -1) {
> return loc.substring(idx);
> } else {
> return '';
> }
> }
> //-->
> </script>
> </head>
> <body bgcolor="#FFFFFF" onLoad="redirectToAuth();">
> </body>
> </html>
> {code}
> I would expect maven to verify the content before officially placing it in
> the correct location inside the local maven repository on my disc.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)