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
Related
I am trying to run a Spring Project, with several dependencies, that I have already downloaded into my local repository, and have also done followings :
Added local repository path in setting.xml in localRepository tag.
Running the project using mvn install -nsu -llr -o , for offline mode.
And I am getting following error :
[ERROR] Failed to execute goal on project file2Json: Could not resolve
dependencies for project
com.nse.file2Json:file2Json:jar:0.0.1-SNAPSHOT: Cannot access central
(http://repo1.maven.org/maven2) in offline mode and the artifact
com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.8.4 has
not been downloaded from it before. -> [Help 1]
I have the dependency installed, take a look :(
I have following questions :
Why is the project is trying to look into http://repo1.maven.org/maven2 when I am using offline mode ?
How can I run the project offline, by providing the required dependencies at required paths ?
Please help !
thanks in advance.
It says it cannot access Maven Central because you are in offline mode. And it tries to look there, because ´jackson-dataformat-csv` is not in your local repository, so Maven needs to get it from somewhere (and Maven Central is the default repository).
What you need to do is to execute mvn dependency:go-offline before you switch to the offline mode. This will download everything that you need (dependencies, transitive dependencies as well as plugins).
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.
I have a maven project from Github, I fork it, and then I imported it to eclipse. It contains three maven modules. I added a fifth one.
Now I want to add this fifth (new) as a dependency to one of the previous modules.
I did the install in maven, and I got the jar located in my local repository. now when I added a dependency to a one of the previous modules, i got error that my new models doesn't exist in the public dependency. I mean:
Failed to execute goal on project moquette-broker: Could not resolve dependencies for project org.eclipse.moquette:moquette-broker:jar:0.7: Failure to find org.eclipse.moquette:moquette-configurationmanager:jar:0.7 in https://repo.eclipse.org/content/repositories/paho-releases/ was cached in the local repository, resolution will not be reattempted until the update interval of Paho Releases has elapsed or updates are forced -> [Help 1]
my question is how can I tell eclipse to search in my local repository as well?
I tried to upload my dependency to a public repository but it doesn't make any sence now because i am still developing
could you help please
the jar in my local repository
this is what i put in the pom in order to call my new module
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>moquette-configurationmanager</artifactId>
<version>${project.version}</version>
<scope>Test</scope>
</dependency>
and the image that i published is my local repository, because i can see that from my eclipse, like this:
After reading the first 28 comments and responses to your question, I still cannot imagine the cause of this strange error, so you'll have to debug it a bit more:
Two recommendations to debug the Maven build:
Whatever test you run, execute mvn --debug <phase> and analyze carefully the produced log.
Run mvn dependency:build-classpath to ask Maven where are the downloaded libraries referenced in the classpath.
I upgrade to Grails 2.4.2 because that supposedly fixes a bug with the maven plugin that caused it to generate a bad pom.xml file. Now, when I try to run the 2.4.2-generated pom with mvn clean install I get the following error message:
[ERROR] Failed to execute goal
org.grails:grails-maven-plugin:2.4.2:maven-compile
(default-maven-compile) on project PROJECT : Failed to create
classpath for Grails execution. Failure to find
org.codehaus.groovy:groovy-all:jar:2.4.2 in https://REPO was cached in
the local repository, resolution will not be reattempted until the
update interval of nexus has elapsed or updates are forced -> [Help 1]
Groovy 2.4.2 obvious doesn't exist since 2.3.X is the latest release. How do I force the maven plugins to take 2.3.2's groovy-all package as the dependency to use for Groovy?
Solution: it was a bug in the Maven plugin. I sent a code fix to the owner.
Update: I sent a bug fix that was incorporated into Grails. The new dependency is org.grails:grails-maven-plugin:2.4.3. You should update your Grails BuildConfig and the pom file (or regenerate it).
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.