I have a project that is using these dependencies:
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.identity.oauth.stub</artifactId>
<version>4.2.2</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.utils</artifactId>
<version>4.2.0</version>
</dependency>
It seems that these dependencies are not available anymore.
Do you know any other versions of them?
WSO2 artifacts are not available on Maven Central.
You need to add the following repository :
<repositories>
<repository>
<id>wso2-maven2-repository</id>
<url>http://maven.wso2.org/nexus/content/groups/wso2-public</url>
</repository>
</repositories>
Related
Trying to build a small sample project in eclipse (tried both mars and oxygen releases of eclipse). Using Java 1.8. When I add the opensaml dependencies it fails on the opensaml-saml-impl indicating:
Missing artifact org.apache.commons:commons-collections:jar:3.2.1
Missing artifact org.apache.commons:commons-lang:jar:2.6
Missing artifact org.apache.jakarta:oro:jar:2.0.8
Empty project with the following pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>testSAML2</groupId>
<artifactId>test.test.saml</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>abc</name>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<opensaml.version>3.3.0</opensaml.version>
</properties>
<dependencies>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml-core</artifactId>
<version>${opensaml.version}</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml-saml-api</artifactId>
<version>${opensaml.version}</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml-saml-impl</artifactId>
<version>${opensaml.version}</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml-messaging-api</artifactId>
<version>${opensaml.version}</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml-messaging-impl</artifactId>
<version>${opensaml.version}</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml-soap-api</artifactId>
<version>${opensaml.version}</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml-soap-impl</artifactId>
<version>${opensaml.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</project>
I have tried to add a repository at the bottom but no change:
<repositories>
<repository>
<id>shib-release</id>
<url>https://build.shibboleth.net/nexus/content/repositories/releases</url>
</repository>
</repositories>
Anyone have any ideas why? I have tried to "Update Project...", tried to remove/add as a maven project, tried an empty new project, tried to install oxygen as a new ide and still getting the same issue.
Solved by a series of steps. Ultimately I think the last step was the primary step that resolved the issues (maven build). Here is the series:
Delete the entire local repository (your .m2/repository)
Removed all references to older JVM's
Restarted eclipse
Reset to java 1.8 interface several times, something in maven thinks its JVM1.5 when I select Maven | 'Update Project...'
Ran a Maven Build per The container 'Maven Dependencies' references non existing library - STS Mike Salleses answer
Run as | maven build | goal 'clean install -U' | run
The maven build was a new technique I had not seen. It basically builds the project including maven pulls and you can see the details of what is failing in a log style format.
The maven build finally forced the downloaded of all the jars and compiled. The rest of the test projects all worked with a clean build at this point.
I have added all dependencies(my project ,junit,etc) and surefire plugin. so it is executing successfully in eclipse but when run through command prompt it throws error. below is the attached screenshot. and the pom.xml file . embeeded maven settings in eclipse works.maven location is also getting recognised from command prompt
BUILD FAILURE ERROR
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.selenium</groupId>
<artifactId>test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-server
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.53.1</version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/com.codeborne/phantomjsdriver -->
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.3.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun.mail/javax.mail -->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.5.6</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.uncommons/reportng -->
<dependency>
<groupId>org.uncommons</groupId>
<artifactId>reportng</artifactId>
<version>1.1.4</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.inject/guice -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- Dependency for POI API -->
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.17</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<testFailureIgnore> false </testFailureIgnore>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/runner/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
From the error, it says maven try to download a depedency jar from this remote maven center repository: https://repo.maven.apache.org/maven2/
Because this repository is a SSL website, you need to install its certification to pass the auth. And Maven run by JDK, so you need to import the certication into JDK Security Store.
The reason why you can pass in eclipse is eclipse use a different settings.xml as run maven command, maybe eclipse not use the SSL repository.
There are two options:
1) Don't use SSL maven remote repository, specify a HTTP repository:http://repo1.maven.org/maven2 in your manve settings.xml, like below:
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>securecentral</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>securecentral</id>
<!--Override the repository (and pluginRepository) "central" from the
Maven Super POM -->
<repositories>
<repository>
<id>central</id>
<url>http://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
2) Import certification in JDK Security Store
find the step to import in this post:
Problems using Maven and SSL behind proxy
I think you are using two different maven,usually eclipse comes with its own maven version. You can verify you are using same Maven installation in eclipse and from command prompt.
You can verify maven installation in eclipse by going to
Preference--> Maven--> Installation.
From command prompt, check for Maven home/M2 home.
i am getting the following error in mi maven pom.xml on a spring template project
"Description Resource Path Location Type
ArtifactDescriptorException: Failed to read artifact descriptor for org.slf4j:slf4j-api:jar:1.5.6: ArtifactResolutionException: Failure to transfer org.slf4j:slf4j-api:pom:1.5.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.slf4j:slf4j-api:pom:1.5.6 from/to central (http://repo.maven.apache.org/maven2): C:\Users\muhsin.HIFX.m2\repository\org\slf4j\slf4j-api\1.5.6\slf4j-api-1.5.6.pom.ahc0570cfa3a1934af5 (The system cannot find the file specified) pom.xml /sample line 1 Maven Dependency Problem"
my pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.samples.spring</groupId>
<artifactId>spring-jpa-utility</artifactId>
<version>1.0.0.CI-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Spring JPA Utility</name>
<url>http://www.springframework.org</url>
<description>
<![CDATA[This project is a minimal jar utility with Spring configuration for JPA usage.]]>
</description>
<properties>
<maven.test.failure.ignore>true</maven.test.failure.ignore>
<spring.framework.version>3.0.6.RELEASE</spring.framework.version>
</properties>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.6.0.Final</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.1.0.Final</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.framework.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.156</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<!-- <pluginRepositories>
<pluginRepository>
<id>Codehaus</id>
<url>http://repository.codehaus.org/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>org.jboss.repository.releases</id>
<name>JBoss Maven Release Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<distributionManagement>
<downloadUrl>http://www.springframework.org/download</downloadUrl>
<site>
<id>staging</id>
<url>file:///${user.dir}/target/staging/org.springframework.batch.archetype/${pom.artifactId}</url>
</site>
<repository>
<id>spring-release</id>
<name>Spring Release Repository</name>
<url>file:///${user.dir}/target/staging/release</url>
</repository>
<snapshotRepository>
<id>spring-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>file:///${user.dir}/target/staging/snapshot</url>
</snapshotRepository>
</distributionManagement> -->
</project>
You can also use force update flag(-U) for example:
mvn clean install -U
Based on the error message
"Description Resource Path Location Type ArtifactDescriptorException:
Failed to read artifact descriptor for org.slf4j:slf4j-api:jar:1.5.6:
ArtifactResolutionException: Failure to transfer
org.slf4j:slf4j-api:pom:1.5.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.
it means you have to delete the folder $HOME/.m2/repository/org/slf4j and afterwards you need to rebuild via
mvn clean package
and other given error message:
Original error: Could not transfer artifact
org.slf4j:slf4j-api:pom:1.5.6 from/to central
(http://repo.maven.apache.org/maven2):
C:\Users\muhsin.HIFX.m2\repository\org\slf4j\slf4j-api\1.5.6\slf4j-api-1.5.6.pom.ahc0570cfa3a1934af5
(The system cannot find the file specified) pom.xml /sample line 1
Maven Dependency Problem"
indicates that you have some kind of problem with you repository access. Either you have a proxy which is not correctly configured. What i recommend is to use a repository manager which makes life easier.
You can try to run maven clean to perform a clean
You can manually navigate to the specified file in your local repository and remove it and then try to download it as afresh copy using mvn clean install -e
open this location
C:\Users...m2\repository\org\apache\maven\plugins\maven-surefire-plugin\2.10
Delete the file maven-surefire-plugin-2.10 and build the project.
it worked for me
Delete all the files present inside the folder **C:\Users\username.m2\repository**
open eclipse again rebuild the project - (Give some time for eclipse IDE to Build the Workspace).
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
add this line in the properties. Worked for me!
What is the maven dependency for j2ee.jar. I tried doing this way. But still its not working..
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.datasource.pooling</groupId>
<artifactId>datasource.pooling</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>com.datasource.pooling</name>
<repositories>
<repository>
<id>Java.Net</id>
<url>http://download.java.net/maven/2/</url>
</repository>
</repositories>
<dependencies>
<!-- Javaee API -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.5.4</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
<!--
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.3</version>
</dependency>
-->
</dependencies>
</project>
I am trying to configure this http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/doc/PoolingDriverExample.java?view=markup example in my maven project. So in that I have to add j2ee.jar into my classpath. But If I am adding by above in my pom.xml then I am getting some error as ConnectionFactory cannot be resolved to a type
Update-
<!-- Javaee API -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>runtime</scope>
</dependency>
still I am getting the same error for ConnectionFactory cannot be resolved to a type..
The repo you specified does not provide that version:6.0
The repo you specified has http://download.java.net/maven/glassfish/javax/javaee/javaee/
5.0-SNAPSHOT/ 14-Feb-2008 15:04 1K
6.0-alpha-1/ 16-Apr-2008 17:36 1K
6.0-alpha-2-SNAPSHOT/ 23-Apr-2008 08:31 1K
You may want to use http://repo1.maven.org/maven2 which does provide the resource and version you specified.
Also, your scope should be "provided". Having a runtime scope tells maven that the dependency is needed for runtime but not compilation. You need the opposite. Your dependency is needed for compilation but not runtime because it's "provided" by the container. See http://maven.apache.org/pom.html for more details.
You can check for transitive dependencies using the maven dependency plugin.
Just do an
mvn dependency:tree
Hope this answers your question.
commons-lang 3.0 is still beta, but can it be found in some maven repository (I couldn't)
Adding repository (POM):
<repositories>
<repository>
<id>snapshots</id>
<url>https://repository.apache.org/content/repositories/snapshots</url>
</repository>
</repositories>
Adding dependency:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
You can use the snapshots at http://repository.apache.org/snapshots/org/apache/commons/commons-lang3/3.0-SNAPSHOT/.
Update: It's been released so it is in the central maven repository now.
Adding:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
Caused the module to be automatically downloaded, but from http://repo.maven.apache.org, not Maven Central