I have a POM file
<repositories>
<repository>
<id>bedatadriven</id>
<name>bedatadriven public repo</name>
<url>https://nexus.bedatadriven.com/content/groups/public/</url>
</repository>
<repository>
<id>cloudera.repo</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos</url>
<name>Cloudera Repositories</name>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>vroc</id>
<url>http://repo.vroc.ai:8081/repository/maven-vroc/</url>
<name>VROC Repo</name>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>vroc</id>
<name>Releases</name>
<url>http://repo.vroc.ai:8081/repository/maven-vroc/</url>
</repository>
<snapshotRepository>
<id>vroc</id>
<name>Snapshot</name>
<url>http://repo.vroc.ai:8081/repository/maven-vroc/</url>
</snapshotRepository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>org.renjin</groupId>
<artifactId>renjin-script-engine</artifactId>
<version>0.8.2527</version>
</dependency>
....
when I run my project it gives below exception. I am not sure how to resolve it
[ERROR] Failed to execute goal on project mdm: Could not resolve dependencies for project ai.vroc:mdm:jar:2.0.0-SNAPSHOT: Could not find artifact org.renjin:renjin-script-engine:jar:0.8.2527 in vroc (http://repo.vroc.ai:8081/repository/maven-public/) -> [Help 1]
[ERROR]
The dependency which gives error is in "bedatadriven" repository but it can not find it. I am not sure how to resolve this error.
You need to change this to be a version in your maven repo
<version>0.8.2527</version>
You will need to browse through http://repo.vroc.ai:8081/repository/maven-public yourself since this is not public (at least to me)
Go to org > renjin > renjin-script-engine, then see what versions are there if any
Related
I'm using Intellij IDEA and I have a simple spring boot app.
I'm getting this error when I've imported the pom.xml
Cannot resolve ch.qos.logback:logback-core:1.2.3
Screenshot of the pom.xml :
Add maven central repositories in your pom.xml. This looks missing in the image which you have shared.
<repositories>
<repository>
<id>central</id>
<name>Maven Central</name>
<layout>default</layout>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
There is a private artifact being imported to a maven project. The artifact is being stored in a folder named repository. Was using f/w snippet to import the dependency
<repositories>
<repository>
<id>local-repo</id>
<url>file://${basedir}/repository</url>
</repository>
</repositories>
The project was last built on December, 2019 using Apache Maven 3.3.9. Now the build is throwing following error:
[ERROR] Failed to execute goal on project target-jar: Could not resolve dependencies for project a.package:target-jar:jar:0.0.1-SNAPSHOT:
Failed to collect dependencies at private.package:private-artifact:jar:1.1.1:
Failed to read artifact descriptor for private.package:private-artifact:jar:1.1.1:
Could not transfer artifact private.package:private-artifact:pom:1.1.1 from/to central-backup (http://repo.maven.apache.org/maven2):
Failed to transfer file: http://repo.maven.apache.org/maven2/private/package/private-artifact/1.1.1/private.package:private-artifact-1.1.1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1]
Tried f/w solution but no luck.
New repo info in pom.xml:
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>local-repo</id>
<url>file://${basedir}/repository</url>
</repository>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
I've got maven project with local dependencies, which doesn't compile because this 'improvement', introduced by maven:
Effective January 15, 2020, The Central Repository no longer supports
insecure communication over plain HTTP and requires that all requests
to the repository are encrypted over HTTPS.
Here is my pom.xml:
...
<repositories>
<repository>
<id>in-project</id>
<name>In Project Repo</name>
<url>file://${project.basedir}/libs</url>
</repository>
</repositories>
...
So now I'm receiving the following compile error:
Could not resolve dependencies for project ........:war:1.0: Failed to
collect dependencies for [.........:jar:1.0 (compile),
javax:javaee-web-api:jar:7.0 (provided), .........:jar:1.0
(compile)]: Failed to read artifact descriptor for
.........:jar:1.0: Could not transfer artifact
.........:pom:1.0 from/to central
(http://repo.maven.apache.org/maven2): Failed to transfer file:
http://repo.maven.apache.org/maven2/com/..../..../1.0/.....-1.0.pom.
Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1]
As you can see I'm using local jar file, but this doesn't compile anymore
Does anyone have idea how to configure local repository for successful compilation?
The Maven server do not support HTTP anymore. You must configure the maven repositories with HTTPS url's in your local maven configuration file, in your home folder yourname/.m2/settings.xml.
Here is an example that you may copy:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<profiles>
<profile>
<id>artifactory</id>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>https://repo1.maven.org/maven2/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>https://repo1.maven.org/maven2/</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshot</name>
<url>https://repo1.maven.org/maven2/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>
This question already has answers here:
How to add local jar files to a Maven project?
(36 answers)
Closed 7 years ago.
I have to include fixedformat4j-root dependency in my pom.xml.
I get artifact info (group, version, ...) from the pom.xml of the project homepage:
https://github.com/jeyben/fixedformat4j/blob/master/pom.xml
When I store that info to my pom.xml, I got this error from m2e eclipse plugin:
Missing artifact
com.ancientprogramming.fixedformat4j:fixedformat4j-root:jar:1.4.0-SNAPSHOT
This is my pom.xml
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
...
<dependencies>
...
<dependency>
<groupId>com.ancientprogramming.fixedformat4j</groupId>
<artifactId>fixedformat4j-root</artifactId>
<version>1.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray</id>
<url>http://jcenter.bintray.com</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<build>
...
</build>
<reporting>
...
</reporting>
</project>
How can I solve this error? Should I set a new repository? Where can I find the repository url from the project pom.xml?
Neither of the repositories you've listed in your POM contain that version of that artifact. They each contain several release versions, but no snapshots.
Looking at the source for this artifact it does appear to be at version 1.4.0-SNAPSHOT but that version has not been deployed to a repository. Either build it yourself locally (via mvn clean install) or reference one of the versions in the given repositories.
How to add repository/repositories to "Indexed Maven Repositories" in IntelliJ IDEA 13?
Create a simple Maven project by IntelliJ IDEA:
Choose "Enable Auto-Import"
Then, add these to pom.xml:
<repositories>
<repository>
<id>codehausSnapshots</id>
<name>Codehaus Snapshots</name>
<releases>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>http://snapshots.maven.codehaus.org/maven2</url>
<layout>default</layout>
</repository>
</repositories>
Come back to Settings (Ctrl + Alt + S), "Indexed Maven Repositories" section updated:
Add this repisitory to settings.xml in maven:
<project>
<repositories>
<repository>
<id>my-internal-site</id>
<url>http://myserver/repo</url>
</repository>
</repositories>
</project>