My maven is trying to download artifacts from an incorrect repository

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

My maven is trying to download artifacts from an incorrect repository

Debashish Ghosh
Hi,
   I am trying to run mvn install on a git hub project https://github.com/hapifhir/org.hl7.fhir.core.git .
I am using maven version 3.6.3 . The gist of the issue is that it tries to download  maven-bundle-plugin  artifact from   http://central.maven.org/maven2/ . This repository doesn't exist so it keeps giving error since the artifacts downloaded are empty error files. 

I tried changing the settings.xml to use repository https://repo.maven.apache.org/maven2/ but it still keeps trying to get the artifact from  http://central.maven.org/maven2/ . I don't even understand how it gets a reference to that url. 
It keeps giving me the following error :
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\debashish.ghosh\.m2\repository
[INFO] Scanning for projects...
[DEBUG] Using mirror remote-repos (https://repo.maven.apache.org/maven2) for central (https://repo.maven.apache.org/maven2).
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://oss.sonatype.org/content/repositories/snapshots
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://oss.sonatype.org/content/repositories/snapshots
Downloading from ossrh: https://oss.sonatype.org/content/repositories/snapshots/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1.pom
[DEBUG] Writing tracking file C:\Users\debashish.ghosh\.m2\repository\org\apache\felix\maven-bundle-plugin\4.2.1\maven-bundle-plugin-4.2.1.pom.lastUpdated
[DEBUG] Using transporter WagonTransporter with priority -1.0 for http://central.maven.org/maven2/
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://central.maven.org/maven2/
Downloading from maven2: http://central.maven.org/maven2/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1.pom
[WARNING] Checksum validation failed, expected <!DOCTYPE but is ef60c65b1b81b55cf3acd6ae57c9ff70e4c22583 from maven2 for http://central.maven.org/maven2/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1.pom
[WARNING] Could not validate integrity of download from http://central.maven.org

I am also attaching the project's pom.xml and my maven's setting.xml
I am stuck up with this issue for a while now . Any help is greatly appreciated !

Regards
Debashish


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

pom.xml (19K) Download Attachment
settings.xml (15K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: My maven is trying to download artifacts from an incorrect repository

John Patrick
I would try building with a temporary local maven repo to see if
something got corrupt/wrong/incorrect in your user's repo, so i would
do;

$ mvn -Dmaven.repo.local=./mvn-repo clean install

that would for that execution download everything into a local
mvn-repo directory

if that works then your project and settings are fine and something is
corrupt/wrong/incorrect in your user's repo, and i would search for
central.maven.org in your users repo to see if i could spot the issue
and maybe then delete those files

if that fails i would create a dummy empty settings.xml so rule out
your users settings file so;

$ mvn -Dmaven.repo.local=./mvn-repo-local-settings -s ./settings.xml
clean install

if that works then something in the settings file picked up by default
is the issue

if that still fails then it's something in your project

or it's a dependency your downloading that has a repo hard coded

too many options to debug, hope some of the above helps

John


On Thu, 4 Jun 2020 at 00:24, Debashish Ghosh
<[hidden email]> wrote:

>
> Hi,
>    I am trying to run mvn install on a git hub project https://github.com/hapifhir/org.hl7.fhir.core.git .
> I am using maven version 3.6.3 . The gist of the issue is that it tries to download  maven-bundle-plugin  artifact from   http://central.maven.org/maven2/ . This repository doesn't exist so it keeps giving error since the artifacts downloaded are empty error files.
>
> I tried changing the settings.xml to use repository https://repo.maven.apache.org/maven2/ but it still keeps trying to get the artifact from  http://central.maven.org/maven2/ . I don't even understand how it gets a reference to that url.
> It keeps giving me the following error :
> [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\debashish.ghosh\.m2\repository
> [INFO] Scanning for projects...
> [DEBUG] Using mirror remote-repos (https://repo.maven.apache.org/maven2) for central (https://repo.maven.apache.org/maven2).
> [DEBUG] Using transporter WagonTransporter with priority -1.0 for https://oss.sonatype.org/content/repositories/snapshots
> [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://oss.sonatype.org/content/repositories/snapshots
> Downloading from ossrh: https://oss.sonatype.org/content/repositories/snapshots/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1.pom
> [DEBUG] Writing tracking file C:\Users\debashish.ghosh\.m2\repository\org\apache\felix\maven-bundle-plugin\4.2.1\maven-bundle-plugin-4.2.1.pom.lastUpdated
> [DEBUG] Using transporter WagonTransporter with priority -1.0 for http://central.maven.org/maven2/
> [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://central.maven.org/maven2/
> Downloading from maven2: http://central.maven.org/maven2/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1.pom
> [WARNING] Checksum validation failed, expected <!DOCTYPE but is ef60c65b1b81b55cf3acd6ae57c9ff70e4c22583 from maven2 for http://central.maven.org/maven2/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1.pom
> [WARNING] Could not validate integrity of download from http://central.maven.org
>
> I am also attaching the project's pom.xml and my maven's setting.xml
> I am stuck up with this issue for a while now . Any help is greatly appreciated !
>
> Regards
> Debashish
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: My maven is trying to download artifacts from an incorrect repository

Debashish Ghosh
Thanks a lot for your suggestion it worked ! One of the very first poms
downloaded was pointing to a wrong repository ..

On Thu, Jun 4, 2020 at 6:26 AM John Patrick <[hidden email]> wrote:

> I would try building with a temporary local maven repo to see if
> something got corrupt/wrong/incorrect in your user's repo, so i would
> do;
>
> $ mvn -Dmaven.repo.local=./mvn-repo clean install
>
> that would for that execution download everything into a local
> mvn-repo directory
>
> if that works then your project and settings are fine and something is
> corrupt/wrong/incorrect in your user's repo, and i would search for
> central.maven.org in your users repo to see if i could spot the issue
> and maybe then delete those files
>
> if that fails i would create a dummy empty settings.xml so rule out
> your users settings file so;
>
> $ mvn -Dmaven.repo.local=./mvn-repo-local-settings -s ./settings.xml
> clean install
>
> if that works then something in the settings file picked up by default
> is the issue
>
> if that still fails then it's something in your project
>
> or it's a dependency your downloading that has a repo hard coded
>
> too many options to debug, hope some of the above helps
>
> John
>
>
> On Thu, 4 Jun 2020 at 00:24, Debashish Ghosh
> <[hidden email]> wrote:
> >
> > Hi,
> >    I am trying to run mvn install on a git hub project
> https://github.com/hapifhir/org.hl7.fhir.core.git .
> > I am using maven version 3.6.3 . The gist of the issue is that it tries
> to download  maven-bundle-plugin  artifact from
> http://central.maven.org/maven2/ . This repository doesn't exist so it
> keeps giving error since the artifacts downloaded are empty error files.
> >
> > I tried changing the settings.xml to use repository
> https://repo.maven.apache.org/maven2/ but it still keeps trying to get
> the artifact from  http://central.maven.org/maven2/ . I don't even
> understand how it gets a reference to that url.
> > It keeps giving me the following error :
> > [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0
> for C:\Users\debashish.ghosh\.m2\repository
> > [INFO] Scanning for projects...
> > [DEBUG] Using mirror remote-repos (https://repo.maven.apache.org/maven2)
> for central (https://repo.maven.apache.org/maven2).
> > [DEBUG] Using transporter WagonTransporter with priority -1.0 for
> https://oss.sonatype.org/content/repositories/snapshots
> > [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for
> https://oss.sonatype.org/content/repositories/snapshots
> > Downloading from ossrh:
> https://oss.sonatype.org/content/repositories/snapshots/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1.pom
> > [DEBUG] Writing tracking file
> C:\Users\debashish.ghosh\.m2\repository\org\apache\felix\maven-bundle-plugin\4.2.1\maven-bundle-plugin-4.2.1.pom.lastUpdated
> > [DEBUG] Using transporter WagonTransporter with priority -1.0 for
> http://central.maven.org/maven2/
> > [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for
> http://central.maven.org/maven2/
> > Downloading from maven2:
> http://central.maven.org/maven2/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1.pom
> > [WARNING] Checksum validation failed, expected <!DOCTYPE but is
> ef60c65b1b81b55cf3acd6ae57c9ff70e4c22583 from maven2 for
> http://central.maven.org/maven2/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1.pom
> > [WARNING] Could not validate integrity of download from
> http://central.maven.org
> >
> > I am also attaching the project's pom.xml and my maven's setting.xml
> > I am stuck up with this issue for a while now . Any help is greatly
> appreciated !
> >
> > Regards
> > Debashish
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>