Kenny,

If you are running a 2.2 test build, putting your jars in 
james-server/apps/james/SAR-INF/lib of your server installation works perfectly.

Section "Deploying a Custom Mailet/Adding Your Mailet to the Classpath" in 
http://james.apache.org/custom_mailet_2_1.html is wrong: the right place to put your 
jar is in the SAR-INF/lib INSIDE THE JAMES.SAR FILE, managing it with winzip or 
similar. Before using the new mailet deployment facilities in 2.2 this was the only 
and safe way I found for deploying personal mailet jars, that I used for 3 months.

What happens is that during the startup the james.sar (and I think any other *.sar 
file found in the james/apps directory) is unzipped into a newly created 
directory james-server/work/james-nnnnnnnnnnnnn, where nnnnnnnnnnnnn is everytime a 
different random(?) number; the previous one is deleted.
Such directory, within a SAR-INF/lib substructure contains the jars and other stuff 
that will be used during runtime. Have a look at it.
The point is that if you put something in an existing 
james/work/james-nnnnnnnnnnnnn/SAR-INF/lib directory and then restart james, it will 
simply disappear and a new james/work/james-mmmmmmmmmmmmm/SAR-INF/lib will reappear 
with the jars from james.sar.

james-server/lib is ignored by the *james* code, it must instead contain jdbc drivers 
and other stuff that will be used at the *avalon/phoenix etc.* level or "statically" 
initialized (at least this is the place where I put my SqlServer jdbc drivers and some 
cryptography jars. But my personal mailet jars go inside the james.sar file as said 
above.

Hope it helps,

Vincenzo

> -----Original Message-----
> From: Kenny Smith [mailto:[EMAIL PROTECTED]
> Sent: mercoledi 29 ottobre 2003 23.48
> To: James Developers List
> Subject: Unsure/Unable to Deploy Custom Mailets
> 
> 
> Hi all,
> 
> I'm still setting up my new server and I'm trying to deploy a custom 
> mailet to it, but running into problems.
> 
> I following the directions here: 
> http://james.apache.org/custom_mailet_2_1.html
> 
> I copied my jar into /usr/local/james-server/lib and executed:
> cd /usr/local/james-server
> cp ~/journalscape.jar lib/
> ./build.sh dist-lite
> 
> However, journalscape.jar doesn't show up anywhere in the dist directory 
> nor in the james.sar.
> 
> Am I doing something wrong?
> 
> Kenny
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to