John
John

Reputation: 3996

Maven dependency entry for wildfly ejb standalone client

I'm writing a standalone client for an ejb application deployed to jboss wildfly 9.0.1.Final. The documentation I've reviewed suggests there is a readme file (readme-ejb-jms.txt) in the wildfly directory. This file contained the following suggestion for the maven dependencies:

<dependencies>
    <dependency>
        <groupId>org.jboss.as</groupId>
        <artifactId>jboss-as-ejb-client-bom</artifactId>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>org.jboss.as</groupId>
        <artifactId>jboss-as-jms-client-bom</artifactId>
        <type>pom</type>
    </dependency>
</dependencies>

If I use this I get an error saying version is required so I modified the dependencies to look like this:

    <dependency>
        <groupId>org.jboss.as</groupId>
        <artifactId>jboss-as-ejb-client-bom</artifactId>
        <version>9.0.1.Final</version>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>org.jboss.as</groupId>
        <artifactId>jboss-as-jms-client-bom</artifactId>
        <version>9.0.1.Final</version>
        <type>pom</type>
    </dependency>

When I run mvn clean install with the above I get this error:

The following artifacts could not be resolved: 
org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final, 
org.jboss.as:jboss-as-jms-client-bom:pom:9.0.1.Final: 
Failure to find org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final 

The full output from mvn clean install is shown below:

C:\_WORKSPACE\workspace\_myapp\myappjbosswildflyclient>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myappjbosswildflyclient 4.3.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final is missing, no dependency information available
[WARNING] The POM for org.jboss.as:jboss-as-jms-client-bom:pom:9.0.1.Final is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.957s
[INFO] Finished at: Tue Aug 04 17:17:04 EDT 2015
[INFO] Final Memory: 5M/118M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project myappjbosswildflyclient: Could not resolve dependencies for project mycompany-myapp:myappjbosswildflyclient:jar:4.3.0-SNAPSHOT: The following artifacts could not be resolved: org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final, org.jboss.as:jboss-as-jms-client-bom:pom:9.0.1.Final: Failure to find org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final in http://downl
oad.java.net/maven/2 was cached in the local repository, resolution will not be reattempted until the update interval of java.net2 has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
C:\_WORKSPACE\workspace\_myapp\myappjbosswildflyclient>

What should I be using for these dependencies?

Upvotes: 2

Views: 4460

Answers (4)

Ermal
Ermal

Reputation: 461

Your dependencies must be of type POM.

<type>pom</type>

Upvotes: 1

Tea Curran
Tea Curran

Reputation: 2993

This works fine for me:

<dependency>
    <groupId>org.wildfly</groupId>
    <artifactId>wildfly-ejb-client-bom</artifactId>
    <type>pom</type>
    <version>9.0.1.Final</version>
</dependency>
<dependency>
    <groupId>org.wildfly</groupId>
    <artifactId>wildfly-jms-client-bom</artifactId>
    <type>pom</type>
    <version>9.0.1.Final</version>
</dependency>

Upvotes: 4

John
John

Reputation: 3996

I found this post and followed the suggestions it provided:

https://developer.jboss.org/thread/237382

My dependencies look like this:

    <dependency>
        <groupId>org.wildfly</groupId>
        <artifactId>wildfly-ejb-client-bom</artifactId>
        <type>pom</type>
        <version>8.0.0.Final</version>
        <scope>import</scope>
    </dependency>
    <dependency>
        <groupId>org.wildfly</groupId>
        <artifactId>wildfly-jms-client-bom</artifactId>
        <type>pom</type>
        <version>8.0.0.Final</version>
        <scope>import</scope>
    </dependency>

I am now able to build the project and create the initial context for the ejb look up.

I Tried using 9.0.1.Final and 9.0.0.Final for the versions with no luck.

I am very uncomfortable with the fact that the versions do not match and with the fact that the dependencies documented in the README-EJB-JMS.txt file provided with the distribution does not work.

Upvotes: 0

TTM
TTM

Reputation: 21

It looks like you don't have access to the maven repository or could have disconnected while retrieving the dependency jars. You can manually delete your local repo and retry the build

Upvotes: 1

Related Questions