You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Chris Kimball <ma...@cvkimball.com> on 2009/09/10 15:57:36 UTC

Does mail task work on Eclipse on Mac OSX 10.6?



With best efforts, can't get the ant 1.7.0 mail task to run under Eclipse on
Mac 10.6. 

  <mail mailhost="mail.optonline.net" mailport="25" subject="Test">
      <from address="mail@xyz.com"/>
      <to address="mail@xyz.com"/>
    	<message>Test message.</message>
  </mail>

produces, in verbose mode,

main:
[antlib:org.apache.tools.ant] Could not load definitions from resource
org/apache/tools/ant/antlib.xml. It could not be found.
        [echo]
---------------------------------------------------------------------------------
        [echo]  
        [echo] MailTest.xml         ANT_HOME: /usr/share/ant
        [echo]  
        [echo]
---------------------------------------------------------------------------------
        [mail] Failed to initialise MIME mail:
org.apache.tools.ant.taskdefs.email.MimeMailer
        [echo]  
        [echo]
---------------------------------------------------------------------------------
BUILD SUCCESSFUL
Total time: 313 milliseconds

What "definitions" is it looking for in resource
org/apache/tools/ant/antlib.xml ?

Thanks,

Chris Kimball
-- 
View this message in context: http://www.nabble.com/Does-mail-task-work-on-Eclipse-on-Mac-OSX-10.6--tp25383764p25383764.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: Newbie question: importing properties from XML file via command line

Posted by Francis GALIEGUE <fg...@one2team.com>.
On Fri, Sep 11, 2009 at 20:35, Scott Stark <ss...@us.ibm.com> wrote:
>
> Hi, this is probably a dumb question but I couldn't find the answer in the
> online doc.
>
> I want to import a set of properties from an XML file when I run an Ant
> build from the command line. I can do that with the -propertyfile param if
> the file has name=value pairs in it. Any way to do this with an XML file
> with properties defined like <property name="blah" value="blahblah"/>?
>
> I know I can do this with the <import> task in the build file, but I want
> to specify different property files at the command line rather than hard
> wire it.
>
> thanks,
>
> Scott
>

There is <xmlproperty>, which can be very convenient at times.

-- 

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

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


Re: Newbie question: importing properties from XML file via command line

Posted by Joe Schmetzer <jo...@exubero.com>.
2009/9/14 Scott Stark <ss...@us.ibm.com>:
> Joe wrote:
>> That's not correct: ant properties in the file are expanded inline.
>> See http://ant.apache.org/manual/CoreTasks/property.html for details
>> (I don't know about ${file.separator}, though)
>
> I see that in the documentation; however it's not working for me.
>
> My properties file:
> script_dir=C:\\working\\scripts;
> test_Dir=${script_dir}\\myDir
>
> My target:
> <target name="propstest">
>  <echo>script_dir property: ${script_dir}</echo>
>  <echo>test_Dir property: ${test_Dir}</echo>
> </target>
>
> My output (ant -f test.xml -propertfile test.properties propstest
>
> propstest:
>     [echo] script_Dir property: C:\working\scripts
>     [echo] test_Dir property: ${script_dir}\myDir
>
> Am I doing something wrong? This is on Windows XP by the way.

I was able to duplicate the same problem on Linux. I tried some
different combinations, and it appears that when you specify the
properties file on the command line, inline expansion of properties
does not occur. However, if you use <property file="test.properties"/>
inside the build.xml, inline expansion works as expected. I suspect
this is an oversight. (would anyone care to confirm?)

Regards,
Joe

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


Re: Newbie question: importing properties from XML file via command line

Posted by Scott Stark <ss...@us.ibm.com>.
Joe wrote:
> That's not correct: ant properties in the file are expanded inline.
> See http://ant.apache.org/manual/CoreTasks/property.html for details
> (I don't know about ${file.separator}, though)

I see that in the documentation; however it's not working for me.

My properties file:
script_dir=C:\\working\\scripts;
test_Dir=${script_dir}\\myDir

My target:
<target name="propstest">
 <echo>script_dir property: ${script_dir}</echo>
 <echo>test_Dir property: ${test_Dir}</echo>
</target>

My output (ant -f test.xml -propertfile test.properties propstest

propstest:
     [echo] script_Dir property: C:\working\scripts
     [echo] test_Dir property: ${script_dir}\myDir

Am I doing something wrong? This is on Windows XP by the way.

> The import tag can use property expansion too. If you don't want to
> hard-wire the file you import, you can use a property. e.g.

Yes that works, thanks! Still like to figure out why the other ain't
working, though...

Scott

Re: Newbie question: importing properties from XML file via command line

Posted by Joe Schmetzer <jo...@exubero.com>.
2009/9/11 Scott Stark <ss...@us.ibm.com>:
>> Any particular reason you're not using a plain old properties file?
>
> Also I've noticed you can't "inherit" properties in a properties file. For
> example, this doesn't work:
>
> projectRoot=C:\\working
> documentSource=${projectRoot}\\documents
>
> And you can't even use ${file.separator}...
>
> Scott
>

That's not correct: ant properties in the file are expanded inline.
See http://ant.apache.org/manual/CoreTasks/property.html for details
(I don't know about ${file.separator}, though)

The import tag can use property expansion too. If you don't want to
hard-wire the file you import, you can use a propery. e.g.

ant -Dimport-file=test.xml

<project>
     <import file="${import-file}"/>
     ...

Regards,
Joe

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


RE: Newbie question: importing properties from XML file via command line

Posted by Scott Stark <ss...@us.ibm.com>.
"Thomas Boyles"  wrote:
> Any particular reason you're not using a plain old properties file?

Well I wanted to make it editable by an XML editor, as well as put comments
and such in there to make it more readable. Just wondering if there's a way
to import an XML file at the command line, since it already exists.

Scott

-----Original Message-----
From: Scott Stark
I want to import a set of properties from an XML file when I run an Ant
build from the command line. I can do that with the -propertyfile param
if
the file has name=value pairs in it. Any way to do this with an XML file
with properties defined like <property name="blah" value="blahblah"/>?



RE: Newbie question: importing properties from XML file via command line

Posted by Scott Stark <ss...@us.ibm.com>.
> Any particular reason you're not using a plain old properties file?

Also I've noticed you can't "inherit" properties in a properties file. For
example, this doesn't work:

projectRoot=C:\\working
documentSource=${projectRoot}\\documents

And you can't even use ${file.separator}...

Scott

RE: Newbie question: importing properties from XML file via command line

Posted by Thomas Boyles <th...@babycenter.com>.
Any particular reason you're not using a plain old properties file?

-----Original Message-----
From: Scott Stark [mailto:sstark@us.ibm.com] 
Sent: Friday, September 11, 2009 11:36 AM
To: Ant Users List
Subject: Newbie question: importing properties from XML file via command
line


Hi, this is probably a dumb question but I couldn't find the answer in
the
online doc.

I want to import a set of properties from an XML file when I run an Ant
build from the command line. I can do that with the -propertyfile param
if
the file has name=value pairs in it. Any way to do this with an XML file
with properties defined like <property name="blah" value="blahblah"/>?

I know I can do this with the <import> task in the build file, but I
want
to specify different property files at the command line rather than hard
wire it.

thanks,

Scott


This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.

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


Newbie question: importing properties from XML file via command line

Posted by Scott Stark <ss...@us.ibm.com>.
Hi, this is probably a dumb question but I couldn't find the answer in the
online doc.

I want to import a set of properties from an XML file when I run an Ant
build from the command line. I can do that with the -propertyfile param if
the file has name=value pairs in it. Any way to do this with an XML file
with properties defined like <property name="blah" value="blahblah"/>?

I know I can do this with the <import> task in the build file, but I want
to specify different property files at the command line rather than hard
wire it.

thanks,

Scott

Re: Does mail task work on Eclipse on Mac OSX 10.6?

Posted by Chris Kimball <ma...@cvkimball.com>.

Other scripts of mine use the jarbundler-1.9 package and run correctly with
this jar placed as a Global entry in the Preferences -> ant -> Runtime
environment.  Thus, Eclipse 3.5 seems to handle add-on jars correctly on
MacOSX 10.6.  

mail.jar from javamail-1.4.2 occupies the same position as jarbundler-1.9 as
a Global entry, yet the error response is that ant can't find a class
(LineInputStream) contained in it.  By unZipping mail.jar, I find
com/sun/mail/util/LineInputStream where it should be.

In fairness, the mail task wasn't working under MacOSX 10.5, either.

It's such a useful task, it's a shame it doesn't work.

Thanks,

Chris Kimball


-- 
View this message in context: http://www.nabble.com/Does-mail-task-work-on-Eclipse-on-Mac-OSX-10.6--tp25383764p25405837.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: Does mail task work on Eclipse on Mac OSX 10.6?

Posted by Damjan Perenic <ba...@gmail.com>.
On Fri, Sep 11, 2009 at 8:06 PM, Rebhan, Gilbert
<Gi...@huk-coburg.de> wrote:
>
> -----Original Message-----
> From: Damjan Perenic [mailto:bager13@gmail.com]
> Sent: Friday, September 11, 2009 2:00 PM
> To: Ant Users List
> Subject: Re: Does mail task work on Eclipse on Mac OSX 10.6?
>
> /*
> I haven't tried Mac OS X 10.6 yet, but this is an issue also under
> Leopard. Built-in ant does not load optional libraries at all. It does
> not matter where you put them. I reported this issue to Apple with
> testcases one year ago (rdar 6239066), but it hasn't been solved yet
> and is still present on Leopard.
> In my ~/.ant I have libraries for SSH an perforce. With built-in ant I
> am not able to run any task requiring optional libraries.
>
> My workaround on Leopard is:
> I unpacked ant distribution 1.7.1 somewhere on my home. I set
> environment variable ANT_HOME pointing to that directory and it works.
> It finds all optional libraries.
> */
>
> so it works with  =
> untar ant binary to f.e. /usr/local/ant171
> change the Eclipse $ANT_HOME via =
> Window|Preferences|Ant|Runtime|AntHome Entries|AntHome...
> and choose  /usr/local/ant171 ?
>
> or does it mean Ant ain't usable with Eclipse on Mac OS, only
> outside Eclipse ?

Actually, I haven't tried with Eclipse. That is built-in ant behaviour
from the command line. If Eclipse on Mac OS X is using Mac OS X
version, then yes, I think that workaround should work.

I am running ant from command line and it does not load optional
libraries unless I set ANT_HOME env. variable to the one I downloaded
from the apache.

Damjan

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


RE: Does mail task work on Eclipse on Mac OSX 10.6?

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
 
-----Original Message-----
From: Damjan Perenic [mailto:bager13@gmail.com] 
Sent: Friday, September 11, 2009 2:00 PM
To: Ant Users List
Subject: Re: Does mail task work on Eclipse on Mac OSX 10.6?

/*
I haven't tried Mac OS X 10.6 yet, but this is an issue also under
Leopard. Built-in ant does not load optional libraries at all. It does
not matter where you put them. I reported this issue to Apple with
testcases one year ago (rdar 6239066), but it hasn't been solved yet
and is still present on Leopard.
In my ~/.ant I have libraries for SSH an perforce. With built-in ant I
am not able to run any task requiring optional libraries.

My workaround on Leopard is:
I unpacked ant distribution 1.7.1 somewhere on my home. I set
environment variable ANT_HOME pointing to that directory and it works.
It finds all optional libraries.
*/

so it works with  =
untar ant binary to f.e. /usr/local/ant171
change the Eclipse $ANT_HOME via =
Window|Preferences|Ant|Runtime|AntHome Entries|AntHome...
and choose  /usr/local/ant171 ?

or does it mean Ant ain't usable with Eclipse on Mac OS, only
outside Eclipse ?


Regards, Gilbert

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


Re: Does mail task work on Eclipse on Mac OSX 10.6?

Posted by Damjan Perenic <ba...@gmail.com>.
On Fri, Sep 11, 2009 at 9:30 AM, Chris Kimball <ma...@cvkimball.com> wrote:
>
>
> At this point, I've done the following:
>
> 1. Installed Eclipse 3.5.  It does have ant 1.7.1, an improvement.
>
> 2. Inserted the jars activation.jar (jaf-1.0.2) mail, smtp, and pop
> (javamail-1.42.) as Global Entries under the Preferences ant Runtime window.
>
> 3. Stopped using the Run as ... External tools configuration entirely.
>
> and I'm getting the familiar
>
> java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream
>
> even though it's clearly in mail.jar of javamail-1.4.2 .
>
> My other ant scripts run correctly.
>
> My guess is that it's a MacOSX problem.  Possibly 32 vs 64 bit stuff.

I haven't tried Mac OS X 10.6 yet, but this is an issue also under
Leopard. Built-in ant does not load optional libraries at all. It does
not matter where you put them. I reported this issue to Apple with
testcases one year ago (rdar 6239066), but it hasn't been solved yet
and is still present on Leopard.
In my ~/.ant I have libraries for SSH an perforce. With built-in ant I
am not able to run any task requiring optional libraries.

My workaround on Leopard is:
I unpacked ant distribution 1.7.1 somewhere on my home. I set
environment variable ANT_HOME pointing to that directory and it works.
It finds all optional libraries.

Kind regards,
Damjan Perenic

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


Re: Does mail task work on Eclipse on Mac OSX 10.6?

Posted by Chris Kimball <ma...@cvkimball.com>.

At this point, I've done the following:

1. Installed Eclipse 3.5.  It does have ant 1.7.1, an improvement.

2. Inserted the jars activation.jar (jaf-1.0.2) mail, smtp, and pop
(javamail-1.42.) as Global Entries under the Preferences ant Runtime window.

3. Stopped using the Run as ... External tools configuration entirely.

and I'm getting the familiar

java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream

even though it's clearly in mail.jar of javamail-1.4.2 .

My other ant scripts run correctly.

My guess is that it's a MacOSX problem.  Possibly 32 vs 64 bit stuff.

Will be away until Monday.

Thanks for all the detailed assistance!

Chris Kimball

-- 
View this message in context: http://www.nabble.com/Does-mail-task-work-on-Eclipse-on-Mac-OSX-10.6--tp25383764p25393635.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: Does mail task work on Eclipse on Mac OSX 10.6?

Posted by Gilbert Rebhan <an...@schillbaer.de>.
Gilbert Rebhan schrieb:
> 
> 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 ..

P.S.:

might be a problem with Ant 1.7.0 too, never used that version.
If using an Eclipse Version that ships with Ant < 1.7.1
just download Ant 1.7.1 binary from =
http://ant.apache.org/bindownload.cgi

untar to f.e. /usr/local/ant171
and change the Eclipse $ANT_HOME like that =
Window|Preferences|Ant|Runtime|AntHome Entries|AntHome...
and choose your/path/to/ant171

but if possible use the most recent Eclipse 3.5, and you
have already ant171 around


Regards, Gilbert






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


Re: Does mail task work on Eclipse on Mac OSX 10.6?

Posted by Gilbert Rebhan <an...@schillbaer.de>.
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


RE: Does mail task work on Eclipse on Mac OSX 10.6?

Posted by Chris Kimball <ma...@cvkimball.com>.


When I put either ant-javamail-1.7.0.jar or ant-javamail-1.7.1.jar on my
"Run as" classpath, then the error

java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream

reappears.  It's strange that ADDING a jar causes ant to lose
LineInputStream.

I'm guessing that there's an incompatibility among ant 1.7.0 jars and the
activation, mail, and smtp jars.

Does this script run 

<?xml version="1.0"?>
<!--========================================================================-->
<!--========================================================================-->
<!--
             MailTest.xml           
-->
<!--========================================================================-->
<!--========================================================================-->
<project default="main">


<!--========================================================================-->
	<!--
              doit - Do it all         
     -->

<!--========================================================================-->
    <target name="main" > 

	
<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".)

Thanks,

Chris




Rebhan, Gilbert wrote:
> 
>  
> 
> -----Original Message-----
> From: Rebhan, Gilbert
> Sent: Thursday, September 10, 2009 5:06 PM
> To: 'Ant Users List'
> Subject: RE: Does mail task work on Eclipse on Mac OSX 10.6?
> 
> /*
> you need mail.jar, activation.jar,smtp.jar and
> ant-javamail.jar but that is already in $ANT_HOME/lib, maybe you need to
> put it on
> the classpath also, if you use "Run As .."
> */
> 
> 
> P.S. :
> activation.jar = JavaBeans Activation Framework , see :
> http://java.sun.com/javase/technologies/desktop/javabeans/jaf/downloads/index.html
> 
> Regards, Gilbert
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Does-mail-task-work-on-Eclipse-on-Mac-OSX-10.6--tp25383764p25385742.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


RE: Does mail task work on Eclipse on Mac OSX 10.6?

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
 

-----Original Message-----
From: Rebhan, Gilbert
Sent: Thursday, September 10, 2009 5:06 PM
To: 'Ant Users List'
Subject: RE: Does mail task work on Eclipse on Mac OSX 10.6?

/*
you need mail.jar, activation.jar,smtp.jar and
ant-javamail.jar but that is already in $ANT_HOME/lib, maybe you need to put it on
the classpath also, if you use "Run As .."
*/


P.S. :
activation.jar = JavaBeans Activation Framework , see :
http://java.sun.com/javase/technologies/desktop/javabeans/jaf/downloads/index.html

Regards, Gilbert



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


RE: Does mail task work on Eclipse on Mac OSX 10.6?

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
 

-----Original Message-----
From: Chris Kimball [mailto:mail@cvkimball.com] 
Sent: Thursday, September 10, 2009 4:45 PM
To: user@ant.apache.org
Subject: RE: Does mail task work on Eclipse on Mac OSX 10.6?


/*

mail.jar and smtp.jar are from the javamail-1.4.2.zip distribution.  Just to
check, I've added the remaining jars from the package.  Note:  I'm using the
"Run As.." "Open external tools" Classpath tab to add the jars.  I just put
them into the global path through the Preferences menu item, with the same
effect.

I also tried eliminating the mailhost and mailport attributes and placing
the from, tolist and message attributes within a single mail tag.  All to no
effect.

The mailhost and mailport values are what my Thunderbird browser shows.

Thanks for any help you could provide.

Chris Kimball
*/


you need mail.jar, activation.jar,smtp.jar and
ant-javamail.jar but that is already in $ANT_HOME/lib, maybe you need to put it on
the classpath also, if you use "Run As .."


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


RE: Does mail task work on Eclipse on Mac OSX 10.6?

Posted by Chris Kimball <ma...@cvkimball.com>.


mail.jar and smtp.jar are from the javamail-1.4.2.zip distribution.  Just to
check, I've added the remaining jars from the package.  Note:  I'm using the
"Run As.." "Open external tools" Classpath tab to add the jars.  I just put
them into the global path through the Preferences menu item, with the same
effect.

I also tried eliminating the mailhost and mailport attributes and placing
the from, tolist and message attributes within a single mail tag.  All to no
effect.

The mailhost and mailport values are what my Thunderbird browser shows.

Thanks for any help you could provide.

Chris Kimball





Rebhan, Gilbert wrote:
> 
>  
> 
> 
> 
> -----Original Message-----
> From: Chris Kimball [mailto:mail@cvkimball.com] 
> Sent: Thursday, September 10, 2009 3:58 PM
> To: user@ant.apache.org
> Subject: Does mail task work on Eclipse on Mac OSX 10.6?
> 
> /*
> With best efforts, can't get the ant 1.7.0 mail task to run under Eclipse
> on
> Mac 10.6. 
> ...
> ---------------------------------------------------------------------------------
>         [mail] Failed to initialise MIME mail:
> org.apache.tools.ant.taskdefs.email.MimeMailer
> */
> 
> do you have JavaMail on classpath ?
> http://ant.apache.org/manual/install.html#librarydependencies
> 
> in Eclipse go Window|Preferences|Ant|Runtime to check
> 
> if not go to =
> http://java.sun.com/products/javamail/downloads/index.html
> 
> and get it, add to Ant Runtime via =
> Window|Preferences|Ant||Runtime|Global Entries|Add Jars...
> 
> 
> 
> Regards, Gilbert
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Does-mail-task-work-on-Eclipse-on-Mac-OSX-10.6--tp25383764p25384641.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


RE: Does mail task work on Eclipse on Mac OSX 10.6?

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
 



-----Original Message-----
From: Chris Kimball [mailto:mail@cvkimball.com] 
Sent: Thursday, September 10, 2009 3:58 PM
To: user@ant.apache.org
Subject: Does mail task work on Eclipse on Mac OSX 10.6?

/*
With best efforts, can't get the ant 1.7.0 mail task to run under Eclipse on
Mac 10.6. 
...
---------------------------------------------------------------------------------
        [mail] Failed to initialise MIME mail:
org.apache.tools.ant.taskdefs.email.MimeMailer
*/

do you have JavaMail on classpath ?
http://ant.apache.org/manual/install.html#librarydependencies

in Eclipse go Window|Preferences|Ant|Runtime to check

if not go to =
http://java.sun.com/products/javamail/downloads/index.html

and get it, add to Ant Runtime via =
Window|Preferences|Ant||Runtime|Global Entries|Add Jars...



Regards, Gilbert


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