Coder Social home page Coder Social logo

Comments (11)

adammurdoch avatar adammurdoch commented on September 23, 2024 1

I'm pretty sure that warning is produced by aether. Gradle uses this in MavenDeployAction and MavenInstallAction to do the work of publishing a maven module.

from gradle.

06needhamt avatar 06needhamt commented on September 23, 2024

I am interested on working on this issue however i am unsure on how to locate the code in question. Is there any documentation for the directory structure of Gradle?

from gradle.

eriwen avatar eriwen commented on September 23, 2024

@06needhamt Wonderful! Locating it is the toughest part. I would suggest looking for places where we try to resolve maven-metadata.xml. subproject/dependency-management is one place. It's possible you may need to navigate from there to code in core or publish to see where the logging is called.

Hope that helps!

from gradle.

eriwen avatar eriwen commented on September 23, 2024

Hi @06needhamt. Any update on this? Need any other guidance?

from gradle.

alsutton avatar alsutton commented on September 23, 2024

The problem is triggered by the call in MavenDeployAction, which is a call through to Aether. During the handling of that call the code to merge the new artefact into the existing repository information triggers an attempt to get the existing maven-metadata.xml which occurs on a background thread.

The call goes through to the wagon file provider and triggers an exception, which is, of course, the most common way of propagating a file not found issue in Java. Unfortunately Aether treats all exceptions in this situation in the same way, so this gets propagated back to Gradle using a generic "Something has gone wrong" mechanism.

So there are multiple components involved, but there seems to be only one way that this could be realistically fixed, but that involves hacking some logic into Gradle to detect this error and silently drop it (which should be behind a config option to avoid breaking backwards compatibility).

The reason modifying Aether isn't feasible is because it seems to be abandonware :(. The sonartype repo points to eclipse, and the eclipse page is a redirect to their archived project list.

So what do people think? Is hacky logic what people want or are there other options people think might work?

from gradle.

alsutton avatar alsutton commented on September 23, 2024

It looks like the Maven project have switched to a different library This could be an option if someone has the time.

from gradle.

eriwen avatar eriwen commented on September 23, 2024

@alsutton Thank you for the thorough investigation. Introducing hacks to silently drop specific exceptions is something we try to avoid, so switching to a different library is an option.

I'd wager this wouldn't quite make it to the top of our priority queue for some time, so I'd love to see a PR for this.

from gradle.

alsutton avatar alsutton commented on September 23, 2024

I've not had time to see this through, and this probably won't change in the future, so I'm going to write up what I've found so far in case anyone wants to pick this up.

The version of Aether current being pulled in is an old version by Sonatype, the project moved from Sonatype to Eclipse where a couple more releases were made, then the project was archived. Version 3.3 of maven was using the Eclipse version of Aether, 3.5 has moved to the new library.

Unfortunately moving from the Sonatype version of Aether to the Eclipse version isn't a straight drop-in replacement;

  • The package namespace has been changed to reflect the Eclipse home.
  • There are a few API changes which need manual changes
  • Gradle then fails to compile with the changes indicating there's more work to be done under the hood.

I've got my work so far up on my GitHub fork, if anyone wants to pick it up please feel free.

from gradle.

eriwen avatar eriwen commented on September 23, 2024

@alsutton thanks again for the additional information; I hope others will be able to take what you've done and get this solved. 👏

from gradle.

oehme avatar oehme commented on September 23, 2024

@ldaley Was this also fixed by 92e1617#diff-afed11c0a1872ed31be4dfe32ed9bb23?

from gradle.

bigdaz avatar bigdaz commented on September 23, 2024

This has been fixed #9445

from gradle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.