fatal error - error building POM (may not be this

2019-08-13 14:35发布

问题:

Project ID: com.abc.def.MyProject:pom:null

Reason: Cannot find parent: com.xyz.list.MyWonderfulFamilly for project   com.abc.def.MyProject:pom:null for  com.abc.def.MyProject:pom:null

[INFO] TRACE
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: com.xyz.list.MyWonderfulFamilly for project  com.abc.def.MyProject:pom:null for  com.abc.def.MyProject:pom:null

Caused by org.apache.maven.project.ProjectBuildingException: POM 'com.xyz.list.MyWonderfulFamilly' not found in repository: Unable to download the artifact from the repository

           com:xyz:list:MyWonderfulFamilly:pom     

from the specified remote repositories:
    CompanyName.Pricing.G7 (http://mksrvsub01.domain.xxxxxx)

for project com.xyz.list.MyWonderfulFamilly at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:1392)

Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository

               com:xyz:list:MyWonderfulFamilly:pom

from the specified remote repositories:
    CompanyName.Pricing.G7 (http://mksrvsub01.domain.xxxxxx)
  1. I have tried mvn clean install on the project directory, and also at the project root - same error
  2. I have tried deleting all lastUpdated files in the .m2 repository - same error
  3. Deleted files in the ~.m2\repository\org\apache\maven\plugins - same error
  4. Deleted all project files and folders and created new directory and checked out project files and run mvn clean install - same error

Apache Maven 2.2.1 r801777 Win XP, x86, 32-bit

回答1:

Quote:

Caused by Unable to download the artifact from any repository

com:xyz:list:MyWonderfulFamilly:pom

from the specified remote repositories:

CompanyName.Pricing.G7

Did you check that you can access the repository? Is the pom/artifact available in the repository? If so, check the local ~./m2/com/xyz/list folder if the artifact or an error message is there. Delete and re-try if required.



回答2:

i realized that i have to add more dependent maven projects to the build path, and do mvn clean install and after a laborious 2 hours the thing is fixed!



回答3:

In some cases (my case in particular) some additional security tweaks might be involved.

What I mean is that if you work with a central repository that available through a certificate, you might have to check if your JAVA_HOME\jre\lib\security\cacerts file stores the certificate in question. In my case after importing the certificate file in there (I used the KeyStore Explorer application, but it can be done on the command line either) and all my processes continued normally.



标签: java maven nexus