Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maven central pom download fails due to https requirements #171

Closed
mkmaier opened this issue Jun 19, 2020 · 6 comments
Closed

maven central pom download fails due to https requirements #171

mkmaier opened this issue Jun 19, 2020 · 6 comments
Assignees
Labels
Milestone

Comments

@mkmaier
Copy link
Contributor

mkmaier commented Jun 19, 2020

When trying to build 3.0 locally, the pom download failed, because it used the unsafe default maven central url (probably due to using maven 2.0).
This should fix the pom download in build.xml, but there might be other places where the repo needs to be specified:

-    <artifact:pom id="maven.deploy.pom" file="${maven.deploy.pom}"/>
+    <artifact:pom id="maven.deploy.pom" file="${maven.deploy.pom}">
+      <remoteRepository refid="mvn.maven-central.backup" />
+    </artifact:pom>
@uschindler
Copy link
Member

uschindler commented Jun 19, 2020

Hi,
I was reviewing most places with that issue, but <artifact:pom/> seems to be fallen under the radar. I am quite sure that I did a full bootstrap with empty Maven Cache and Ivy cache, but I will check this again!

What exactly failed? Can you post the full Maven log?

Thanks for reporting.

@uschindler uschindler self-assigned this Jun 19, 2020
@uschindler
Copy link
Member

It would really be good, if Maven releases a "bugfix" Maven Ant Tasks, because this causes headaches also in Apache Lucene and other projects using those to deploy their artifacts to Maven.

@uschindler
Copy link
Member

I am quite sure this is the only remaining problematic part. The artifact:deploy tasks are no issue. And artifact:mvn got a special bootstrapping already.

@uschindler
Copy link
Member

Hi,

What exactly failed? Can you post the full Maven log?

I assume it fails to download the parent Sonatype POM?

@uschindler
Copy link
Member

I was able to reproduce this:

-maven-setup:
    [mkdir] Created dir: C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\maven
     [copy] Copying 3 files to C:\Users\Uwe Schindler\Projects\lucene\forbidden-apis\forbidden-apis\build\maven
[artifact:pom] Downloading: org/sonatype/oss/oss-parent/9/oss-parent-9.pom from repository central at http://repo1.maven.org/maven2
[artifact:pom] Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
[artifact:pom] [WARNING] Unable to get resource 'org.sonatype.oss:oss-parent:pom:9' from repository central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
[artifact:pom] An error has occurred while processing the Maven artifact tasks.
[artifact:pom]  Diagnosis:
[artifact:pom]
[artifact:pom] Unable to initialize POM pom-deploy.xml: Cannot find parent: org.sonatype.oss:oss-parent for project: de.thetaphi:forbiddenapis:maven-plugin:3.1-SNAPSHOT for project de.thetaphi:forbiddenapis:maven-plugin:3.1-SNAPSHOT
[artifact:pom] Unable to download the artifact from any repository
[artifact:pom]

I will commit a fix to master branch.

@uschindler uschindler added this to the 3.1 milestone Jun 19, 2020
@uschindler uschindler added the bug label Jun 19, 2020
@uschindler
Copy link
Member

I will add a mental todo: Use https://maven.apache.org/resolver-ant-tasks/ instead. This looks like it also allows to install and deploy files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants