Why won't JBoss Resteasy maven dependency work? - maven

I added
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs-all</artifactId>
<version>2.2.1.GA</version>
<scope>provided</scope>
</dependency>
and I'm using
<repositories>
<repository>
<id>jboss</id>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</repository>
</repositories>
When I try to build, I get the following error. What am I doing wrong?
[ERROR] Failed to execute goal on project tapvox-api: Could not resolve dependencies for project com.myproject.api:myproject-api:war:1.0-SNAPSHOT: Could not find artifact org.jboss.resteasy:resteasy-jaxrs-all:jar:2.2.1.GA in jboss (http://repository.jboss.org/nexus/content/groups/public) -> [Help 1]

The dependency that you are trying to download does not have any jars or transitive dependencies. Since the default type is jar, then this will fail. If you put
<type>pom</type>
in your dependency, then you get the only artifact that this dependency has to offer. See pom
I guess that you are trying to fetch the wrong dependency.

You have to specify a dependency type. Change your dependency to look like this:
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs-all</artifactId>
<version>2.2.1.GA</version>
<type>pom</type> <<<<<
<scope>provided</scope>
</dependency>

Related

Non-Resolvable dependency issue while using jboss.fuse.bom

I came across the following maven build issue while trying to use jboss.fuse.bom as dependency.
Non-resolvable import POM: Could not find artifact org.jboss.fuse.bom:jboss-fuse-parent:pom:6.1.0.redhat-399 in central (https://repo.maven.apache.org/maven2)
The dependacy
Dependency in pom.xml
<dependency>
<groupId>org.jboss.fuse.bom</groupId>
<artifactId>jboss-fuse-parent</artifactId>
<version>6.1.0.redhat-399</version>
<type>pom</type>
<scope>import</scope>
</dependency>
It is clear that, this dependency is not available in central repository. So, I defined jboss repository in the pom to resolve this issue, as shown below:
<repositories>
<repository>
<id>repo2</id>
<name>jboss repo</name>
<url>https://repository.jboss.org/nexus/content/groups/ea/</url>
</repository>
</repositories>
Now the build will use default repository(https://repo.maven.apache.org/maven2) and the newly defined jboss repository to resolve the dependencies.
Reference: Setting up multiple maven repositories

Unable to build the mule maven project

I have created a mule maven project while running the project as : mule application with maven i am getting following error:
Failed to execute goal on project StandaloneTest: Could not resolve dependencies for project com.mycompany:StandaloneTest:mule:1.0.0-SNAPSHOT: Could not find artifact com.mulesoft.muleesb.modules:mule-module-xml:jar:3.4.0 in jboss (http://repository.jboss.com/)
I have following dependency generated by mule studio in my project pom.xml
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-xml</artifactId>
<version>3.5.0-bighorn</version>
</dependency>
<dependency>
<groupId>com.mulesoft.muleesb.modules</groupId>
<artifactId>mule-module-xml</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
do we need com.mulesoft.muleesb.modules.mule-moudle-xml.jar also in order to have a xml module in our flow file since we already have a org.mule.modules.mule-module-xml.jar in our repository.
The appropriate group id for mule-module-xml is org.mule.modules. Trying removing the second dependency.
Try replacing both with this dependency:
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-xml</artifactId>
<version>3.4.0</version>
</dependency>
The dependency is found in any of these 2 Maven repositories:
https://repository.mulesoft.org/nexus/content/groups/public/
https://repository.mulesoft.org/nexus/content/repositories/public/
Please let us know if that works. Thank you!

Cannot use dependency jboss-javaee-6.0 in my Maven project

I have set up a maven project with JBoss 7.1.1 and I want to use JavaEE libraries.
In the root pom.xml I have set:
<repositories>
<repository>
<id>jboss</id>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
</repositories>
I have this in the root pom.xml and and in the ejb maven module´s pom.xml:
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>3.0.2.Final</version>
<scope>provided</scope>
<type>pom</type>
</dependency>
When I do a maven clean install I get this error:
Failed to execute goal on project myproject-ejb: Could not resolve dependencies for project myproject:myproject-ejb:ejb:1.0-SNAPSHOT: Failure to find org.jboss.spec:jboss-javaee-6.0:jar:3.0.2.Final in https://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss has elapsed or updates are forced -> [Help 1]
What´s up with my configuration?
EDIT 1
If I remove the jboss repository from the root pom.xml I get this error:
[ERROR] Failed to execute goal on project myproject-ejb: Could not resolve dependencies for project myproject:myproject-ejb:ejb:1.0-SNAPSHOT: The following artifacts could not be resolved: org.jboss.spec:jboss-javaee-6.0:jar:3.0.2.Final, xalan:xalan:jar:2.7.1.jbossorg-2: Could not find artifact org.jboss.spec:jboss-javaee-6.0:jar:3.0.2.Final in central (http://repo.maven.apache.org/maven2) -> [Help 1]
This is caused by a bug in Xalan POM file. The following workaround fixed the problem for me:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>3.0.2.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<!-- Required by jboss-javaee-6.0:3.0.2.Final (https://issues.jboss.org/browse/JBBUILD-708) -->
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
The given dependency for jboss-javaee-6.0 is available from Maven Central so there is no need to give a separate repository.
Based on the error message you need to delete a particular location from your location maven repository (usually in $HOME/.m2/repository) in this case the folder org/jboss/. Afterwards you need to rebuild your project.
This worked for me:
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-all-6.0</artifactId>
<version>3.0.2.Final</version>
<scope>provided</scope>
</dependency>
But I see here that something like the following may also work:
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-web-6.0</artifactId>
<version>2.0.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>

Maven OpenSAML dependency issue

I have been assigned a task to implement SAML between my company and a client. I was looking at using OpenSAML but I am struggling to set up the maven project.
I add the dependency:
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>2.5.1</version>
</dependency>
but the pom file has an error: Missing artifact xerces:xml-apis:jar:1.4.01
I cant find this dependency in the maven repository. When checking the OpenSAML site it states:
Using OpenSAML in Maven-based Projects
Following is the information necessary to use OpenSAML within
Maven-based projects. Maven Repository:
https://build.shibboleth.net/nexus/content/repositories/releases Group
ID: org.opensaml Artifact ID: opensaml
But when i configure that respository in my pom file, it still cant find the dependency.
<repositories>
<repository>
<id>org.opensaml</id>
<url>https://build.shibboleth.net/nexus/content/repositories/releases</url>
</repository>
</repositories>
Has anyone got OpenSAML set up in Maven that can help?
Have you also added the xmltooling and openws dependencies to your POM file from the repository:
https://build.shibboleth.net/nexus/content/repositories/releases/org/opensaml/
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>xmltooling</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>openws</artifactId>
<version>1.4.2</version>
</dependency>
The xmltooling should have the xerces xml-api that is missing.
Thanks,
Yogesh

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