Artifact missing error when I add jar file in Maven - maven

I use maven to manage my jar files in my project.Firstly ,I download the org.apache.mrunit of version 0.8.0-incubating.But I find that it is not compatiable with my project so I remove it and what to re-download a 1.0.0 version.But I cannot download the version 1.0.0. Error message in eclipse is:
[ERROR] Failed to execute goal on project MapReducer: Could not
resolve dependencies for project
org.MapReducer1.0.0:MapReducer:jar:0.0.1-SNAPSHOT: Failure to find
org.apache.mrunit:mrunit:jar:1.0.0 in
http://repo.maven.apache.org/maven2 was cached in the local
repository, resolution will not be reattempted until the update
interval of central has elapsed or updates are forced -> [Help 1]
But when I search mrunit online ,I can get the version list:
But when I search it in my pom.xml of eclipse , I can only get the version 0.8.0-incubating:
Anyone can help me?

I know this is a rather old question, but I just encountered the same problem. I resolved it by adding a classifier, as indicated on the Apache MRUnit Tutorial page
<dependency>
<groupId>org.apache.mrunit</groupId>
<artifactId>mrunit</artifactId>
<version>1.1.0</version>
<classifier>hadoop2</classifier>
</dependency>
User hadoop1 if you are using an older version of hadoop.

Related

maven unable to resolve dependencies when using version ranges

I am using maven 3.x.x and trying to use versions ranges in my pom.xml and it never worked. I tried version-ordering suggested by maven and getting the order as expected on my terminal. But when running maven compile, always getting error as below
Failed to execute goal on project test-client: Could not resolve dependencies for project com.abc.def:test-client:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at development.com.abc.test:my-service:jar:jar:[1.0.211006-mr424,1.0.211014-mr427]: No versions available for development.com.abc.test:my-service:jar:jar:[1.0.211006-mr424,1.0.211014-mr427] within specified range -> [Help 1]
But if I use the fixed version in my pom.xml, things start working.
my pom.xml:
<dependency>
<groupId>development.com.abc.test</groupId>
<artifactId>my-service</artifactId>
<version>[1.0.211006-mr424, 1.0.211014-mr427]</version>
<classifier>jar</classifier>
</dependency>
PS : the artifact uploaded for my-service does not contain maven-metadata.xml in the repository.
The end goal I am trying to achieve is to resolve dynamic dependencies

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.

Mule Server 3.7.0 error: "Failure to find com.mulesoft.weave:mule-plugin-weave_2.11:jar:3.7.0"

I am trying to build a mule app with Maven using Mule Server 3.7.0 EE.
I'm erroring out when trying to add to my app the Data-weave Transformer.
I added to my pom.xml file this dependency:
<dependency>
<groupId>com.mulesoft.weave</groupId>
<artifactId>mule-plugin-weave_2.11</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
but I am getting this error:
[ERROR] Failed to execute goal on project project370: Could not resolve dependencies for project com.test:project370:mule:1.0.0-SNAPSHOT: Failure to find com.mulesoft.weave:mule-plugin-weave_2.11:jar:3.7.0 in http://repo1.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of Central has elapsed or updates are forced -> [Help 1]
Any ideas how to fix?
try doing mvn install -U where -U would force your maven dependencies to be updated.
If you are using the maven m2 plugin for eclipse you can right click on your project Maven -> Update Project make sure that "Force Update of Snapshots/Releases" is enabled then click OK.
Also check this link for the documentation on configuring your repository properly.

SpringToolSuite : Faliure to transfer org.apache.maven.diagnostics:pom:2.0.6

I Have recently installed newest Spring Tool Suite 3.4.0 RELEASE.
I wanted to create project by: new->spring project -> Spring MVC Project. Unfortunatly after template is created and built I got error in my pom.xml which says:
Failure to transfer org.apache.maven:maven-error-diagnostics:pom:2.0.6
from http://repo.maven.apache.org/maven2 was cached in the local
repository, resolution will not be reattempted until the update
interval of central has elapsed or updates are forced. Original error:
Could not transfer artifact
org.apache.maven:maven-error-diagnostics:pom:2.0.6 from/to central
(http://repo.maven.apache.org/maven2): connection timed out to
http://repo.maven.apache.org/maven2/org/apache/maven/maven-error-diagnostics/2.0.6/maven-error-diagnostics-2.0.6.pom
I have internet connection and all repo which are included in pom.xml are downloaded.
When I run my project on the tomcat server vfabric project is being deployed and I get my Hello World working.
What should I do to avoid error I am getting?
This seems to be an issue while getting updates from maven repo.
I use these steps to resolve such issues -
Make sure you are not on a vpn or using proxy.
Right click on project -> Maven -> update project - check "Force update snapshots and releases"
If that does not work,
Go to your .m2 folder under your user. Inside that you will find a repository folder, rename or delete that and update your project again with the above steps. STS will refresh workspace and download all the jars again from maven repo.
Also try replacing your maven error diagnostics dependency to the latest version using this
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-error-diagnostics</artifactId>
<version>2.2.1</version>
</dependency>
In case if you must use a proxy, then you will have to configure the settings file
Here is the documentation -
http://maven.apache.org/guides/mini/guide-proxies.html

What is the proper Maven repository for Apache Karaf 2.2.10?

I'm upgrading my build from Karaf 2.2.2 to 2.2.10 and have a problem finding one artifact:
Can't resolve bundle org.apache.karaf:org.apache.karaf.management:jar:2.2.10:
Failure to find org.apache.karaf:org.apache.karaf.management:jar:2.2.10
in http://repo1.maven.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central
has elapsed or updates are forced
This is declared in karaf-standard-features.xml of Karaf 2.2.10 tarball in karaf-framework feature:
<bundle>mvn:org.apache.karaf/org.apache.karaf.management/2.2.10</bundle>
I've noticed that this artifact is not present in main Maven repo:
http://mvnrepository.com/artifact/org.apache.karaf/org.apache.karaf.management
But I have no idea where else would I find it?
Please point me to a proper Maven repo for this one.
It seems that group id and artifact id have been changed (see here):
<dependency>
<groupId>org.apache.karaf.management</groupId>
<artifactId>org.apache.karaf.management.server</artifactId>
<version>2.2.10</version>
</dependency>

Resources