Am trying to add a dependency sauce-connect-plugin in to pom.xml file
<groupId>com.saucelabs.maven.plugin</groupId>
<artifactId>sauce-connect-plugin</artifactId>
<version>2.1.18</version>
</dependency>
But building the pom file am getting
Missing artifact com.saucelabs:sauce-connect:jar:3.1.32
Also i mentioned the repository
<repositories>
<repository>
<id>saucelabs-repository</id>
<url>https://repository-saucelabs.forge.cloudbees.com/release</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
in this url http://repository-saucelabs.forge.cloudbees.com/release/com/saucelabs/sauce-connect/3.1.32/
sauce-connect:jar:3.1.32 is present
Then why Missing artifact error is showing??
What wrong with me.
When i directly add following in tho the pom file and added the repository am getting the same error
<dependency>
<groupId>com.saucelabs</groupId>
<artifactId>sauce-connect</artifactId>
<version>3.1.32</version>
</dependency>
You have used mismatched versions:
sauce-connect-plugin presents in:
http://repository-saucelabs.forge.cloudbees.com/release/com/saucelabs/sauce-connect-plugin/
which have only versions of 1.0.11, 1.0.12, 1.0.13 and 1.0.14.
But you have tried to download 2.1.18
What you mentioned with the URL http://repository-saucelabs.forge.cloudbees.com/release/com/saucelabs/sauce-connect/3.1.32/ will not represent for sauce-connect-plugin. It will represent for only sauce-connect
So you should try with following dependency:
<dependency>
<groupId>com.saucelabs.maven.plugin</groupId>
<artifactId>sauce-connect-plugin</artifactId>
<version>1.0.11</version><!-- 1.0.11, 1.0.12, 1.0.13 or 1.0.14 -->
</dependency>
If you need exactly the version of 2.1.18, then you need to upload the artifact in the location http://repository-saucelabs.forge.cloudbees.com and try.
Here you can find someone who is also using this, try to compare your pom https://github.com/saucelabs/sauce-java/blob/master/sauce-connect-plugin/pom.xml
Related
Using the following dependency entry in my pom:
<dependencies>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
<version>${dropwizard.version}</version>
</dependency>
</dependencies>
Using an older dropwizard version works fine:
<properties>
<dropwizard.version>2.0.9</dropwizard.version>
</properties>
But using the most up to date version as listed on mvnrepository:
<dropwizard.version>2.1.2</dropwizard.version>
gives the following error:
Dependency 'io.dropwizard:dropwizard-core:2.1.2' not found
Additionally, using the recommended version in dropwizard's tutorial page does not work either:
<dropwizard.version>2.1.3-SNAPSHOT</dropwizard.version>
I have the following to pull snapshots in my pom:
<repositories>
<repository>
<id>nexus</id>
<name>nexus-snapshot</name>
<url>http://localhost:8081/repository/maven-snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
Update:
By deleting io/dropwizard from my ~/.m2/repository directory and invalidating caches & restarting, I was able to load dropwizard version 2.1.2. I am still unable to determine how to properly load the SNAPSHOT version. I don't know what repository settings to add to my pom file in order to correctly link to that dependency.
I want to use dependency from the Cloudera Maven repository:
Extract from my pom.xml:
<repositories>
<repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/cloudera/cloudera-repos/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>0.9.0-cdh4.6.0</version>
</dependency>
It depends on parent "spark-parent" that referenced to parent with SNAPSHOT version.
Extract from spark-parent pom.xml (https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/spark/spark-parent/0.9.0-cdh4.6.0/):
<parent>
<groupId>com.cloudera.cdh</groupId>
<artifactId>cdh-root</artifactId>
<version>4.6.0-SNAPSHOT</version>
</parent>
<groupId>org.apache.spark</groupId>
<artifactId>spark-parent</artifactId>
<version>0.9.0-cdh4.6.0</version>
When I run simple "mvn clean package" I have the error that this SNAPSHOT artifact cannot be found.
What is the simplest way to solve this? A solution must be a change in pom.xml or in the build command.
Thanks.
The Cloudera Maven repository doesn't have the artifact com.cloudera.cdh:cdh-root:pom:4.6.0-SNAPSHOT, therefore you won't be able to build your project using it.
However, you can use the Spring cache of this repository: http://repo.spring.io/cloudera-cache. It contains the missing artifacts. You will also have to enable snapshot dependencies inside your repository:
<repositories>
<repository>
<id>cloudera-cache</id>
<url>http://repo.spring.io/cloudera-cache/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
I added a dependency in maven for servlet as seen here, here and here
Maven doesn't find it :
dependency javax.servlet:javax.servlet-api:3.0.1 not found
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
I tried to add this, which doesn't work :
<repository>
<id>maven2</id>
<url>https://mvnrepository.com</url>
</repository>
or this:
<repository>
<id>maven2</id>
<url>http://repo1.maven.org/maven2/javax/servlet/javax.servlet-api/3.0.1/</url>
</repository>
First of all you need to verify if you have Internet connectivity and then you can try to purge and resolve the dependencies in the local Maven repository as there could be some corrupted package, you can try the following command to accomplish this:
mvn dependency:purge-local-repository
Take a look to Purging local repository dependencies for more information.
Use default repostiory:
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
Don't do like this: http://repo1.maven.org/maven2/javax/servlet/javax.servlet-api/3.0.1/
Even you should remove all content of the tag <repositories> or <repository> and all things inside these, Maven will automatic use default configuration.
Reference:
http://maven.apache.org/pom.html#The_Super_POM
I am currently trying to use the Jongo project to connect to a remote MongoDB.
To do so, I added these dependencies to my project :
<dependencies>
<dependency>
<groupId>org.jongo</groupId>
<artifactId>jongo</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.6.5</version>
</dependency>
</dependencies>
I already had some troubles with the first dependency (jongo:1.0), since maven could not retreive this version (the latest maven knew was 0.4) : Intellij tells me Dependency "org.jongo:jongo:1.0" not found. Yet, the dependency can be found there
I managed to get it via Project Structure -> Librairies
The problem is that this dependency is now local, and anyone who clones this project must import this dependency manually, which is not suitable.
I am using Intellij IDEA 13.0
First, the Sonatype dependency version in the snapshots repository you had linked in your post is 1.1-SNAPSHOT and not 1.0.
It's not recommended to use 3rd party snapshots in your build
If however you insist, you need to add Sonatype snapshots repository to your maven build as follows:
<repository>
<id>sonatype-snapshots</id>
<name>sonatype-snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
EDIT
The 1.0 version resides in Sonatype releases repository:
<repository>
<id>sonatype-releases</id>
<name>sonatype-releases</name>
<url>https://oss.sonatype.org/content/repositories/releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
Jongo 1.0 is in maven central. There is no need for extra repository configuration in your pom.
I have serious problems on a new computer setting up my existing maven project. Eclipse complains dozens of times about missing artifacts:
Missing artifact junit:junit:jar:4.8.2:test
Missing artifact org.slf4j:slf4j-log4j12:jar:1.5.5:compile
Missing artifact org.slf4j:slf4j-api:jar:1.5.5:compile
Missing artifact log4j:log4j:jar:1.2.14:compile
...
While downloading the files for the local repository I encounter the following message (executing mvn compile:
Downloading: http://repository.jboss.org/maven2/trove/trove/2.1.1/trove-2.1.1.pom
Downloading: http://repository.jboss.org/maven2/trove/trove/2.1.1/trove-2.1.1.pom
....
[ERROR] ... Failed to read artifact descriptor for trove:trove:jar:2.1.1:
Could not transfer artifact trove:trove:pom:2.1.1 from/to jboss
(http://repository.jboss.org/maven2): Access denied to:
http://repository.jboss.org/maven2/trove/trove/2.1.1/trove-2.1.1.pom
I've followed the instructions http://community.jboss.org/wiki/MavenSettings and use the public repository:
<repository>
<id>jboss-public-repository</id>
<name>JBoss Repository</name>
<url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>>
</repository>
The responsible dependency in my project is
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>6.0.0.Final</version>
<type>pom</type>
</dependency>
It seems the problem is related to https://issues.jboss.org/browse/JBBUILD-682, but since it's unlikely the repository URL will be fixed, I'm looking for a workaround! I don't encounter this problem on other machines, but it occurs if the maven repository is deleted and will be rebuild.
I think I had that issue once before and afaik know "Using Deprecated Dependencies" helped me.
Have a look at http://community.jboss.org/wiki/MavenGettingStarted-Users on paragraph "Using Deprecated Dependencies". Sorry I might be wrong, but it might be worth a shot... :)
Maven Source Quote:
<repositories>
<!-- other repos here -->
<repository>
<id>jboss-deprecated-repository</id>
<name>JBoss Deprecated Maven Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>