jason mazzotta | 22 Feb 17:24 2015

mail task results in authentication failure when using gmail as smtp server

To whom it may concern,
        I am trying to use gmail as an smtp server with the ant mail task.
I have set up the task as follows:


         user="e-mail address"





         subject="Nightly unit test results">

         <to address="e-mail address" />

         <from address="e-mail address" />

         <message src="/Directory/On/My/Machine" />


This worked a few months ago, but these days, when I run my ant build file
I get the follow error:

Failed to send email: 534-5.7.14 <
(Continue reading)

Jeffrey Walton | 17 Feb 21:11 2015

Specify source file language in build.xml?

I'm trying to build an Android project from the command line. I'm
getting an error during `ant release`. The error is unmappable
character for encoding UTF-8.

The sources appear to be written by a non-English speaker, and the
offending characters are in comments like so:

     * Projet   : Permission Explorer
     * Auteur   : Carlo Criniti
     * Date     : 2011.06.10
     * Classe ApplicationDetail
     * ActivitÈ d'affichage du dÈtail d'une application
     * avec les permissions qu'elle utilise

There are multiple errors like this. If /usr/local/bin/ant release
2>&1 | grep -i error | wc -l is accurate, then there's 103 of them.

I've been through ant's documentation at "Writing a Simple Buildfile"
(http://ant.apache.org/manual/using.html) and "Property Task"
(http://ant.apache.org/manual/Tasks/property.html), but damn if I can
figure out how to set a source file language to get past these errors.

How do I specify a source file language in build.xml?
Jackie Xiao | 13 Feb 02:54 2015

RE: [Ant]Read buid.xml file in memory

Hi, Martin

The thing is, we need to enable customers to work with us, but we don’t want to share the build scripts (I
know it’s weird).

So, we want to encrypt the build.xml and give them the encrypted file.

In the build process, we will decrypt build.xml in memory, and if Ant can read the content from memory, this
should work.

Best Regards

From: Martin Gainty <mgainty <at> hotmail.com<mailto:mgainty <at> hotmail.com>>
Date: 2015年2月12日 GMT+08003时52分04秒
To: Ant Users List <user <at> ant.apache.org<mailto:user <at> ant.apache.org>>
Subject: RE: [Ant]Read buid.xml file in memory
Reply-To: "Ant Users List" <user <at> ant.apache.org<mailto:user <at> ant.apache.org>>
Hi Xiao-

supposedly yes ...if you can get your File to extend apache jackrabbit MemoryFile

I would not rely on any java implementor to guarantee your Java Object will be "in memory" vs "on disk"
specifically a java object which implements Serializable will save the object to disk by the serializer..

(except your objects declared as transient of course)

Did you have a specific requirement in mind for "Memory File" for your build.xml ?

(Continue reading)

Jackie Xiao | 11 Feb 17:07 2015

[Ant]Read buid.xml file in memory

Dear List:

Is it possible for Ant to read build files from memory?

If possible, what will be the necessary steps, thanks.
This e-mail and any attachments thereto are intended for the sole use of the recipient(s) named above and
may contain confidential and/or privileged material. Any use of the information contained herein
(including, but not limited to, total or partial reproduction, communication, or dissemination in any
form) by persons other than the intended recipient(s) is prohibited. If you received this in error,
please contact the sender immediately and delete the material from any computer.
Eric Fetzer | 10 Feb 22:36 2015


I'm running Ant 1.7 and having an issue I don't understand.  I see sshexec finish with a successful status,
then it gets back to the calling task and bombs out.  I upped the timeout value and that seemed to work once,
but not after that even though it's WAY over the value that the ssh command is taking.  Here's the ssh task,
and then the build output:
        <sshexec host="myMachine"
          command="/bin/bash -l ant -f /my/folder/BuildMyApp.xml"
  [sshexec] main:
  [sshexec]   [sshexec]   [sshexec] BUILD SUCCESSFUL  [sshexec] Total time: 1 minute 7 seconds
  [sshexec] Feb 10, 2015 1:25:02 PM org.apache.bsf.BSFManager exec
SEVERE: Exception :
java.security.PrivilegedActionException: org.apache.bsf.BSFException: JavaScript Error:
Internal Error: The following error occurred while executing this line:
c:\BuildDeployScripts\build.xml:338: Remote command failed with exit status -1
 at java.security.AccessController.doPrivileged(AccessController.java:250)
 at org.apache.bsf.BSFManager.exec(BSFManager.java:491)
 at org.apache.tools.ant.util.optional.ScriptRunner.executeScript(ScriptRunner.java:103)
 at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
 at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:618)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
 at org.apache.tools.ant.Task.perform(Task.java:348)
(Continue reading)

Jason Ricles | 5 Feb 15:54 2015

conditional flatten mapping

I have the following flatten mapping in my ant file.

      <path id="build.classpath" path="${deplibs}"/>
      <pathconvert property="mf.classpath" refid="build.classpath" pathsep=" ">

However for a couple of the paths in the deplibs variable I want to
make these full instead of relative paths. Is there anyway to do a
conditional in the pathconvet in ant to say make these flat but do not
flatten these paths?
xeonmailinglist | 29 Jan 16:47 2015

Ant can't find -factorypath option


I am using Apache Ant(TM) version 1.9.3 and during compilation I get the 
error below. It seems that ant does not recognize the option 
|-factorypath|. Is there a way to solve this?

|     [mkdir] Skipping
because it already exists.
      [exec] Current OS is Linux
      [exec] Executing 'apt' with arguments:
      [exec] '-factorypath'
      [exec] '/home/vagrant/Programs/jikesrvm-3.0.0/target/tasks/classes'
      [exec] '-nocompile'
      [exec] '-factory'
      [exec] 'org.jikesrvm.tools.apt.SysCallProcessorFactory'
      [exec] '-classpath'
      [exec] '/home/vagrant/Programs/jikesrvm-3.0.0/target/tasks/classes:/home/vagrant/Programs/jikesrvm-3.0.0/target/vmmagic-stub/classes:/home/vagrant/Programs/jikesrvm-3.0.0/target/FastAdaptiveGenMS_airavat_ia32-linux/classes'
      [exec] '-s'
      [exec] '/home/vagrant/Programs/jikesrvm-3.0.0/target/FastAdaptiveGenMS_airavat_ia32-linux/syscall/java'
      [exec] '/home/vagrant/Programs/jikesrvm-3.0.0/rvm/src/org/jikesrvm/runtime/SysCall.java'
      [exec] The ' characters around the executable and arguments are
      [exec] not part of the command.
Execute:Java13CommandLauncher: Executing 'apt' with arguments:
(Continue reading)

KARR, DAVID | 16 Jan 18:44 2015

Error about "Provider xx not a subtype" from using Ant XJC task

I'm using the Ant XJC task, and attempting to load two JAXB extensions.  One is a local copy of the "element
wrapper" plugin, and the other the "fluent api".

When I run this, I get the following error:
Caused by: java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider
dk.conspicio.jaxb.plugins.XmlElementWrapperPlugin not a subtype
	at com.sun.tools.xjc.Options.findServices(Options.java:965)
	at com.sun.tools.xjc.Options.getAllPlugins(Options.java:383)

I'm asking this here because I am using an Ant task, so perhaps someone might know what that error message
means.  However, I'm calling this from a Gradle build script.  I'll show that in a moment if that helps to
illuminate anything.

I previously was doing the same work in a Maven POM, using the "cxf-xjc-plugin", which was working fine.

My task looks like this:
task processXSDs() << {
	ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask',
				classpath: configurations.jaxb.asPath)
	ant.xjc(destdir: 'tmp', package: "com.att.sunlight.service.domain.serviceCallResults",
extension: true) {
		classpath(path: configurations.jaxb.asPath)
		schema(dir: "src/main/resources/schema", includes: "serviceCallResults.xsd")
        arg(value: "-Xxew")
        arg(value: "-summary target/xew-summary.txt")
        arg(value: "-instantiate lazy")
        arg(value: "-Xfluent-api")
(Continue reading)

Gan Dong | 15 Jan 07:08 2015

org.apache.tools.ant.property.LocalProperties cannot be extended

Hi experts,

Recently, I came across a problem in Ant and the solution seems to
write a custom LocalProperties implementation to fix the issue. But I
found that this class has a sole privet constructor which prevents me
from sub-classing it:

55     /**
56      * Construct a new LocalProperties object.
57      */
58     private LocalProperties() {
59     }

I'd like to know, is such design on purpose? What's the consideration
in making it private?

I know Ant provided a mechanism as following which seems to have the
ability to register user-defined LocalProperties class:

LocalProperties l = (LocalProperties) project.getReference(

(above line is from line 39 of ant source code
also seen from many other tasks )

But actually it doesn't work as LocalProperties cannot be extended,
thus above assigning would cause class cast issue. So I'm confused, if
this is not supposed to be extended, then what's the point of having
(Continue reading)

Marcin Zajączkowski | 5 Jan 22:25 2015

Switch links to image resources on webpage to HTTPS


https://ant.apache.org/mail.html (like other ASF pages) works fine when
accessed via HTTPS. However Firefox generates warning about unencrypted
elements on the web page and it is right.

There is a link to:

which is also available through HTTPS. It would be good to switch it to
HTTPS or use "//www.apache.org/events/current-event-125x125.png" to
allow browser to use protocol consistent with the protocol the whole
page is accessed.



http://blog.solidsoft.info/ - Working code is not enough
Tanguy Thomas | 3 Jan 18:58 2015

Ant illegalArgumentException while trying to build automatic translations ("build-lang")

Dear all,

I am relatively new to Ant using, so may I may miss something obvious but I
tried to follow guidelines and search documentation without success.

When I add the <target name="build-lang">...</target-lang> I get an
IllegalArgumentException related to the lang.dir. Ant however does
something, it creates an English version (but not any other translation)
Language_en.properties, and says "build successful" after this exception.
In case this matters, I am using the JDK 1.8.0 (C:\Program

The build.xml is

*<project name="product-registration-TT-portlet" basedir="."
default="deploy"> <import file="../build-common-portlet.xml" /> <target
name="build-lang">  <antcall target="build-lang-cmd">   <param
name="lang.dir" value="docroot/WEB-INF/src/content" />   <param
name="lang.file" value="Language" />   <param name="lang.translate"
value="true" />  </antcall> </target></project>*

And the output is :


*build-lang-cmd:     [java] Exception in thread "main"
java.lang.IllegalArgumentException: Bad argument
docroot/WEB-INF/src/content     [java]     at
(Continue reading)