Skip to content

Conversation

@JohnTortugo
Copy link
Contributor

I hit the error described on #293 while doing some local tests, the fix for me was simply to skip the POMDistribution entries. I'm no MX expert but this seems a reasonable fix. I tested it on OSX/Linux AArch/x86.

Closes: #293

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 3, 2025
@JohnTortugo
Copy link
Contributor Author

Can anyone please take a look?

@dougxc
Copy link
Member

dougxc commented Sep 9, 2025

@gilles-duboscq would you mind looking at this.

@gilles-duboscq
Copy link
Member

If you do that you'll miss those pom distributions, which are specifically made for maven.

It looks like the maven_install path was never updated since those have been introduced. Likely because mx maven-install has fallen out of fashion in favor of mx maven-deploy's support for installing into the local repository.

The first thing to do if you encounter this issue it probably to try to use mx maven-deploy --suppress-javadoc --validate=none ... without specifying either the repository id or url. It will then pick your configured local repository (typically ~/.m2/repository).

Regarding what we should do with this code I think it depends whether maven-install still has use-cases not covered by maven-deploy. We could remove it or try to make it call you to maven_deploy under the hood.

@JohnTortugo
Copy link
Contributor Author

Thank you for commenting. In the past we (@ Amazon) tried maven-deploy to deploy Maven artifacts to a local repository but the Maven plugin doing the actual deployment required internet connection for some reason. Our build agents don't have internet access, that's why we invested in using maven-install instead.

@gilles-duboscq
Copy link
Member

I see. It would be helpful to check what exactly is triggering this internet connection.
I initially thought that the difference was in the maven command used but i see that mx maven-deploy already uses install:install-file (same as what mx maven-install uses) instead of deploy:deploy-file or gpg:sign-and-deploy-file when deploying to the local repository.

Are you explicitly specifying the path to the local repo (mx maven-install --repo /path/to/repo or mx maven-deploy local file:///path/to/repo)? I think the special "local" code path is not taken in that case in mx maven-deploy. If that's what's causing your issue we could fix that.

@JohnTortugo
Copy link
Contributor Author

I talked with one of my colleagues working on the infra side and looks like we are not using maven-install anymore. So, if you want to get rid of maven-install that's fine from my side.

Shall I close this PR?

@gilles-duboscq
Copy link
Member

Thanks for the feedback. Yes, let's close this PR.

@JohnTortugo JohnTortugo deleted the maven-install-patch branch September 19, 2025 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error while doing maven-install

3 participants