I am new to the world of maven. I am trying to create a dummy spring boot project using Spring Tool Suite in a private company. Whenever I try to create a spring-boot project, I get the following error. Does it have something to do with a private network?? If not, is there any problem with my maven installation? How do I make this run?
Here's the error:
Project build error: Non-resolvable parent POM for
com.example.dummy:dummy-project:0.0.1-SNAPSHOT: Failure to transfer
org.springframework.boot:spring-boot-starter-parent:pom:2.1.0.BUILD-SNAPSHOT
from https://repo.spring.io/snapshot was cached in the local
repository, resolution will not be reattempted until the update
interval of spring-snapshots has elapsed or updates are forced.
Original error: Could not transfer artifact
org.springframework.boot:spring-boot-starter-parent:pom:2.1.0.BUILD-SNAPSHOT
from/to spring-snapshots (https://repo.spring.io/snapshot):
repo.spring.io and 'parent.relativePath' points at no local
POM pom.xml /dummy-project line 14 Maven pom Loading Problem
The pom.xml file of your project has a so-called parent pom. That parent-pom is just another pom file which sits on the spring.io server. Maven downloads that pom file and merges its configuration with the configuration of your project's pom.
Therefore, maven needs to have access to https://repo.spring.io/snapshot to download the parent-pom. Since the parent-pom will be cached in your local maven repository, you will only require access to that server once.
Related
I had to re-install Eclipse, and my previously-working project refuses to compile due to Maven POM error.
The error is
Project build error: Non-resolvable parent POM: Failure to transfer my:my-parent:pom:3.0 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer artifact my:my-parent:pom:3.0 from/to central (http://repo.maven.apache.org/
maven2): connect timed out and 'parent.relativePath' points at wrong local POM
I know the SVN location for the parent POM on the company Intranet, but not sure where it should be configured in Eclipse/Maven so parent POM is read from there instead of from Apache Maven repo
You must configure current maven repositories in your .m2 directory in settings.xml file.
And if you want to force to check for artifacts in remote repositories you must do a mvn compile with -U option to force an update
Since you are in company network may be a proxy issue. Check the settings.xml and check the required proxy is setup properly
Try force maven update
mvn clean install -U
As per NullPointerException's comment, the problem was that my previous Eclipse install had a custom .m2 location ( preferences -> maven -> User Settings ) and new install was pointing to incorrect .m2.
Changing that to correct location fixed the issue
I am getting the following errors and i do not know why. I have set up my project on multiple environments and Ive never had any issue but recently i have added the project to an environment running Windows 8 with everything set up correctly (e.g. Maven... ) and i seem to be getting this issue
Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (execution: default-compile, phase: compile)
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (execution: default-testCompile, phase: test-compile)
- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read
artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-compiler-
plugin:pom:2.5.1 from/to central (http://repo.maven.apache.org/maven2): Address family not supported by protocol family: connect
- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read
artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1
from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to central (http://repo.maven.apache.org/maven2): Address family not supported
by protocol family: connect
and
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
I have looked at this online and have tried numerous different things listed below to try and resolve this issue but none of them seem to work. Just to note i am not using any proxies
Delete .m2 repository, Maven -> Update Project...
Delete all .lastUpdated files, Maven -> Update Project...
Tried selecting "Force Update of Snapshots/Releases" when updating project
Does anyone have any other ideas on what i could try?
In Eclipse, go to Windows > Preferences > Maven > User Settings
In User Settings, fill in the field with the path to settings.xml > %M2_HOME%\conf (or the correct path).
it seems like that your project doesn't install the dependency needed.
Therefore you need to install it yourself.
Download both jar and pom files from the Maven Repository and installing it using the command (better than copying to the folder directly)
mvn install:install-file -Dfile=<path-to-file> -DpomFile=<path-to-pomfile>
and also be sure that you have installed all the necessary repository for the project and cross verify in the .m2/repository folder with the jar files
I had similar error while setting up my project on new VM:
"CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to central (http://repo.maven.apache.org/maven2): connect timed out..."
Cause and Fix for this in my case :
I have apache-maven-3.2.5 installed on the system but found that
settings.xml file is missing in .M2 folder under my user name ( C:\Users\MyUserName.m2) hence above error on building the project
Steps to fix:
Step 1: Copy settings.xml from C:\Users\Public.m2 to .m2 folder under my username on the VM ( C:\Users\MyUserName.m2)
Step2: Using CMD run a clean install after navigating to the project to see if issue is fixed and project builds without error
like this :
C:\Selenium_Test_SetupB\WebUatDemo>mvn clean install
I am trying to build a project which has a following dependency
<dependency>
<groupId>org.richfaces.examples</groupId>
<artifactId>richfaces-showcase</artifactId>
<version>4.3.4.Final</version>
<classifier>jbas71</classifier>
<type>war</type>
</dependency>
While the WAR file seems to be on the right place in my local repo. Contents of .m2/repository/org/richfaces/examples/richfaces-showcase/4.3.4.Final/
richfaces-showcase-4.3.4.Final-jbas71.war
richfaces-showcase-4.3.4.Final-jbas71.war.lastUpdated
richfaces-showcase-4.3.4.Final-jbas71.war.pom
I tried to delete the *.lastUpdated file, *.war.pom seems to be ok too but I am still getting
[ERROR] Failed to execute goal on project richfaces-showcase-portlet:
Could not resolve dependencies for project org.jboss.portletbridge.examples:richfaces-showcase-portlet:war:3.3.1.Final:
Failure to find org.richfaces.examples:richfaces-showcase:war:jbas71:4.3.4.Final in
http://repo.maven.apache.org/maven2 was cached in the local repository, resolution
will not be reattempted until the update interval of central has elapsed or updates are
forced -> [Help 1]
The dependency is imply wrong, cause a war file is not intended to be a dependency. The war file is intended to be use as an example which can be deployed into a Tomcat etc. to see how it looks like etc.
Apart from that you are trying to get richfaces from Maven Central which is not possible cause Richfaces is not in Maven Central. They have their own repository. You need to add this repository to your configuration or Repository manager.
Furthermore the message:
Failure to find org.richfaces.examples:richfaces-showcase:war:jbas71:4.3.4.Final in
http://repo.maven.apache.org/maven2 was cached in the local repository, resolution
will not be reattempted until the update interval of central has elapsed or updates are
forced -> [Help 1]
shows that the dependency couldn't be downloaded. I assume the size of the war file is 0..
The Maven Error:
Failed to execute goal on project XXXXXX: Could not resolve
dependencies for project XXXXXX:XXXXXX:0.1-SNAPSHOT: Failure to find
com.oracle.ucm:idcserver:jar:11.1.1.8 in
[http://internal-proxy:8080/nexus-2.6.4/content/groups/XXXXXX] was cached
in the local repository, resolution will not be reattempted until the
update interval of internal-proxy has elapsed or updates are forced.
I have confirmed that the artifact has indeed been proxied from the external source.
Why can the local Maven build resolve the dependency in either the cloud or the intranet proxy? How can I attempt to debug such problems? I am administrator of the local Maven repository, so I can debug/change configuration suggested here.
Any insight would be welcomed.
Do you have this particular ucm jar with you ? The jar com.oracle.ucm:idcserver:jar:11.1.1.8 is not there on maven central repository and thus will never be fetched since it does not exist there on maven central.
Last I remember, you will have to manually install it in your local repository. Check this post here
Ugh, it was an improper URL in the settings.xml.
I wish the error was more transparent such as connection refused.
I'm new to Maven and JSF and I have the following problem when compiling my project:
Failed to execute goal on project ViewController: Could not resolve dependencies for project com.km.eFarmer:ViewController:war:1.0.1-alpha1-SNAPSHOT: The following artifacts could not be resolved: com.sun.faces:jsf-api:jar:2.0.3-FCS, com.sun.faces:jsf-impl:jar:2.0.3-FCS, org.openfaces:openfaces:jar:3.0.2-KM, cssparser:cssparser:jar:0.9.5, it.eng.spago:sbi-utils:jar:3.3.0: Failure to find com.sun.faces:jsf-api:jar:2.0.3-FCS in http://repo1.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of maven.maven2 has elapsed or updates are forced -> [Help 1
This is means that the artifact com.sun.faces:jsf-api:jar:2.0.3-FCS is absent in repository http://repo1.maven.org/maven2/.
Indeed, there is no jsf-api.jar with version 2.0.3-FCS in this repo.
There's a list of available versions. So, you should change artifact version, or repository url
Simple delete the folder local repository com/sun/faces and and retry it.