Re: M2 - Dependent Jars for EJB

2005-06-23 Thread Brett Porter
On 6/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> So... I guess I'd be interested in hearing your thoughts as to what the best
> way of accomplishing this is.  The assembly task sounds like the best
> option... how would I implement this using that task?  What hook would I
> need to use to modify/manually include the Manifest.mf?

Yep - you can check this out:
http://svn.apache.org/viewcvs.cgi/*checkout*/maven/components/trunk/maven-artifact-ant/src/main/assembly/dep.xml?rev=192966&content-type=text%2Fplain

If you change unpack to false, this is probably close to what you want.

I will write some docs on the assembly plugin tonight.

You cannot currently change the manifest from the assembly plugin,
however - you would need to write your own completely and include it
in the list of files in the descriptor to place in META-INF.

> 
> P.S. - On a side note, I've found Maven to be a phenomenally powerful
> product that WILL have an immediate impact on the quality of software from
> our community.  Many kudos on all your hard work!

Thanks!

Cheers,
Brett

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: M2 - Dependent Jars for EJB

2005-06-22 Thread JWiegman
Here's the basic gist of what I'm after:

Since our EJBs are course-grained, we pass and return value objects in our
signature methods... for example, let's take an EJB and call it
"ObjectLookup", which has the following method:

public Thingy getThingy(ThingyIdentifier id);

Now, of course, I would need the jar that defines a "Thingy" (let's call it
"thingy.jar") as a dependency when I compile these interfaces, so I add it
as a dependency with "compile" scope and it compiles just fine.

Now is where it gets interesting though...

As I understand it, EJBs are supposed to be stand-alone components, so
wherever the ObjectLookup EJB jar gets deployed to, it has to have a
"thingy.jar" INSIDE the ObjectLookup EJB jar (as well as a corresponding
Manifest.mf classpath entry inside the ObjectLookup EJB jar) so that the
container fully understands the EJB component (otherwise the ejb-compile
fails).

So... I guess I'd be interested in hearing your thoughts as to what the best
way of accomplishing this is.  The assembly task sounds like the best
option... how would I implement this using that task?  What hook would I
need to use to modify/manually include the Manifest.mf?

P.S. - On a side note, I've found Maven to be a phenomenally powerful
product that WILL have an immediate impact on the quality of software from
our community.  Many kudos on all your hard work!


-Original Message-
From: Brett Porter [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 22, 2005 8:37 AM
To: Maven Users List
Subject: Re: M2 - Dependent Jars for EJB

> I tried your example... here's my pom.xml entry:

This generates an -client.jar alongside the main EJB (but a bug in
alpha-2 caused it not to work).

But it appears you want something else...

> Of course, nothing different happens when I generate the jar, so I'm
> guessing that this functionality isn't implemented yet.  I'm not entirely
> sure this will suit my needs anyway... our team uses course-grained EJBs
and
> I need the server-side EJB jar to include some libraries in it (and add
the
> necessary "Classpath" entries in the Manifest.mf).

I haven't heard of it being used this way before - are you sure you do
not want to use the EAR plugin to bundle the ejb's together?

> This completely baffles me that no one has had a need to include a jar
> inside of a jar.  I know of the "uberjar" in Maven 1.0, but that's not
> really what I need either (don't need the bootstrap-code/runnable-jar
> features).  The best technique I've come up with is to painstakingly use
the
> required jars as  in the pom.xml... which is an embarrassing
hack
> to which I'm trying to find a better technique.

You can actually use the assembly plugin to do this now (though no
classpath line). It is uncommon for people to do this as class-path
generally doesn't work with jars in a jar. IT can also repack several
JARs into one.

If you let us know which of these options suit best, I can point you
in the direction of how to implement it.

Cheers,
Brett

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: M2 - Dependent Jars for EJB

2005-06-22 Thread Brett Porter
> I tried your example... here's my pom.xml entry:

This generates an -client.jar alongside the main EJB (but a bug in
alpha-2 caused it not to work).

But it appears you want something else...

> Of course, nothing different happens when I generate the jar, so I'm
> guessing that this functionality isn't implemented yet.  I'm not entirely
> sure this will suit my needs anyway... our team uses course-grained EJBs and
> I need the server-side EJB jar to include some libraries in it (and add the
> necessary "Classpath" entries in the Manifest.mf).

I haven't heard of it being used this way before - are you sure you do
not want to use the EAR plugin to bundle the ejb's together?

> This completely baffles me that no one has had a need to include a jar
> inside of a jar.  I know of the "uberjar" in Maven 1.0, but that's not
> really what I need either (don't need the bootstrap-code/runnable-jar
> features).  The best technique I've come up with is to painstakingly use the
> required jars as  in the pom.xml... which is an embarrassing hack
> to which I'm trying to find a better technique.

You can actually use the assembly plugin to do this now (though no
classpath line). It is uncommon for people to do this as class-path
generally doesn't work with jars in a jar. IT can also repack several
JARs into one.

If you let us know which of these options suit best, I can point you
in the direction of how to implement it.

Cheers,
Brett

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: M2 - Dependent Jars for EJB

2005-06-22 Thread JWiegman
First... many thanks for the response!  It's so tough to find good examples
with this product since it's so new.

I tried your example... here's my pom.xml entry:


  
org.apache.maven.plugins
maven-ejb-plugin

  

true

  

  


Of course, nothing different happens when I generate the jar, so I'm
guessing that this functionality isn't implemented yet.  I'm not entirely
sure this will suit my needs anyway... our team uses course-grained EJBs and
I need the server-side EJB jar to include some libraries in it (and add the
necessary "Classpath" entries in the Manifest.mf).

This completely baffles me that no one has had a need to include a jar
inside of a jar.  I know of the "uberjar" in Maven 1.0, but that's not
really what I need either (don't need the bootstrap-code/runnable-jar
features).  The best technique I've come up with is to painstakingly use the
required jars as  in the pom.xml... which is an embarrassing hack
to which I'm trying to find a better technique.

M2 users of the world!  Come to my rescue!

Joel

-Original Message-
From: Edwin Punzalan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 21, 2005 11:09 PM
To: Maven Users List
Subject: Re: M2 - Dependent Jars for EJB

sorry, the artifact ID should be:

  maven-ejb-plugin



Edwin Punzalan wrote:

>
> I maybe wrong but I think for the client jars to be included in the 
> ejb jar, you should configure your ejb plugin to do so like:
>
> 
>  
>
>
>org.apache.maven.plugins
>maven-plugin-parent
>
>true
>
>
>
>
>
> By default,  is false.
>
>
> [EMAIL PROTECTED] wrote:
>
>> For some reason my dependent jars aren't being included in my EJB jar 
>> when I
>> issue an "m2 package" command.  Here are the pertinent entries in my
>> pom.xml:
>>
>> ejb
>>
>> EXAMPLE dependent jar entry (on local repository only, not remote):
>> 
>>   lis
>>   lis-model
>>   SNAPSHOT
>>   compile
>> 
>>
>> Everything compiles fine, but all of the dependent jars under "compile"
>> scope don't get included in the EJB jar. 
>> Does anyone happen to know why this is?
>>
>> Thanks!
>>
>> Joel
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>  
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: M2 - Dependent Jars for EJB

2005-06-21 Thread Edwin Punzalan

sorry, the artifact ID should be:

 maven-ejb-plugin



Edwin Punzalan wrote:



I maybe wrong but I think for the client jars to be included in the 
ejb jar, you should configure your ejb plugin to do so like:



 
   
   
   org.apache.maven.plugins
   maven-plugin-parent
   
   true
   
   
   
   

By default,  is false.


[EMAIL PROTECTED] wrote:

For some reason my dependent jars aren't being included in my EJB jar 
when I

issue an "m2 package" command.  Here are the pertinent entries in my
pom.xml:

ejb

EXAMPLE dependent jar entry (on local repository only, not remote):

  lis
  lis-model
  SNAPSHOT
  compile


Everything compiles fine, but all of the dependent jars under "compile"
scope don't get included in the EJB jar. 
Does anyone happen to know why this is?


Thanks!

Joel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: M2 - Dependent Jars for EJB

2005-06-21 Thread Edwin Punzalan


I maybe wrong but I think for the client jars to be included in the ejb 
jar, you should configure your ejb plugin to do so like:



 
   
   
   org.apache.maven.plugins
   maven-plugin-parent
   
   true
   
   
   
   

By default,  is false.


[EMAIL PROTECTED] wrote:


For some reason my dependent jars aren't being included in my EJB jar when I
issue an "m2 package" command.  Here are the pertinent entries in my
pom.xml:

ejb

EXAMPLE dependent jar entry (on local repository only, not remote):

  lis
  lis-model
  SNAPSHOT
  compile


Everything compiles fine, but all of the dependent jars under "compile"
scope don't get included in the EJB jar.  


Does anyone happen to know why this is?

Thanks!

Joel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]