Unable to download maven dependencies in intellij - maven

When I try to download maven dependencies using mvn clean install in intellij
facing this issue.
[ERROR] Failed to execute goal on project IAPORTAL: Could not resolve dependencies for project SAMPLE:SAMPLE:war:${bambooBuildNumber}: Failed to collect dependencies at or
g.drools:drools-compiler:jar:6.0.1.Final: Failed to read artifact descriptor for org.drools:drools-compiler:jar:6.0.1.Final: Could not transfer artifact org.jboss.dashboard-bu
ilder:dashboard-builder-bom:pom:6.0.1.Final from/to mvn repository (https://mvnrepository.com/): authorization failed for https://mvnrepository.com/org/jboss/dashboard-builder/dashboard-builder-bom/6.0.1.Final/dashboard-builder-bom-6.0.1.Final.pom, status: 403 Forbidden -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
How can we resolve this?

Your dependency seems to be wrong.
Check out https://mvnrepository.com/artifact/org.jboss.dashboard-builder/dashboard-builder-bom/6.0.1.Final to see how to properly set your dependency.
Your pom should contain this dependency
<dependency>
<groupId>org.jboss.dashboard-builder</groupId>
<artifactId>dashboard-builder-bom</artifactId>
<version>6.0.1.Final</version>
<type>pom</type>
</dependency>

Related

How to solve the dependencies of building ignite 2.8 source code?

I am trying to build ignite 2.8 in windows 10, my java version is 1.8, and maven 3.8.5.
I build source code with the command below:
mvn clean install -P all-java,all-scala,licenses -DskipTests -D maven.javadoc.skip=true.
It failed and showed that:
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ignite-jta: Could not resolve dependencies for project org.apache.ignite:ignite-jta:jar:2.8.0: Failed to collect dependencies at org.ow2.jotm:jotm-core:jar:2.2.3 -> org.ow2.carol:carol:jar:3.0.8 -> org.jacorb:jacorb:jar:2.2.3-jonas-patch-20071018: Failed to read artifact descriptor for org.jacorb:jacorb:jar:2.2.3-jonas-patch-20071018: Could not transfer artifact org.jacorb:jacorb:pom:2.2.3-jonas-patch-20071018 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [apache.snapshots (http://repository.apache.org/snapshots, default, snapshots), ow2-snapshot (http://repository.ow2.org/nexus/content/repositories/snapshots, default, snapshots), ow2 (http://maven.ow2.org/maven2, default, releases)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :ignite-jta
I have checked that the jar file of org.jacorb:jacorb:pom:2.2.3-jonas-patch-20071018 is no longer maintained in maven central and i cannot find its backup anywhere. I am not sure how to deal with that.

Build Failed in Azure devops

I'm beginner for this in azure devops.
I'm trying to build with maven, but I got the following error that I don't understand :
[ERROR] Failed to execute goal org.codehaus.mojo:cobertura-maven-plugin:2.7:instrument (package-9af52907-6506-4b87-b16a-9883edee41bc) on project gs-spring-boot: Execution package-9af52907-6506-4b87-b16a-9883edee41bc of goal org.codehaus.mojo:cobertura-maven-plugin:2.7:instrument failed: Plugin org.codehaus.mojo:cobertura-maven-plugin:2.7 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:0 at specified path /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/../lib/tools.jar -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
You are missing tools.jar in your JDK/JRE. Make sure your JDK version on Azure Pipeline. It seems Cobertura doesn't support Java 1.8 and later:
https://github.com/mojohaus/cobertura-maven-plugin/issues/30
https://github.com/mojohaus/cobertura-maven-plugin/issues/21
So, switch to JaCoCo.

maven can't download jar from nexus

There are some mistanken
[ERROR] Failed to execute goal on project vinsuan-road-platform-comm: Could not resolve dependencies for project com.vinsuan.road.paltform:vinsuan-road-platform-comm:jar:1.0-SNAPSHOT: Failed to collect dependencies at com.vinsuan4cloud:vinsuan-common-core:jar:1.0.0: Failed to read artifact descriptor for com.vinsuan4cloud:vinsuan-common-core:jar:1.0.0: Failure to find com.vinsuan4cloud:vinsuan:pom:1.0.0 in http://xxx.xxx.xxx.xxx:9981/repository/sps_group/ was cached in the local repository, resolution will not be reattempted until the update interval of sps_group has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :vinsuan-road-platform-comm`enter code here`
http://xxx.xxx.xxx.xxx:9981 is out company nexus url,So i'am sorry。
then i found some similar problems,their answer are version not match,however,vinsuan-common-core.jar only one version,So i don't know what,i use some operations,such as clean 、compile、install、mvn dependeny:sources,but ide point the mistaken。
The error says Failure to find com.vinsuan4cloud:vinsuan:pom:1.0.0. There should be a pom file beside the jar in the repo in order maven will able to resolve the dependency

Maven says archetype does not exist

I am trying to create a JPA based project using Maven and eclipse. I tried using the jpa-maven-archetype from create new maven project in the eclipse project creation, but it shot back this error
Could not resolve archetype com.rfc.maven.archetypes:jpa-maven-archetype:RELEASE from any of the configured repositories.
Could not resolve artifact com.rfc.maven.archetypes:jpa-maven-archetype:pom:RELEASE
Failed to resolve version for com.rfc.maven.archetypes:jpa-maven-archetype:pom:RELEASE: Could not find metadata com.rfc.maven.archetypes:jpa-maven-archetype/maven-metadata.xml in local (/home/sebastian/.m2/repository)
Failed to resolve version for com.rfc.maven.archetypes:jpa-maven-archetype:pom:RELEASE: Could not find metadata com.rfc.maven.archetypes:jpa-maven-archetype/maven-metadata.xml in local (/home/sebastian/.m2/repository)
Basically the eclipse plugin is looking into my local repositories instead of remote ones. So I tried going the command line and explicitly specifying the remote repository with the following command
mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create \
-DgroupId=com.something -DartifactId=jpaexample \
-DarchetypeArtifactId=jpa-maven-archetype \
-DarchetypeVersion=RELEASE \
-DremoteRepositories=http://maven.rodcoffin.com/repo \
-DinteractiveMode=false
And I got this error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create (default-cli) on project standalone-pom: Error creating from archetype: Error attempting to download archetype. Error downloading. Failed to resolve version for org.apache.maven.archetypes:jpa-maven-archetype:jar:RELEASE: Could not find metadata org.apache.maven.archetypes:jpa-maven-archetype/maven-metadata.xml in local (/home/sebastian/.m2/repository)
[ERROR] org.apache.maven.archetypes:jpa-maven-archetype:jar:RELEASE
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] id0 (http://maven.rodcoffin.com/repo, releases=true, snapshots=true)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
It seems that repo maven.rodcoffin.com/repo is not working, or there is something wrong with my maven setup. I am not sure which one, if some one could give me pointers on where to search for, that would be helpful.
Also if repo maven.rodcoffin.com/repo is not working. What are my other options to create a JPA archetype project. Do I have to make a simple maven project and then convert it to a JPA as shown here.
EDIT: I just weaseled out of the problem by creating a maven quick type achetype and then using the persistence.xml for my project.
So just ignore this question.

maven project running problem

How To resulve this problem
i have update my java version to java6u23 but it will still create problem so what should i do
i dont know much more about maven
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MultipleArtifactsNotFoundException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :mediaPlayer
You appear to be missing a dependency for jna-3.2.4
This isn't available on the central maven repo http://repo1.maven.org/maven2/net/java/dev/jna/jna/
But you can find it in the java.net repo http://download.java.net/maven/2/net/java/dev/jna/jna/3.2.4/
Make sure that you have the java.net repo defined to your maven build.
This can be done iether in your pom, or in the settings.xml in your user home/.m2 directory.

Resources