Clicking on Reload All Maven Projects is throwing errors but running maven install does not
Hi,
I am a pro user of intellij. I have a multi-module maven project. I have configured custom maven version (3.6.3) and custom maven settings to use S3 as our custom artifact repository. So, the problem is when I click on "Reload All Projects" button in the maven section, it is throwing an error saying "Could not connect to repository" but whereas when I go to "Lifecycle" -> "install" it does not throw anything. It just runs fine.
I want to understand what command does "Reload All Projects" run internally? I tried to find this by looking at my "htop" to see the process but I couldn't find anything relevant. Does this not use the custom maven and settings I configured?
Please find the screenshots below
Maven configuration - https://imgur.com/a/Ilf6XLV
"Reload All Projects" - https://imgur.com/a/TRmmamJ
Clicking on "Install" lifecycle - https://imgur.com/eccjRw1
Please sign in to leave a comment.
Please also attach a screenshot of that dialog.
Hey Arina Efremova
I tried that but it's still happening the same. I think the problem could be the runner is not using the custom settings file I provided `~/.m2/settings.xml` but when I run "install" it is able to use the custom settings.
Here is the settings.xml file I have
```
<settings>
<servers>
<server>
<id>s3.release</id>
<username>XYZ</username>
<password>XYZ</password>
<filePermissions>AuthenticatedRead</filePermissions>
</server>
<server>
<id>s3.snapshot</id>
<username>XYZ</username>
<password>XYZ</password>
<filePermissions>AuthenticatedRead</filePermissions>
</server>
</servers>
</settings>
```
Here's the screenshot of it - https://imgur.com/zccJiDk
Also a screenshot of the 'File | Settings | Build, Execution, Deployment | Build Tools | Maven | Runner' dialog.
Arina Efremova
Here's the log - https://pastebin.com/jVjegrWD
Here's the screenshot - https://imgur.com/a/YJFU56U
Hi! Do you use any Maven extensions? If so, where do you define them - directly in pom.xml or in external file?
Andrey Dernov
I see that we are using extensions and it's defined in pom.xml
Could be the
IDEA-266313 Maven integration in 2021.1 does not use aws-maven extension if defined directly in pom.xml but uses it if defined in a separate xml file
Could you try if it helps to define it in a separate file?
Andrey Dernov - I am not using maven wrapper, so I created a `.mvn` folder and a new file `extensions.xml` and tried with this
still not working!
Thank you. Could you please try using some older Maven versions?
Andrey Dernov
Can you please be more specific here? I mentioned that I am already using 3.6.3 which version do you want me to use? Intellij being a decade old IDE, isn't this a very obvious issue and you guys should have fixed it earlier? Also, you guys are taking too much time to troubleshoot
There was an issue IDEA-266313 that has been fixed but it may have resurfaced for new Maven versions, that is why I asked you to try older versions to check if this hypothesis is true.
I totally understand that this could be frustrating and I'm sorry about such a long turnarounds and I thank you for your patience. Unfortunately, it is hard to find the problem without a reproducer. By the way - would it be possible to have the project which fails for you? It would help our developers a lot.
Thank you.
Andrey Dernov
Hi, thanks for the quick update. Unfortunately, I cannot share the project as it is an enterprise entity. Which maven version you want me to try? I am using 3.6.3 currently
Indeed 3.6.3 is quite an old version already. It looks like the problem is not in a Maven version. Especially if it works with latest versions. I have reported the issue to investigate: IDEA-329722 Maven sync cannot download artifacts from s3 wagon repository, but Maven goal completes successfully
Please vote for it and follow for the updates.
Also, to get more information for the investigation it would be very helpful if you would
- enable Settings | Build, Execution, Deployment | Build Tools | Maven | Print exception stack traces option
- set the output level to Debug in IDE Maven settings
- enabled debug level for IDE logs by adding
line to Help | Diagnostic Tools | Debug Log Settings... dialog.
And after reproducing, attach maven output and IDE logs (using Help | Collect Logs and Diagnostic Data action).
Thank you!
Andrey Dernov - Done, added to the ticket. Thanks!