Maven complains about dependency to a WAR file - java

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..

Related

Intellij Maven dependency not resolved while following guide

I am currently trying to follow this guide and every time I try to run the test code I am getting this error:
[ERROR] Failed to execute goal on project MyBot: Could not resolve
dependencies for project org.example:MyBot:jar:1.0-SNAPSHOT:
org.javacord:javacord:jar:3.4.0 was not found in
https://repo.maven.apache.org/maven2 during a previous attempt. This
failure was cached in the local repository and resolution is not
reattempted until the update interval of central has elapsed or
updates are forced -> [Help 1]
pom.xml
Maybe you have to load the dependencies you added to the pom.xml.
in IntelliJ you can right click on your pom.xml chose maven -> reload Project.
This loads all dependencies from pom.xml.
Check the console output for any errors.
Should the answer from Kaspatoo not working for you you can try to add the repository from Javacord to your project.
I figured it out, maven had downloaded the jars for the Dependency but wasn't loading them, I pointed maven to them in the system directory, and its working now

Project build error: Non-resolvable parent POM for

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.

Maven dependency for javaplanner not resolving

I have a dependency for javaplanner in my project:
<dependency>
<groupId>javaplanner</groupId>
<artifactId>javaplanner</artifactId>
<version>1.5</version>
</dependency>
I am having an issue when building the project, giving error not able to resolve the dependency:
Failure to find javaplanner:javaplanner:jar:1.5
in https://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]
I tried to search the javaplanner dependency in the mvn repository, but its missing there.
How can I resolve this issue? Appreciated!!!!
javaplanner does not exist in Maven Central and does not appear to exist in any other public Maven repository. It has also been discontinued and is no longer downloadable from its provider if it is as I suspect "DHTMLX JavaPlanner" - see https://dhtmlx.com/blog/javaplanner-full-featured-scheduler-for-java/.
To resolve this issue you'll need to download the dependency's JAR file from a third-party site, verify that the downloaded JAR is what used to be available from dhtmlx.com and install the JAR as the javaplanner:javaplanner dependency in your local (or private shared - e.g. Nexus, Artifactory, JFrog - see https://maven.apache.org/repository-management.html) Maven repository. See DHTMLX JavaPlanner maven dependency for more on the local install process.

Maven pom.xml missing dependency error: artifacts could not be resolved

This error won't go away even after many 'mvn clean install' and reimport pom.xml's
[ERROR] Failed to execute goal on project foo:
Could not resolve dependencies for project be.foo:foo:jar:2.0-SNAPSHOT:
The following artifacts could not be resolved:
org.neo4j:neo4j-spatial:jar:0.12-neo4j-2.0.4,
diff_match_patch:diff_match_patch:jar:current:
Failure to find org.neo4j:neo4j-spatial:jar:0.12-neo4j-2.0.4 in
https://repo.spring.io/libs-release was cached in the local repository,
resolution will not be reattempted until the update interval of spring-releases has elapsed or updates are forced -> [Help 1]
eventhough the pom clearly has the dependency:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-spatial</artifactId>
<version>0.12-neo4j-2.0.4</version>
</dependency>
Weirdest thing is I don't even think I need this in my project, it just started complaining about it.
So far I'm guessing that it has to do with some sort of version mismatch?
"diff_match_patch" etc
If you go to the URL thart´s shown in your logs, you´ll see that library is not there. You probably need to change the version or set up a different repo.

Java, Maven dependencies

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.

Categories