You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by thufir <ha...@gmail.com> on 2013/12/22 18:57:49 UTC

JAR dependencies for gnumail-providers.jar

I don't normally delve into Ant build files, so it's a bit alien.  I 
believe this is the build file for gnumail-providers.jar?


http://svn.sv.gnu.org/viewvc/trunk/mail/build.xml?revision=1156&root=classpathx&view=markup


I'm trying to figure out:

1.)  what the dependencies are for this JAR.  That is, what JAR's do I 
need to put on the classpath?
2.)  which packages, specifically, are being compiled?

The packages seem to organized in a strange way, where gnu.mail is used 
to build gnumail.jar and gnu.mail.providers is used to build this JAR -- 
but one JAR depends upon the other?  It hurts my brain, they're in the 
same package hierarchy.  Also, this JAR, when built, also has some, or 
all of, the gnu.mail.treeutil package.

This one package, gnu.mail, seems spread across two JAR's in a way I've 
never seen before.

Here are the bits of the build file I'm looking at:

   <target name='providers.jar' depends='providers,meta-inf' 
description='Build the GNU JavaMail providers JAR file'>
     <jar basedir='${dst}' destfile='${providers.jar}' 
manifest='${manifest}'>


and

       <packageset dir='${src}'>
         <include name='javax/mail'/>
         <include name='javax/mail/event'/>
         <include name='javax/mail/internet'/>
         <include name='javax/mail/search'/>
         <include name='gnu/mail/providers/smtp'/>
         <include name='gnu/mail/providers/imap'/>
         <include name='gnu/mail/providers/pop3'/>
         <include name='gnu/mail/providers/nntp'/>
         <include name='gnu/mail/providers/mbox'/>
         <include name='gnu/mail/providers/maildir'/>
       </packageset>


from:

http://svn.sv.gnu.org/viewvc/trunk/mail/build.xml?revision=1156&root=classpathx&view=markup


which closely matches:


thufir@dur:~$ jar -tf /usr/share/java/gnumail-providers.jar
META-INF/
META-INF/MANIFEST.MF
gnu/
gnu/mail/
gnu/mail/providers/
gnu/mail/providers/ReadOnlyMessage.class
gnu/mail/providers/imap/
gnu/mail/providers/imap/ACL.class
gnu/mail/providers/imap/IMAPBodyPart.class
gnu/mail/providers/imap/IMAPFlags.class
...
gnu/mail/treeutil/StatusListener.class
gnu/mail/treeutil/StatusSource.class
META-INF/COPYING
META-INF/javamail.address.map
META-INF/javamail.providers
thufir@dur:~$


However, there seem to be far more .class files in the resulting JAR 
than the Ant build file would seem, to me, to package there.

I normally let Netbeans autogenerate the build files, which I would like 
to do in this case as well.  However, I'm not sure **which** JAR's are 
needed to build this JAR, what the dependency structure is, nor am I 
quite clear on which packages should be in the src directory.

There are quite a few .class files in this JAR.

Looking at what Ubuntu does, apt-get install libgnuinet-java 
libgnujaf-java libgnumail-java will bring in:

/usr/share/java/inetlib.jar
/usr/share/java/activation.jar
/usr/share/java/gnumail-providers.jar
/usr/share/java/gnumail.jar


It's only the gnumail-providers JAR which I would like to build 
manually, with Ant.

Yes, I'm aware of the irony of asking on an Apache mailing list about 
GNU.  I'm inferring some sort of political decision by GNU not to use 
Ant, and, I'm sure there, are other API's.


thanks,

Thufir



see also:

http://stackoverflow.com/questions/20729124/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: JAR dependencies for gnumail-providers.jar

Posted by Peter West <li...@pbw.id.au>.
The (unsupported) compilation target 'gnumail' compiles the ${src} directory (source), including the files
gnu/mail/util/*.java
gnu/mail/handler/*.java
javax/mail/**/*.java
The classpath is mail.classpath, defined as
${src}
${activation.jsr}
${inetlib.jar}

The compilation target 'providers' compile to the ${src} directory, including the files
gnu/mail/treeutil/*.java
gnu/mail/providers/*.java
gnu/mail/providers/smtp/*.java (unless disable-smtp)
gnu/mail/providers/imap/*.java  "
gnu/mail/providers/pop3/*.java  "
gnu/mail/providers/nntp/*.java  "
gnu/mail/providers/mbox/*.java  "
gnu/mail/providers/maildir/*.java  "
The classpath is provider.classpath,
mail.classpath
${gnumail.jar}

So, for compilation, providers needs gnumail.jar, but not vice-versa.

Peter West

But Mary kept all these things, pondering them in her heart.

On 23 Dec 2013, at 3:57 am, thufir <ha...@gmail.com> wrote:

> I don't normally delve into Ant build files, so it's a bit alien.  I believe this is the build file for gnumail-providers.jar?
> 
> 
> http://svn.sv.gnu.org/viewvc/trunk/mail/build.xml?revision=1156&root=classpathx&view=markup
> 
> 
> I'm trying to figure out:
> 
> 1.)  what the dependencies are for this JAR.  That is, what JAR's do I need to put on the classpath?
> 2.)  which packages, specifically, are being compiled?
> 
> The packages seem to organized in a strange way, where gnu.mail is used to build gnumail.jar and gnu.mail.providers is used to build this JAR -- but one JAR depends upon the other?  It hurts my brain, they're in the same package hierarchy.  Also, this JAR, when built, also has some, or all of, the gnu.mail.treeutil package.
> 
> This one package, gnu.mail, seems spread across two JAR's in a way I've never seen before.
> 
> Here are the bits of the build file I'm looking at:
> 
>  <target name='providers.jar' depends='providers,meta-inf' description='Build the GNU JavaMail providers JAR file'>
>    <jar basedir='${dst}' destfile='${providers.jar}' manifest='${manifest}'>
> 
> 
> and
> 
>      <packageset dir='${src}'>
>        <include name='javax/mail'/>
>        <include name='javax/mail/event'/>
>        <include name='javax/mail/internet'/>
>        <include name='javax/mail/search'/>
>        <include name='gnu/mail/providers/smtp'/>
>        <include name='gnu/mail/providers/imap'/>
>        <include name='gnu/mail/providers/pop3'/>
>        <include name='gnu/mail/providers/nntp'/>
>        <include name='gnu/mail/providers/mbox'/>
>        <include name='gnu/mail/providers/maildir'/>
>      </packageset>
> 
> 
> from:
> 
> http://svn.sv.gnu.org/viewvc/trunk/mail/build.xml?revision=1156&root=classpathx&view=markup
> 
> 
> which closely matches:
> 
> 
> thufir@dur:~$ jar -tf /usr/share/java/gnumail-providers.jar
> META-INF/
> META-INF/MANIFEST.MF
> gnu/
> gnu/mail/
> gnu/mail/providers/
> gnu/mail/providers/ReadOnlyMessage.class
> gnu/mail/providers/imap/
> gnu/mail/providers/imap/ACL.class
> gnu/mail/providers/imap/IMAPBodyPart.class
> gnu/mail/providers/imap/IMAPFlags.class
> ...
> gnu/mail/treeutil/StatusListener.class
> gnu/mail/treeutil/StatusSource.class
> META-INF/COPYING
> META-INF/javamail.address.map
> META-INF/javamail.providers
> thufir@dur:~$
> 
> 
> However, there seem to be far more .class files in the resulting JAR than the Ant build file would seem, to me, to package there.
> 
> I normally let Netbeans autogenerate the build files, which I would like to do in this case as well.  However, I'm not sure **which** JAR's are needed to build this JAR, what the dependency structure is, nor am I quite clear on which packages should be in the src directory.
> 
> There are quite a few .class files in this JAR.
> 
> Looking at what Ubuntu does, apt-get install libgnuinet-java libgnujaf-java libgnumail-java will bring in:
> 
> /usr/share/java/inetlib.jar
> /usr/share/java/activation.jar
> /usr/share/java/gnumail-providers.jar
> /usr/share/java/gnumail.jar
> 
> 
> It's only the gnumail-providers JAR which I would like to build manually, with Ant.
> 
> Yes, I'm aware of the irony of asking on an Apache mailing list about GNU.  I'm inferring some sort of political decision by GNU not to use Ant, and, I'm sure there, are other API's.
> 
> 
> thanks,
> 
> Thufir
> 
> 
> 
> see also:
> 
> http://stackoverflow.com/questions/20729124/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>