This question already has an answer here:
Maven package issue locally?
(1 answer)
Closed 2 years ago.
I run mvn clean package -U
And i get this error message below?
Could not resolve dependencies for project DD2480-Group-15:gs-maven:jar:0.1.0: Could not find artifact com.fasterxml.jackson.core:jackson-databind:jar:3.6 in java.net2 (http://download.java.net/maven/2)
And i have this dependcies in my pom.xml file?
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.11.1</version>
</dependency>
Is jackson deprecreated or?
I have just checked this out.
I removed that dependency from local repo and used maven to refresh the dependencies. It came without any problem. It is not the dependency the problem but the remote repo that you try to get it from.
The repository at http://download.java.net/maven/2 is deprecated, and has been replaced with https://maven.java.net/content/groups/public/
To replace your remote repository
A) If you use your downloaded version of maven then
you must find where your maven folder in your laptop exists. Then under conf/settings.xml you can configure your settings.xml
Then under mirror tag you can configure your remote repository
How to configure mirrors in maven
B) If you use a bundled version of INTELIJ for Maven then check this image of how you can configure your remote repositories
Related
I am currently working on a Java project using Maven. In my pom.xml I am getting this error.
Missing artifact org.jhotdraw:jhotdraw:jar:6.0b1
I have added this dependency
<dependency>
<groupId>org.jhotdraw</groupId>
<artifactId>jhotdraw</artifactId>
<version>7.6.0</version>
</dependency>
to my pom.xml. But still the error is same.
Can someone help me?
That version of org.jhotdraw.jhotdraw does not exist on Maven Repository, the last version available on Maven Repository is 7.4.1
Either you have made an error as to the version or group id (I see there is a 7.6.0 package under org.opentcs.thirdparty.jhotdraw, but don't know if it's the same). Alternatively, you may have to manually download and install that package, check out...
How to include custom library into maven local repository
This question already has answers here:
"cannot find symbol" error in maven
(5 answers)
Closed 4 years ago.
I am trying to package a SpringBoot project of mine to use as a library in another. I had it working somewhat but not I can't get my library classes to resolve at all.
I don't get any errors to do with the dependency in my POM file. I simply can't get to my library in my code.
I am building my package then installing it in my local Maven repo with mvn install:install-file -Dfile=myPackage.jar When I navigate to my local repo, the package is there and the pom file looks right. I bring it in to my project with
<dependency>
<groupId>com.mygroup</groupId>
<artifactId>mylib</artifactId>
<version>0.0.1</version>
</dependency>
which all matches the POM for the package in the maven repo. I update the project configuration and no issues are found in my project POM. But com.mygroup.mylib is simply not found.
It seems that Maven is finding the dependency but for some reason the classes can't be found within it.
What are some ways to get more information about where the disconnect is?
I am using spring boot 2.0.0 and VSCode 1.20.1.
Run maven command for logs to find out actual issue.
mvn clean install -X
This question already has answers here:
Oracle JDBC ojdbc6 Jar as a Maven Dependency
(15 answers)
Closed 6 years ago.
Error: Missing artifact com.oracle:ojdbc6:jar:11.2.0.3
Error shows: Missing artifact com.oracle:ojdbc6:jar:11.2.0.3
all groupId,Version, artifactId is correct
in my project this dependency is not works and i was also try to copy jar on local .m2 oracle maven repo but ,this is not still working. how to resolve this kind of errors?
Copying only the jar to local repo will not help unless you also copy the related pom files. Maven is caching files and if the file was not accessible (e.g. no internet, wrong proxy settings, etc.), maven still remembers it. So remove the cached files (remove whole the particular folder from your .m2 repo) and try to build again. If you have the connection correct and you have also defined the repository where to download the file from, you should be fine.
I'm not sure if this jar file is in maven central, try to add this to your pom.xml or maven settings file.
<repositories>
<repository>
<id>codelds</id>
<url>https://code.lds.org/nexus/content/groups/main-repo</url>
</repository>
</repositories>
add the dependency for it in your pom.xml and when you will do mvn clean install it will do that for you
Use the below maven dependency
<dependency>
<groupId>cn.guoyukun.jdbc</groupId>
<artifactId>oracle-ojdbc6</artifactId>
<version>11.2.0.3.0</version>
This question already has answers here:
How to add local jar files to a Maven project?
(35 answers)
Closed 6 years ago.
I have 50 jars that I need to add to a Maven project as dependencies. They are not in the public repository, I cannot install a local repository and I'd like to know a quick solution to add them in my pom.xml.
I know that to add a local dependency you could write
<dependency>
<groupId>sample</groupId>
<artifactId>com.sample</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/yourJar.jar</systemPath>
</dependency>
but this is simply a real long task with several Jars. Is there an easy way to do it?
The solutions suggested in How to add local jar files in maven project? are specific for a single or few Jars but not the case when you many of them.
Add those jars to your local maven repository and then add their dependency to your POM. See this link: MKYong: How to include custom library into maven local repository?
I cannot add a dependency in pom.xml for feed4j.jar
When I select a dependency for feed4j I get feed4junit but not the feed4j.
When I add a dependency in pom.xml
<dependency>
<groupId>feed4j</groupId>
<artifactId>feed4j</artifactId>
<version>1.0</version>
</dependency>
I get an error
Missing artifact feed4j:feed4j:jar:1.0
As a result when I try mvn clean install I get an error
package it.sauronsoftware.feed4j does not exist
Any help please.
Feed4j is not in the Maven central repository. You have several options:
Use a Maven repository which has the feed4j artifact available. You can set up your own Nexus or Artifactory.
Include the jar file in your project and use the maven system scope (see this SO question for an example how to use it)
Install the dependency manually in your local Maven repository. Here is a short tutorial how to do that.
Eventually, i found the answer here but feed4j is not included in the repository.jboss that's why I used the pentaho-releases.