[ 
https://issues.apache.org/jira/browse/MNG-6679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16865570#comment-16865570
 ] 

Jörg Hohwiller commented on MNG-6679:
-------------------------------------

Issue is easy to reproduce for me. I simply remove the artifact from local repo 
ensure that my nexus is not properly accessible (causing the error) and rerun 
maven.
Here is the requested log:
{code}
> mvn -X initialize -rf :webapp
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 
2018-10-24T20:41:47+02:00)
Maven home: /projects/myproject/software/maven
Java version: 1.8.0_191, vendor: Oracle Corporation, runtime: 
/projects/software/jdk1.8/Contents/Home/jre
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.5", arch: "x86_64", family: "mac"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG]   Imported: javax.annotation.* < plexus.core
[DEBUG]   Imported: javax.annotation.security.* < plexus.core
[DEBUG]   Imported: javax.enterprise.inject.* < plexus.core
[DEBUG]   Imported: javax.enterprise.util.* < plexus.core
[DEBUG]   Imported: javax.inject.* < plexus.core
[DEBUG]   Imported: org.apache.maven.* < plexus.core
[DEBUG]   Imported: org.apache.maven.artifact < plexus.core
[DEBUG]   Imported: org.apache.maven.classrealm < plexus.core
[DEBUG]   Imported: org.apache.maven.cli < plexus.core
[DEBUG]   Imported: org.apache.maven.configuration < plexus.core
[DEBUG]   Imported: org.apache.maven.exception < plexus.core
[DEBUG]   Imported: org.apache.maven.execution < plexus.core
[DEBUG]   Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG]   Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG]   Imported: org.apache.maven.model < plexus.core
[DEBUG]   Imported: org.apache.maven.monitor < plexus.core
[DEBUG]   Imported: org.apache.maven.plugin < plexus.core
[DEBUG]   Imported: org.apache.maven.profiles < plexus.core
[DEBUG]   Imported: org.apache.maven.project < plexus.core
[DEBUG]   Imported: org.apache.maven.reporting < plexus.core
[DEBUG]   Imported: org.apache.maven.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG]   Imported: org.apache.maven.settings < plexus.core
[DEBUG]   Imported: org.apache.maven.toolchain < plexus.core
[DEBUG]   Imported: org.apache.maven.usability < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG]   Imported: org.codehaus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.* < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.component < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.container < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.context < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < 
plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < 
plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < 
plexus.core
[DEBUG]   Imported: org.eclipse.aether.* < plexus.core
[DEBUG]   Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG]   Imported: org.eclipse.aether.collection < plexus.core
[DEBUG]   Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG]   Imported: org.eclipse.aether.graph < plexus.core
[DEBUG]   Imported: org.eclipse.aether.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.installation < plexus.core
[DEBUG]   Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG]   Imported: org.eclipse.aether.repository < plexus.core
[DEBUG]   Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG]   Imported: org.eclipse.aether.spi < plexus.core
[DEBUG]   Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.version < plexus.core
[DEBUG]   Imported: org.fusesource.jansi.* < plexus.core
[DEBUG]   Imported: org.slf4j.* < plexus.core
[DEBUG]   Imported: org.slf4j.helpers.* < plexus.core
[DEBUG]   Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Message scheme: color
[DEBUG] Message styles: debug info warning error success failure strong mojo 
project
[DEBUG] Reading global settings from 
/projects/myproject/software/maven/conf/settings.xml
[DEBUG] Reading user settings from /projects/myproject/conf/.m2/settings.xml
[DEBUG] Reading global toolchains from 
/projects/myproject/software/maven/conf/toolchains.xml
[DEBUG] Reading user toolchains from /projects/myproject/conf/.m2/toolchains.xml
[DEBUG] Using local repository at /projects/myproject/conf/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for 
/projects/myproject/conf/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project com.foo.example:parent:pom:1.0.0-SNAPSHOT: 
(none)
[DEBUG] Looking up lifecycle mappings for packaging pom from 
ClassRealm[plexus.core, parent: null]
[DEBUG] Extension realms for project 
com.foo.example.modules:external-parent:pom:2.1.2: (none)
[DEBUG] Looking up lifecycle mappings for packaging pom from 
ClassRealm[plexus.core, parent: null]
[DEBUG] Extension realms for project com.foo.example:external-parent:pom:1.4.2: 
(none)
[DEBUG] Looking up lifecycle mappings for packaging pom from 
ClassRealm[plexus.core, parent: null]
[DEBUG] Extension realms for project com.foo.example:api:jar:1.0.0-SNAPSHOT: 
(none)
[DEBUG] Looking up lifecycle mappings for packaging jar from 
ClassRealm[plexus.core, parent: null]
[DEBUG] Extension realms for project com.foo.example:core:jar:1.0.0-SNAPSHOT: 
(none)
[DEBUG] Looking up lifecycle mappings for packaging jar from 
ClassRealm[plexus.core, parent: null]
[DEBUG] Extension realms for project com.foo.example:webapp:war:1.0.0-SNAPSHOT: 
(none)
[DEBUG] Looking up lifecycle mappings for packaging war from 
ClassRealm[plexus.core, parent: null]
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: com.foo.example:webapp:war:1.0.0-SNAPSHOT
[DEBUG] Tasks:   [initialize]
[DEBUG] Style:   Regular
[DEBUG] =======================================================================
[INFO]
[INFO] -------------------< com.foo.example:webapp >--------------------
[INFO] Building webapp 1.0.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, 
process-sources, generate-resources, process-resources, compile, 
process-classes, generate-test-sources, process-test-sources, 
generate-test-resources, process-test-resources, test-compile, 
process-test-classes, test, prepare-package, package, pre-integration-test, 
integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, 
process-sources, generate-resources, process-resources, compile, 
process-classes, generate-test-sources, process-test-sources, 
generate-test-resources, process-test-resources, test-compile, 
process-test-classes, test, prepare-package, package, pre-integration-test, 
integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project:       com.foo.example:webapp:1.0.0-SNAPSHOT
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): [runtime]
[DEBUG] Repositories (dependencies): [nexus 
(https://company.com/nexus3/repository/main/, default, releases+snapshots), 
central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] Repositories (plugins)     : [central 
(https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] =======================================================================
[DEBUG] Skipped remote request for 
com.foo.example:core:1.0.0-SNAPSHOT/maven-metadata.xml locally installed 
metadata up-to-date.
[DEBUG] Skipped remote request for 
com.foo.example:core:1.0.0-SNAPSHOT/maven-metadata.xml locally installed 
metadata up-to-date.
[DEBUG] Skipped remote request for 
com.foo.example:parent:1.0.0-SNAPSHOT/maven-metadata.xml locally installed 
metadata up-to-date.
[DEBUG] Skipped remote request for 
com.foo.example:api:1.0.0-SNAPSHOT/maven-metadata.xml locally installed 
metadata up-to-date.
[DEBUG] Skipped remote request for 
com.foo.example:api:1.0.0-SNAPSHOT/maven-metadata.xml locally installed 
metadata up-to-date.
[WARNING] The POM for org.jboss.as:jboss-as-build:pom:7.1.2.Final is invalid, 
transitive dependencies (if any) will not be available: 4 problems were 
encountered while building the effective model for ::
[ERROR] 'modelVersion' is missing. @ 
[unknown-group-id]:[unknown-artifact-id]:[unknown-version]
[ERROR] 'groupId' is missing. @ 
[unknown-group-id]:[unknown-artifact-id]:[unknown-version]
[ERROR] 'artifactId' is missing. @ 
[unknown-group-id]:[unknown-artifact-id]:[unknown-version]
[ERROR] 'version' is missing. @ 
[unknown-group-id]:[unknown-artifact-id]:[unknown-version]

[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1686267, 
ConflictMarker.markTime=922597, ConflictMarker.nodeCount=634, 
ConflictIdSorter.graphTime=1015644, ConflictIdSorter.topsortTime=489068, 
ConflictIdSorter.conflictIdCount=205, ConflictIdSorter.conflictIdCycleCount=0, 
ConflictResolver.totalTime=17158628, ConflictResolver.conflictItemCount=408, 
DefaultDependencyCollector.collectTime=578079029, 
DefaultDependencyCollector.transformTime=22713667}
[DEBUG] com.foo.example:webapp:war:1.0.0-SNAPSHOT
[DEBUG]    com.foo.example:core:jar:1.0.0-SNAPSHOT:compile
[DEBUG]       com.foo.example:api:jar:1.0.0-SNAPSHOT:compile
...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.418 s
[INFO] Finished at: 2019-06-17T14:52:02+02:00
[INFO] ------------------------------------------------------------------------
{code}

> 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
>            Priority: Major
>             Fix For: wontfix-candidate
>
>
> 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)

Reply via email to