Maven 1.x War Plugin

Add support for EJB client code

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6, 1.6.1
  • Fix Version/s: 1.6.2
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

The ejb plugin from maven 1.1-beta 2 can generated EJB client code maven.ejb.client.generate=true. The client code is placed in repository as ejbs/<myclinet>.jar. Unfortunately war plugin adds only type=jar dependencies and ignores type=ejb dependencies, see maven-war-plugin-1.6.1/plugin.jelly, line 149.

Activity

Hide
Arnaud Heritier added a comment -

If you activate maven.ejb.client.generate=true then the ejb client library is in ejb-clients/<mycli>.jar
I'll add support for types 'ejb' and 'ejb-client'

Show
Arnaud Heritier added a comment - If you activate maven.ejb.client.generate=true then the ejb client library is in ejb-clients/<mycli>.jar I'll add support for types 'ejb' and 'ejb-client'
Hide
Jan Bares added a comment -

Actually I am not sure about the ejb-client/<mycli>.jar. The code looks like it will install the client artifact to ejb-client, but if you use typeHandle=org.apache.maven.ejb.EJBArtifactTypeHandler (as in ejb plugin), it will end up in ejbs folder.

Show
Jan Bares added a comment - Actually I am not sure about the ejb-client/<mycli>.jar. The code looks like it will install the client artifact to ejb-client, but if you use typeHandle=org.apache.maven.ejb.EJBArtifactTypeHandler (as in ejb plugin), it will end up in ejbs folder.
Hide
Vincent Massol added a comment -

You must use a type of "ejb-client" when referencing an ejb client. Ejb clients are put in "ejbs/" by the ejb plugin.

Show
Vincent Massol added a comment - You must use a type of "ejb-client" when referencing an ejb client. Ejb clients are put in "ejbs/" by the ejb plugin.
Hide
Arnaud Heritier added a comment -

You're right.
It seems that ejb-client is just the type used internally by the ejb plugin.
I'll just add the ejb type in the war plugin.

Show
Arnaud Heritier added a comment - You're right. It seems that ejb-client is just the type used internally by the ejb plugin. I'll just add the ejb type in the war plugin.
Hide
Arnaud Heritier added a comment -

ok, Vincent, thus we must add the support for ejb-client ?

Show
Arnaud Heritier added a comment - ok, Vincent, thus we must add the support for ejb-client ?
Hide
Vincent Massol added a comment -

I don't know. Are you sure you need to do anything at all?

Have a look at http://www.onjava.com/pub/a/onjava/2005/09/07/maven.html?page=4

It shows how to include an ejb client in a WAR

Show
Vincent Massol added a comment - I don't know. Are you sure you need to do anything at all? Have a look at http://www.onjava.com/pub/a/onjava/2005/09/07/maven.html?page=4 It shows how to include an ejb client in a WAR
Hide
Arnaud Heritier added a comment -

In your article you only add the dependency on the ejb-client jar ?
But in the generated war the ejb-client jar isn't present !

Show
Arnaud Heritier added a comment - In your article you only add the dependency on the ejb-client jar ? But in the generated war the ejb-client jar isn't present !
Hide
Jan Bares added a comment -

Vincent, I know about the article, but it is buggy, even the latest from SVN. Just to be sure, I build it once again and the waf-controller-ejb.jar is not part of waf-web-1.4.war just because of this bug.

Show
Jan Bares added a comment - Vincent, I know about the article, but it is buggy, even the latest from SVN. Just to be sure, I build it once again and the waf-controller-ejb.jar is not part of waf-web-1.4.war just because of this bug.
Hide
Arnaud Heritier added a comment -

Fixed

Show
Arnaud Heritier added a comment - Fixed
Hide
Vincent Massol added a comment -

Sorry guys. You're right...

The build worked fined and I failed to notice that the generated WAR didn't have the ejb client bundled. This is all my fault

Thanks to both of you for fixing this. So in order for the code in the article to work, readers will need to use the WAR plugin v1.6.2...

Sorry again

Show
Vincent Massol added a comment - Sorry guys. You're right... The build worked fined and I failed to notice that the generated WAR didn't have the ejb client bundled. This is all my fault Thanks to both of you for fixing this. So in order for the code in the article to work, readers will need to use the WAR plugin v1.6.2... Sorry again
Hide
Arnaud Heritier added a comment -

Fixed

Show
Arnaud Heritier added a comment - Fixed

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: