Jenkins build failed: Could not find dependency version in maven remote repo - maven

I created a new version in the one project, the version is x.xx.x-SNAPSHOT and used in another project as an external library then pushed it. now Jenkins build is failed.
it's saying that this new dependency is not found in my company repo. I don't have an idea how to fix this.
ERROR: The POM for jar: X.XX.X-SNAPSHOT is missing, no dependency information available
Could not find artifact :jar: X.XX.X-SNAPSHOT in artifactory (maven.xx.xx/repo)
could you please help me?
Thank you

It's fixed now. the problem was, i haven't upload new version in maven remote repo(my company repo). now I did mvn deploy. then it's uploaded and jenkins found the needed dependency.

Related

AEM Mocks missing artifact for latest version

I have added the latest version of AEM Mocks (2.7.2) as a Maven dependency in my AEM project. When I try to build my project, I get an error saying that this artifact cannot be found: com.day.commons:day-commons-gfx:jar:2.1.28. So I looked online, found it and added it as a dependency. But now I get the same error when trying to build. Does this artifact still exist? When trying various recent versions of AEM Mocks, I found that they all depend on this missing artifact.
For now, I downgraded to version 2.3.0, which works fine without that artifact but I would like to use the most recent version if possible.
Can anyone please help? Thanks!
This artifact is defined as a workaround, it is explained here in comment:
https://github.com/wcm-io/wcm-io-testing/blob/develop/aem-mock/core/pom.xml#L254:
Workaround for AEM 6.5: The new uber-jar does no longer contain the package com.day.imageio.plugins
It works without any issues for me, so I would check if you have correctly configured Maven repositories. To do it, in your Maven project root type:
mvn help:evaluate
and then:
${project.repositories}
It should list your project effective repositories. Ensure that there is Central Repository (https://repo.maven.apache.org/maven2/) listed. If it is there, then maybe your corporate network cuts requests to external repositories or it was temporarily down.

Integrate the local maven plugin with remote repository

I have created a simple maven plugin and installed it in my local repo(.m2). Now I want to use that plugin with a git repo(maven project). How can I do that?
Currently, I am trying to build my git repo using Jenkins and it throws below error-
[ERROR] Plugin sample.plugin:hello-maven-plugin:0.0.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact sample.plugin:hello-maven-plugin:jar:0.0.1-SNAPSHOT
I believe simply changing the pom file of my git repo won't work. What should I do so that it resolves the plugin dependency by looking into the .m2 dir first
Your Jenkins probably deploys to a Nexus or Artifactory server. That server is also the right place to manage your plugin.

Can not build the project after upgrading to mule version 3.8.4 to 3.7.4

Previously I was building the project with the mule version 3.7.4. now, as mule version 3.8.4 is the latest one, so planned to build with this latest version. So,
from Anypoint Studio I have downloaded the latest version.
Then I updated my POM file with the 3.8.4 version. But it seems that with the same jars its not able to build the project.
Its gives error as
Failed to execute goal on project sho-pointofsales: Could not resolve dependencies for project com.sho:sho-pointofsales:mule:1.0-SNAPSHOT: Failed to collect dependencies at com.mulesoft.muleesb.modules:mule-module-tracking-ee:jar:3.8.4: Failed to read artifact descriptor for com.mulesoft.muleesb.modules:mule-module-tracking-ee:jar:3.8.4: Could not transfer artifact com.mulesoft.muleesb.modules:mule-module-tracking-ee:pom:3.8.4 from/to mule-ee-releases (https://repository-master.mulesoft.org/nexus/content/repositories/releases-ee/): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1]
Although I placed this jar inside my local REPO. Don't know what is wrong I am doing.
Thanks in advance.
It exists: https://repository.mulesoft.org/nexus/content/repositories/releases-ee/com/mulesoft/muleesb/modules/mule-module-tracking-ee/
check your username and password in your settings.xml or pom etc for that repo.
But it's part of the platform anyway and doesn't need to be explicit in your pom. So just remove it from the pom or set it the scope to 'provided' on the dependency
Check following stuff:
a. You can either comment the enterprise repository in the pom.xml file.
b. Check if the enterprise repository is accessible from your browser.
c. verfiy username and password.

Error downloading artifacts from Maven

I sincerely apologize that I'm not able to copy a stacktrace, but my work is on a private network. On that network is also my Maven repository. We're trying to upgrade to Grails 2.4.3, but the Maven build fails when downloading several of the required jars.
All other jars are downloaded from my private mirror as specified, but for these particular jars, Maven tries to go out to the central repo, which I cannot access. I checked my private repo and those jars with their poms are there. My BuildGroovy.config has the right localRepo specified also.
What's making Maven suddenly connect to repo.maven.apache.org?? I should add that we don't have this problem when upgrading to Grails 2.4.2. That causes another problem (looking for groovy-all-2.4.2?) forcing us to use 2.4.3.
Thanks for ANY help.

Maven cannot find richfaces 3.3.x in Central repo

I am trying to follow this tutorial:
http://docs.jboss.org/richfaces/latest_3_3_X/en/cdkguide/html_single/
I am hitting a roadblock with the maven commands.
First the org.richfaces.cdk version 3.3.3.Final was not found in the central repository, so I had to manually install version 4.2.2.Final to my local repository by downloading the file maven-richfaces-resources-plugin-4.2.2.Final.jar
I then had to manually install the org.richfaces.cdk plugin to my local respository.
Next, to run the command in section 4.1. I had to change archetype:create to archetype:generate. Running this command showed that maven couldn't find META-INF/archetype.xml in the jar file. I am stuck at this point. Any pointers?
Per this thread, that version of richfaces is in the JBoss Maven Repo, not Central
https://community.jboss.org/thread/172034?_sscc=t
In general, Software Vendors maintain their own Maven repos and do not push out every release to Central. SpringSource, Atlassian, and Oracle (java.net) come to mind.
Archetypes are dependencies just like project dependencies / plugins, so you will likely need to add the JBoss repository to your pom.xml or settings.xml in order for the archetype to work. See the above link for how to do that.
I figured it out! noahz's answer helped but wasn't the complete solution. I am still going to accept his answer. After substituting the Atlassion repo for the Jboss maven repo in settings.xml, I was still seeing the 'BUILD FAILURE' error saying it couldn't find the richfaces artifact. Maven was still looking in the central repo not in the Atlassian repo. So after a bit of research found that the central repo could be overriden with a tag. Follow this link:http://maven.apache.org/guides/mini/guide-mirror-settings.html.
Build is now successful.

Resources