On 6/8/07, Kevin Jackson <[EMAIL PROTECTED]> wrote:
Hi,
> This means that the moving ant-email.jar from $ANT_HOME/lib will
> not work.
>
> The EmailTask code could be modified to allow a classpath element to be used
> to load the MimeMailer class (with junittask like classloader tricks),
Yes I looked at seeing if re-writing the EmailTask to include some
<classpath> management code - but the changes required ala Junit were
fairly substantial and overall it was easier to use the classloader
task - which worked perfectly btw and meant that I wasn't re-defining
the scp/sshexec tasks either.
Initially I was thinking of using a separate classloader for
ant tasks/types (I cannot find the e-mail or bugzilla entry),
but currently I do not think that this is necessary as:
- I do not think that more 3th class dependent optional tasks
will be added to ant core (they will be added as antlibs)
(we will have jvm dependent tasks) This means that
there is a relatively small number of optional tasks that need to
be fixed.
- changing classloading for all tasks/types may have strange side-effects
After seeing the classloader task in action I'm +1 for adding it to
the code if the author wants - which from the look of the website they
seem to.
The problems I have with this is that:
1) it uses an undocumented and non-public method in a sun implementation
- this may change in future releases and the method might not exist
in non-sun implementations of the JVM.
2) when ant is used in a IDE, in specific netbeans, the project classloader is
kept from build to build. So modifiing the project classloader may have
strange side effects in later builds on unrelated projects.
so I believe cl:classloader should be supported as an optional antlib.
In my build
system at work, I use it for handling a large number of classloading
issues - for example junit with axis and cobutura.
Peter
Kev
---------------------------------------------------------------------
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]