MyFaces Commons Validator maven dependency repository - maven

Seems like i am having a hard time finding the repository manager for this dependency:
<dependency>
<groupId>org.apache.myfaces.commons</groupId>
<artifactId>myfaces-commons</artifactId>
<version>1.1.2</version>
</dependency>
Can someone give me a hand on this :P

Found the problem.
The correct dependency should be:
<dependency>
<groupId>org.apache.myfaces.commons</groupId>
<artifactId>myfaces-validators20</artifactId>
<version>1.0.2</version>
</dependency>
This dependency can be found in Maven Central public repository:
http://search.maven.org/#artifactdetails%7Corg.apache.myfaces.commons%7Cmyfaces-validators20%7C1.0.2%7Cjar

Related

Spring Boot No Class found error though starter dependency has added classes in classpath

Despite having appropriate jars in classpath Spring Boot throws - java.lang.ClassNotFoundException: org.apache.camel.spring.spi.XmlCamelContextConfigurer
Any suggestions what is missing here.
I have added the respective starters in pom.xml as shown below:
<dependency>
<groupId>org.springframework.boot</groupId>[![enter image description here][1]][1]
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
<version>2.19.3</version>
</dependency>
The project maven dependencies also shows the class availability, as in given image attachment.
the answer is here - https://stackoverflow.com/a/34271507/2885422 It all depends how maven loads the class. There are 2 version of camel-spring.jars available in classpath (2.20.1 and 2.19.3. Ref: my original post image)
And org.apache.camel.spring.spi.XmlCamelContextConfigurer class is available only in 2.20.1 jars. And maven by default looks in earlier one and once package found matching but no class found throws error (?)
And the reason I believe 2.19.3 get loaded is Apache-cxf jars is of 2.19.3. Unfortunately our project repository does not have apache-cxf starter jars.
https://stackoverflow.com/a/34271507/2885422
Solution: - I hope it may be helpful for future references
By adding options I could resolve the issue,by having exclusion clause added as given below. Thus I could load only required version jars.
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
<version>2.19.3</version>
<exclusions>
<exclusion>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</exclusion>
</exclusions>
</dependency>'

Find all dependencies that include a given package

I excluded an artifact because it causes conflicts, namely the jsr311-api given below. Yet when I run the generated jar I'm still getting the java.lang.NoSuchMethodError error. I suspect that another dependency is also including this artifact. How can I find out which one? My dependency list is quite large. Which dependencies include the package javax.ws.rs.core?
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>1.7.3</version>
<exclusions>
<!-- Causes java.lang.NoSuchMethodError: javax.ws.rs.core.Response$Status$Family.familyOf(I)Ljavax/ws/rs/core/Response$Status$Family; -->
<exclusion>
<artifactId>jsr311-api</artifactId>
<groupId>javax.ws.rs</groupId>
</exclusion>
</exclusions>
</dependency>
Go to
http://search.maven.org/#advancedsearch%7Cgav
and use classname search to find
javax.ws.rs.core.Response
If you use a Nexus 2.x in your company, you can use classname search there as well.
If you want to find out where a given artifact (that you e.g. found by classnmae search) comes from, use dependency:tree in Maven.
In my case the mistake was that I had to manually add the javaee api and I set <scope>provided</scope> which was a mistake, fixing this solved the problem.
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope><!-- remove this -->
</dependency>

maven spring library correct dependency

Let's say I am creating a new project, maven based, and I want to use spring 4.2.3.RELEASE.
I also want to use spring-test and spring security and X, Y and Z.
How can I know for sure what exact versions to add in maven to avoid conflicts?
Thanks
later edit:
can this help me?
Maven "Bill Of Materials" Dependency
It is possible to accidentally mix different versions of Spring JARs when using Maven. For example, you may find that a third-party library, or another Spring project, pulls in a transitive dependency to an older release. If you forget to explicitly declare a direct dependency yourself, all sorts of unexpected issues can arise.
To overcome such problems Maven supports the concept of a "bill of materials" (BOM) dependency. You can import the spring-framework-bom in your dependencyManagement section to ensure that all spring dependencies (both direct and transitive) are at the same version.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>4.2.3.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
An added benefit of using the BOM is that you no longer need to specify the <version> attribute when depending on Spring Framework artifacts:
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependencies>
You are right, the BOM is one of the most powerfull ways to fight (even maven based) dependency hell.

org.springframework.web.servlet not found in maven

I am trying to download the org.springframework.web.servlet using maven dependency
but maven could not download it.i want to know is this dependency is there in maven or not
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.web.servlet</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
or spring has changed its dependency or can we use some alternate dependency for it.please suggest
The package org.springframework.web.servlet is contained in the spring-webmvc module. Use this dependency:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>`
Update: Since this post is quite old, please check for newer versions of the spring framework. Release 3.1.1.RELEASE is quite out-dated.

Maybe bad jasper report dependency in pom.xml

I'm developing my first application with vaadin and spring. I'm using also maven for dependency management. Now i have this trouble, when i try to add a the followed jasper report dependency
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>5.2.0</version>
</dependency>
I get the following error
The container 'Maven Dependencies' references non existing library 'C:\Users\Alex.m2\repository\bouncycastle\bcprov-jdk14\138\bcprov-jdk14-138.jar'
then i also try to add this dependency:
<dependency>
<groupId>bouncycastle</groupId>
<artifactId>bcmail-jdk14</artifactId>
<version>138</version>
</dependency>
but doesn't work.
Where i wrong?

Resources