Error in pom.xml when adding sauce labs dependencies - maven

I am getting errors when I add sauce labs dependency in my pom xml.
<dependency>
<groupId>com.saucelabs</groupId>
<artifactId>sauce_testng</artifactId>
<version>1.0.19</version>
</dependency>
Is any one seeing the same issue?

The artifact is stored in the Sauce Labs Maven repository, can you add the following into your pom.xml file?
<repositories>
<repository>
<id>Sauce Maven Repository</id>
<url>https://repository-saucelabs.forge.cloudbees.com/release</url>
</repository>
</repositories>

The artifact that you are referring to is not in central. Are you sure that you have the info?
I have found this info
<dependency>
<groupId>com.saucelabs</groupId>
<artifactId>sauce-rest-api</artifactId>
<version>1.1</version>

Related

How can I use Maven locations in Eclipse Target files that come from custom repositories

I am trying to use a maven location in a Tycho build, that comes from a different repository than maven central. Below is the part of the definition that provides this on PDE. Tycho does not seem to honour the repository declaration and fails on resolution. Assuming I am observing this correctly, I have the following
Question: How can I hint Tycho to understand that these maven coordinates should be obtained from the associated repositories?
If this is not a current feature, but there is an issue, please comment as well, so this can be found and tracked.
<location includeDependencyScope="compile" includeSource="true" missingManifest="generate" type="Maven">
<dependencies>
<dependency>
<groupId>com.github.amlorg</groupId>
<artifactId>amf-api-contract_2.12</artifactId>
<version>5.0.2</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.raml</groupId>
<artifactId>webapi-parser</artifactId>
<version>0.5.0</version>
<type>jar</type>
</dependency>
</dependencies>
<repositories>
<repository>
<id>mulesoft.releases</id>
<url>https://repository-master.mulesoft.org/nexus/content/repositories/releases</url>
</repository>
<repository>
<id>mulesoft.public</id>
<url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
</repository>
</repositories>
</location>

mvn- look for wrong url in maven repositories

When I run mvn package to compile a maven project it downloads the jar file from
wrong URLs. It adds org/dnosproject/ to the URL which is wrong.
Downloading: https://mvnrepository.com/artifact/io.github.dnos-project/dnos-lib-all/org/dnosproject/onos-port-protobuf/1.1.5/onos-port-protobuf-1.1.5.jar
<repositories>
<repository>
<id>dnos-lib-all</id>
<name>dnos-lib</name>
<url>https://mvnrepository.com/artifact/io.github.dnos-project/dnos-lib-all</url>
<layout>default</layout>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.github.dnos-project</groupId>
<artifactId>dnos-lib-all</artifactId>
<version>1.1.5</version>
</dependency>
The website mvnrepository.com is a kind of search engine across multiple real Maven repositories. If you look at the link you mentioned in your <repository/> configuration, you'll notice they list that dependency as available in "Central", in fact here. "Central" is configured by default, so you don't need a <repository/> configuration for this dependency. Instead, you just need the correct <dependency/> entry:
<dependency>
<groupId>io.github.dnos-project</groupId>
<artifactId>dnos-lib-all</artifactId>
<version>1.1.5</version>
</dependency>
You already had this in the snippet you posted, so just removing the <repository/> configuration should do the trick.

Missing artifact de.jetwick:snacktory:jar:1.1-SNAPSHOT

I am trying to use snacktory thus I have the following in my pom.xml file:
<!-- ... -->
<dependencies>
<!-- ... -->
<dependency>
<groupId>de.jetwick</groupId>
<artifactId>snacktory</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>snacktory_snapshots</id>
<url>https://github.com/karussell/mvnrepo/tree/master/snapshots/de/jetwick/snacktory/</url>
</repository>
</repositories>
</project>
However, I am getting
Missing artifact de.jetwick:snacktory:jar:1.1-SNAPSHOT
in Eclipse from the Maven build. I've tried, as in another question stated 1.2 and 1.3 as well but the result is the same.
Why am I not able to get this dependency?
If you look on their github repository (used as a maven repository), they provide the repository url to use : https://github.com/karussell/mvnrepo
Change the repository to:
<repository>
<id>snacktory_snapshots</id>
<url>https://github.com/karussell/mvnrepo/raw/master/snapshots</url>
</repository>
Use the release instead
I would advise you to use their release version instead:
<repository>
<id>snacktory_releases</id>
<url>https://github.com/karussell/mvnrepo/raw/master/releases</url>
</repository>
with the dependency:
<dependency>
<groupId>de.jetwick</groupId>
<artifactId>snacktory</artifactId>
<version>1.2</version>
</dependency>

Zoho Java library

I found this link for Zoho Java library:
https://github.com/zoho/projects-java-wrappers
<dependency>
<groupId>com.zoho.projects</groupId>
<artifactId>projects-java</artifactId>
<version>1.0</version>
</dependency>
Where I can find public repository where this jar file is hosted?
It seems there is no public repository for the project. Here Hosting a Maven repository on github you can read more about github as maven repository.
I chosen a JitPack approach and I checked that solution described on https://jitpack.io/#zoho/projects-java-wrappers/ac2b31602f works.
JitPack is kind of self release maven repository
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
and
<dependency>
<groupId>com.github.zoho</groupId>
<artifactId>projects-java-wrappers</artifactId>
<version>ac2b31602f</version>
</dependency>

Apache Airavata dependency in Maven

I'm building a Java application which has a dependency on the Apache Airavata project. I can get it up and running by putting all dependency jar's on the classpath but I have problems setting up the project using Maven.
Problem seems to be some maven repositories are not available. I tried this a couple of months ago with the same result.
Update
I got an answer on the Airavata mailing list that they were aware of the problem, that they supposedly had fixed it and are planning to work away away the dependency. Still, the server does not seem to work:
http://markmail.org/search/+list:org.apache.airavata.users#query:%20list%3Aorg.apache.airavata.users+page:1+mid:y37nleni7hocoftg+state:results
Anyhow, I have now realized that I should use airavata-messenger-client, and that is possible to use with maven with the following dependencies:
<dependency>
<groupId>org.apache.airavata</groupId>
<artifactId>airavata-messenger-client</artifactId>
<version>0.5</version>
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
<artifactId>airavata-messenger-commons</artifactId>
<version>0.5</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-local</artifactId>
<version>1.6.2</version>
</dependency>
Error message
The container 'Maven Dependencies' references non existing library '[hidden]\.m2\repository\org\apache\airavata\airavata-message-broker\0.5\airavata-message-broker-0.5.jar'
[ERROR] [..] Failed to collect dependencies for [org.apache.airavata:airavata-message-broker:jar:0.5 (compile)]:
Failed to read artifact descriptor for xmlbeans:xbean:jar:2.5.0:
Could not transfer artifact xmlbeans:xbean:pom:2.5.0 from/to ogce.m2.all (http://community.ucs.indiana.edu:9090/archiva/repository/ogce.m2.all):
Connection to http://community.ucs.indiana.edu:9090 refused:
Connection refused: connect
pom.xml
<repositories>
<repository>
<id>repository.apache.org-public</id>
<name>Apache</name>
<url>http://repository.apache.org/content/groups/public</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.apache.airavata</groupId>
<artifactId>airavata-message-broker</artifactId>
<version>0.5</version>
</dependency>
</dependencies>
Airavata has some third party jars pulled from a repo. Please copy paste the following two repos to your pom and see if the problem goes
<repository>
<id>central</id>
<name>Maven Central</name>
<url>http://repo1.maven.org/maven2</url>
</repository>
<repository>
<name>ogce.m2.all</name>
<id>ogce.m2.all</id>
<url>http://community.ucs.indiana.edu:9090/archiva/repository/ogce.m2.all</url>
</repository>

Resources