2- Is this an AntSecurityException? Later in 3.1 we
had a bug in the Ant editor similar to this...see bug 86174. If you are using 3.2 and please log a bug report against
Platform-Ant with a build file etc to reproduce the problem and I will
be happy to take a look to determine the root of the problem
Thanks Darins
Gabriele Garuglieri <gabriele.garuglieri@xxxxxxxxxx> Sent by: platform-ant-dev-bounces@xxxxxxxxxxx
10/10/2005 01:12 AM
Please respond to
"Eclipse Ant integration developers list."
To
platform-ant-dev@xxxxxxxxxxx
cc
Subject
[platform-ant-dev] Problems
using custom ant task
Hi all,
i'm having problems using a custom ant task within eclipse.
I wrote a custom task as an extension of import, i.e. it can import ant
build files from a remote location via http url. It first downloads the
remote file in a specified directory using the org.apache.tools.ant.taskdefs.Get
class then imports the local file via the org.apache.tools.ant.taskdefs.ImportTask.
The task works without problems both when i launch ant standalone and when
i launch ant from eclipse using a separate jre, but i have a couple of
problems trying to use it from within eclipse:
1- the first is that if i try to launch the ant file that uses the custom
task using the same jre as eclipse it looks the Task is not completely
initialized when it is executed, because for instance the same org.apache.tools.ant.ProjectComponent.getProject()
method that returns a valid Project reference when the build file is launched
with a separate jre, always return null when the build file is launched
with the same jre as eclipse and the org.apache.tools.ant.Task.getTaskName()
and org.apache.tools.ant.Task.getOwningTarget() returns null too.
2- the other problem is that when i set Get.setUseTimestamp(true), when
i edit the build file the imported file is downloaded, but the import task
is maked with a warning "Security exception" and i cannot see
the imported tasks in Ant view. If i set Get.setUseTimestamp(false)
then the file is downloaded and imported and i can see the imported tasks
in Ant view. I examined many times the Get code but i couldn't imagine
what could be causing eclipse to throw a security exception when Get.setUseTimestamp(true).
The task is installed as a plugin with the following plugin.xml:
<plugin>
</plugin>
and called using
xmlns:auto="antlib:it.autostrade.commonlib.ant"
Is there anybody that could explain this different ant beahviour when run
within eclipse and the causes for security exceptions?
Thanks in advance,
Gabriele
--
Gabriele Garuglieri
Infoblu S.p.A
Sistemi di Viabilità
Nuovo Centro Direzionale
Autostrade // per l'Italia
Svincolo Autostradale Firenze Nord
50013 Campi Bisenzio - Firenze
========================================
email: gabriele.garuglieri@xxxxxxxxxx
email: ggaruglieri@xxxxxxxxxxxxx
phone: +39.055.420.2832
mobile: +39.335.1053305
========================================_______________________________________________
platform-ant-dev mailing list
platform-ant-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-ant-dev