ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <...@schillbaer.de>
Subject Re: Does mail task work on Eclipse on Mac OSX 10.6?
Date Thu, 10 Sep 2009 19:56:36 GMT
Chris Kimball schrieb:
[..]
> Does this script run 
[...]
> <echo>---------------------------------------------------------------------------------</echo>
> 		<echo> </echo>
> 		<echo>MailTest.xml         ANT_HOME: ${ant.home}</echo>
> 		<echo> </echo>
> 	
> <echo>---------------------------------------------------------------------------------</echo>
>     	
>     <mail mailhost="mail.optonline.net" mailport="25" subject="Test">
>       <from address="mail@cvkimball.com"/>
>       <to address="mail@cvkimball.com"/>
>     	<message>Test message.</message>
>     </mail>
>     	
>  		<echo> </echo>
> 	
> <echo>---------------------------------------------------------------------------------</echo>
> 	</target>
> </project>
> <!--========================================================================-->
> <!--========================================================================-->
> 
> on your machine? (At least without the "initialization error".)

yup, just did a test on my private machine =

OpenSuse 11.1/64bit, jdk 1.6.0_15, Eclipse 3.5 (ships with Ant 1.7.1)
using the latest releases from
JavaMail (1.4.2), JavaActivationFramework (1.0.2)

and it works :-)

how i run Ant scripts in Eclipse =

- using the ant version that ships with eclipse, 3.5 has ant 1.7.1
- create simple project named 'DevJars' in workspace and import all
  those libs i need =
  DevJars/
     /ant (which has the core ant libs, needed for writing own tasks)
     /antxlibs (library dependencies and addon tasks)
     /jakartacommons
     ...

  but if you don't want to have a special project for that, you
  may import from file system too, f.e. /usr/local/antxlibs
  IMO a special project has several advantages, f.e. put it
  under revision control (cvs,svn ..) so others may use it too
  and everyone in the team uses the same version of those libraries.

- then Window|Preferences|Ant|Runtime|Global Entries|Add Jars...
  or Add External Jars ... when importing from filesystem
  and choose all jars from the DevJars/antxlibs in your workspace

my Ant Runtime has following Global entries =
activation.jar ***
ant-contrib.jar
AntelopeTasks_3.5.1.jar
bsf.jar
bsh-2.0b4.jar
/jakartacommons/commons-logging-1.1.1.jar
jakarta-regexp.jar
jna.jar
jruby-complete-1.3.1.jar
js.jar
junit-4.6.jar
jw-antxtras-advanced.jar
jw-antxtras-antunit.jar
jw-antxtras.jar
jw-ped4ant.jar
log4j-1.2.15.jar
mail.jar ***
pop3.jar ***
smtp.jar ***
svnjavahl.jar
svnkit-cli.jar
svnkit.jar
trilead.jar
xmltask-v1.15.1.jar

those marked with *** are needed for mailtask


- then open your antscript in ant editor
- in the Outline view select main target (which should be coloured blue)
  right mouse and either :
    1. Ant Build Shift+Alt+X Q if you want to run it as usual
     or
    2. Ant Build which opens a window where you may choose the main tab
       and put -debug in it, to make your script run in debug level or
       edit classpath and other stuff

and it should work.

Maybe there are problems on MacOS X - i've read from issues with
java and MacOS X - , i wish i had an Apple around
to test it, but ..



Regards, Gilbert


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


Mime
View raw message