infra-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (INFRA-15815) Maven build can't find SNAPSHOT parent pom on repository.apache.org
Date Sun, 21 Jan 2018 17:27:00 GMT

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

Sebb commented on INFRA-15815:
------------------------------

AIUI the issue here is that the built-in Maven super-pom defines the URL for the release repo,
but does not define any snapshot repos (I assume because these are normally specific to an
organisation).

Most ASF projects have the Apache parent pom as an ancestor.
The ASF pom defines the ASF snapshot repo URL. 

So projects can find snapshot dependencies - provided that the pom ancestry is not broken.
However where a snapshot pom is referenced, the pom can only be found if it is already in
the local repo.

To get around this chicken and egg situation (*) you either need to have another build that
populates the local repo [1] or you need to ensure that the snapshot repo URL is defined for
all jobs [2].

[1] For example, you can have a build that fetches the parent pom and installs it.

[2] Add the snapshot repo def to a profile in settings.xml. If it is added to the active profile,
it will apply to all builds.
Or it could be added to an inactive profile, in which case it would need to be activated to
build projects that depend on snapshot poms.

It looks like the settings active profile is the approach taken for the Windows slaves:
environments/windows/modules/jenkins_slave_windows/templates/settings.xml.erb

However the same is not the case for other build slaves:
modules/build_slaves/templates/m2_settings.erb


(*) eggs came first

> Maven build can't find SNAPSHOT parent pom on repository.apache.org
> -------------------------------------------------------------------
>
>                 Key: INFRA-15815
>                 URL: https://issues.apache.org/jira/browse/INFRA-15815
>             Project: Infrastructure
>          Issue Type: Project
>          Components: Jenkins
>            Reporter: Robert Munteanu
>            Assignee: Chris Lambertus
>            Priority: Major
>
> For several Jenkins jobs we have a problem where a parent pom deployed on repository.apache.org
is not found. For instance, on https://builds.apache.org/job/sling-org-apache-sling-testing-paxexam-1.8/21/console:
> java.io.IOException: remote file operation failed: /home/jenkins/jenkins-slave/workspace/sling-org-apache-sling-testing-paxexam-1.8
at hudson.remoting.Channel@4ed6a58:H35: hudson.remoting.ProxyException: hudson.maven.MavenModuleSetBuild$MavenExecutionException:
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing
the POMs:
> [FATAL] Non-resolvable parent POM: Could not find artifact org.apache.sling:sling:pom:33-SNAPSHOT
and 'parent.relativePath' points at no local POM @ line 24, column 11
> Building the project locally works as expected:
> Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/sling/sling/33-SNAPSHOT/maven-metadata.xml
> Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/sling/sling/33-SNAPSHOT/maven-metadata.xml
(594 B at 554 B/s)
> Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/sling/sling/33-SNAPSHOT/sling-33-20180109.083736-32.pom
> Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/sling/sling/33-SNAPSHOT/sling-33-20180109.083736-32.pom
(58 kB at 58 kB/s)
> Since the snapshots repository definition is part of the ASF parent pom, there is nothing
for us to adjust.
> Failures were seen on H35, H32, H26 and ubuntu-2, so this does not look like a slave-specific
issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message