Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
2.1.3
-
None
-
None
Description
The Maven-ant-tasks do not respect the mirrors defined in settings.xml.
For example with com.vaadin.external.atmosphere:atmosphere-runtime:2.2.7.vaadin1 this is problematic because this artifact has a dependency to org.sonatype.oss:oss-parent:5 and contains also a repository definition for oss.sonatype.org as http://oss.sonatype.org/content/repositories/releases.
But this repository does not contain version 5 of oss-parent anymore and returns an HTML error page instead.
Maven central would contain this version but is not used although set as mirror.
Steps to reproduce:
Use this settings.xml:
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"> <servers> <server> <id>central</id> </server> </servers> <mirrors> <mirror> <id>central</id> <url>http://repo.maven.apache.org/maven2/</url> <mirrorOf>*</mirrorOf> </mirror> </mirrors> </settings>
and this build.xml:
<project xmlns:artifact="antlib:org.apache.maven.artifact.ant" name="maven-ant-task-mirrot-test" default="ResolveDependency"> <target name="ResolveDependency"> <artifact:dependencies useScope="runtime"> <dependency groupId="com.vaadin.external.atmosphere" artifactId="atmosphere-runtime" version="2.2.7.vaadin1" /> </artifact:dependencies> </target> </project>
ant -verbose creates the following output:
[artifact:dependencies] Maven Ant Tasks version: 2.1.4-SNAPSHOT [artifact:dependencies] Loading Maven settings file: <USER_HOME>/.m2/settings.xml [artifact:dependencies] Loading Maven settings file: <USER_HOME>/apache-maven-3.2.5/conf/settings.xml [artifact:dependencies] Using local repository: <USER_HOME>/.m2/repository [artifact:dependencies] Resolving dependencies... [artifact:dependencies] Using remote repositories: - id=central, url=http://repo.maven.apache.org/maven2/, releases=enabled, snapshots=disabled, authentication=null org.apache.maven:super-pom:pom:2.0 (selected) [artifact:dependencies] Downloading: com/vaadin/external/atmosphere/atmosphere-runtime/2.2.7.vaadin1/atmosphere-runtime-2.2.7.vaadin1.pom from repository central at http://repo.maven.apache.org/maven2/ [artifact:dependencies] Transferring 11K from central [artifact:dependencies] Downloading: org/sonatype/oss/oss-parent/5/oss-parent-5.pom from repository oss.sonatype.org at http://oss.sonatype.org/content/repositories/releases [artifact:dependencies] Transferring 0K from oss.sonatype.org [artifact:dependencies] [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '81ffbd1712afe8cdf138b570c0fc9934742c33c1'; remote = '<html> [artifact:dependencies] <head><title>301' - RETRYING [artifact:dependencies] Downloading: org/sonatype/oss/oss-parent/5/oss-parent-5.pom from repository oss.sonatype.org at http://oss.sonatype.org/content/repositories/releases [artifact:dependencies] Transferring 0K from oss.sonatype.org [artifact:dependencies] [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '81ffbd1712afe8cdf138b570c0fc9934742c33c1'; remote = '<html> [artifact:dependencies] <head><title>301' - IGNORING [artifact:dependencies] An error has occurred while processing the Maven artifact tasks. [artifact:dependencies] Diagnosis: [artifact:dependencies] [artifact:dependencies] Unable to resolve artifact: Unable to get dependency information: Unable to read the metadata file for artifact 'com.vaadin.external.atmosphere:atmosphere-runtime:jar': Cannot find parent: org.sonatype.oss:oss-parent for project: com.vaadin.external.atmosphere:atmosphere-project:pom:2.2.7.vaadin1 for project com.vaadin.external.atmosphere:atmosphere-project:pom:2.2.7.vaadin1 [artifact:dependencies] com.vaadin.external.atmosphere:atmosphere-runtime:jar:2.2.7.vaadin1 [artifact:dependencies] [artifact:dependencies] from the specified remote repositories: [artifact:dependencies] central (http://repo.maven.apache.org/maven2/) [artifact:dependencies] [artifact:dependencies] Path to dependency: [artifact:dependencies] 1) org.apache.maven:super-pom:pom:2.0 [artifact:dependencies] [artifact:dependencies] [artifact:dependencies] Not a v4.0.0 POM. for project org.sonatype.oss:oss-parent at <USER_HOME>/.m2/repository/org/sonatype/oss/oss-parent/5/oss-parent-5.pom
This behavior and a possible fix is already described in the comments of MANTTASKS-157 but this issue has recently been closed without fixing it.
Attachments
Issue Links
- is related to
-
MANTTASKS-157 Manven-ant-tasks do not use servers list from maven conf
- Closed