There are 2 Java Projects projects: Payment-Common
and payment-service
.
Payment-Common
Added addiction Maven-Source-Plugin
:
& lt; project & gt;
& lt; builds & gt;
& lt; plugins & gt;
& lt; plugin & gt;
& lt; groupid & gt; org.apache.maven.plugins & lt; / groupid & gt;
& lt; artifactid & gt; Maven-Source-plugin & lt; / artifactid & gt;
& lt; Executions & gt;
& lt; execution & gt;
& lt; ID & GT; Attach-Sources & LT; / ID & GT;
& lt; goals & gt;
& lt; goal & gt; jar & lt; / goal & gt;
& lt; / goals & gt;
& lt; / execution & gt;
& lt; / executions & gt;
& lt; / plugin & gt;
& lt; / plugins & gt;
& lt; / build & gt;
& lt; / Project & gt;
When I do MVN Clean Package
, target
appears sources.jar
, as it should be:
Also that .jar appears in Amazon S3 after executing MVN Clean Deploy
:
in payment-service
there is the following dependency:
& lt; dependency & gt;
& lt; groupid & gt; com. *** & lt; / groupid & gt;
& lt; artifactid & gt; payment-common & lt; / artifactid & gt;
& lt; Version & GT; 1.540.0-Snapshot & lt; / Version & GT;
& lt; / dependency & gt;
But when I’m trying to download Sources by means of Intelij Idea, I get the following error:
After that, if you do MVN Clean Install
, the Sursi is successfully downloaded.
What do I do wrong?
repositories in pom.xml:
& lt; repositories & gt;
& lt; repository & gt;
& lt; ID & GT; Cloudfront-Snapshots & lt; / id & gt;
& lt; Name & gt; *** & lt; / Name & gt;
& lt; url & gt; https: //maven.***.Net/< / URL & GT;
& lt; / repository & gt;
& lt; repository & gt;
& lt; ID & GT; JCenter-Snapshots & lt; / id & gt;
& lt; Name & gt; jcenter & lt; / name & gt;
& lt; url & gt; https: //jcenter.bintray.com/< / URL & GT;
& lt; / repository & gt;
& lt; repository & gt;
& lt; ID & GT; Maven. *** & lt; / id & gt;
& lt; url & gt; s3: // *** - maven-repo / & lt; / url & gt;
& lt; / repository & gt;
& lt; / repositories & gt;
& lt; pluginrepositories & gt;
& lt; pluginrepository & gt;
& lt; ID & GT; Maven. *** & lt; / id & gt;
& lt; url & gt; s3: // *** - maven-repo / & lt; / url & gt;
& lt; / pluginrepository & gt;
& lt; / pluginrepositories & gt;
& lt; distributionmanagement & gt;
& lt; repository & gt;
& lt; ID & GT; Maven. *** & lt; / id & gt;
& lt; url & gt; s3: // *** - maven-repo / & lt; / url & gt;
& lt; / repository & gt;
& lt; snapshotrepository & gt;
& lt; ID & GT; Maven. *** & lt; / id & gt;
& lt; url & gt; s3: // *** - maven-repo / & lt; / url & gt;
& lt; / SnapshotRepository & gt;
& lt; / distributionmanagement & gt;
Answer 1
Check Maven
Settings
Always Update Snapshots – check the box.
Check that the Offline button is not pressed.
For clarity added screen
It seems that after the display of a remote repository, you Maven does not update it in local. When installing Maven, it seems directly updating in the local repository.