You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Conal Tuohy <co...@paradise.net.nz> on 2002/08/11 09:19:46 UTC

package names? additional jar dependencies?

I've written some components for dealing with javamail stores: MailSource
and MailSourceFactory, and a few associated (helper) classes which will
probably also include an XMLizer when I factor out the XMLizing code. I'd
like to commit them to the scratchpad, but first I want to know the correct
location for my package. There are a lot of Sources in the
org.apache.cocoon.components.source.impl package, but it seemed to me
preferable to put my classes in a package of their own, where they can be
package-private, for instance.

org.apache.cocoon.mail ? (this is what I'm using at present)
org.apache.cocoon.components.mail ?
org.apache.cocoon.components.source.impl.mail ?

Also, these components require some extra jars; namely activation.jar (the
Java Activation Framework) and mail.jar (JavaMail). How do I indicate this
dependency?

Thanks in advance!

Con


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: package names? additional jar dependencies?

Posted by Conal Tuohy <co...@paradise.net.nz>.
> > org.apache.cocoon.mail ? (this is what I'm using at present)
> > org.apache.cocoon.components.mail ?
> > org.apache.cocoon.components.source.impl.mail ?

Carsten wrote:

> If your implementing consists only of a source then I think the third
> package name is the best to use. I would discourage you from using
> the first as optional components do not belong to the top-level.
> If you have additional components for mail handling the second one
> would be fine.

Thanks.

> > Also, these components require some extra jars; namely
> activation.jar (the
> > Java Activation Framework) and mail.jar (JavaMail). How do
> I indicate this
> > dependency?
> >
> This dependency is indicated in the build.xml ant build
> script. We can't add
> (AFAIK) the jars to Cocoon directly because of the Sun
> licence. Check the
> build script and you will find a class test if the mail.jar
> is available
> and see some optional compilation for some mail components.

OK - I've had a look at this and I can see what I have to do.

BTW, Sun says that the JavaMail api is "free" and "redistributable", but
hey, I'm not a lawyer ;-)
http://java.sun.com/products/javamail/FAQ.html#free

> BTW what does your source do? Reading from an email account
> and sending
> emails (=WritableSource)?

At the moment it's just a Source (not WritableSource), because I'm in a
hurry to develop it for a mail-list archive, but one of the reasons I chose
to implement it as a Source (rather than a Generator) was to allow for this
as a later enhancement. I don't think writability is a huge omission,
though, because almost all email functionality is read/send rather than
read/write; emails tend to be written, sent, received, and then not changed.

I'll probably be posting the patch within a few days.

Cheers!

Con


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: package names? additional jar dependencies?

Posted by Carsten Ziegeler <cz...@s-und-n.de>.

> -----Original Message-----
> From: Conal Tuohy [mailto:conalt@paradise.net.nz]
> Sent: Sunday, August 11, 2002 9:20 AM
> To: Cocoon Developers (E-mail)
> Subject: package names? additional jar dependencies?
>
>
> I've written some components for dealing with javamail stores: MailSource
> and MailSourceFactory, and a few associated (helper) classes which will
> probably also include an XMLizer when I factor out the XMLizing code. I'd
> like to commit them to the scratchpad, but first I want to know
> the correct
> location for my package. There are a lot of Sources in the
> org.apache.cocoon.components.source.impl package, but it seemed to me
> preferable to put my classes in a package of their own, where they can be
> package-private, for instance.
>
> org.apache.cocoon.mail ? (this is what I'm using at present)
> org.apache.cocoon.components.mail ?
> org.apache.cocoon.components.source.impl.mail ?

If your implementing consists only of a source then I think the third
package name is the best to use. I would discourage you from using
the first as optional components do not belong to the top-level.
If you have additional components for mail handling the second one
would be fine.

>
> Also, these components require some extra jars; namely activation.jar (the
> Java Activation Framework) and mail.jar (JavaMail). How do I indicate this
> dependency?
>
This dependency is indicated in the build.xml ant build script. We can't add
(AFAIK) the jars to Cocoon directly because of the Sun licence. Check the
build script and you will find a class test if the mail.jar is available
and see some optional compilation for some mail components.

BTW what does your source do? Reading from an email account and sending
emails (=WritableSource)?

Carsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org