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)

YuGiOhJCJ Mailing-List | 31 Dec 00:17 2014

Execute the target only if source files have changed


I have a target that transforms files XCF into PNG by calling the "convert" command.
I would like that this target does not execute if source files (i.e., the XCF files ) have changed.
I have tried with the "uptodate" task but it does not work.
Each time I run ant, the "convert" command is called.

Any idea ?

Thank you.
Best regards.

This is my build.xml file:
<project name="xcf2png" default="png">
	<target name="png-check">
		<uptodate property="png-uptodate" targetfile="png/**.*.png">
			<srcfiles dir= "xcf" includes="**/*.xcf"/>
	<target name="png" depends="png-check" unless="png-uptodate">
		<mkdir dir="png"/>
		<exec executable="convert">
			<arg value="-verbose"/>
			<arg value="-alpha"/>
			<arg value="on"/>
			<arg value="-background"/>
			<arg value="none"/>
			<arg value="-layers"/>
			<arg value="merge"/>
			<arg value="xcf/icon.xcf"/>
(Continue reading)

Tanguy Thomas | 21 Dec 03:05 2014

New user (liferay), getting all the time BUILD FAILED message


I am not familiar anymore to Java, trying hard to self learn from a
Microsoft development background. I installed Apache Ant, following the
"Liferay in Action" manual. Everything worked fine up to the point of
setting up "hello-world" example with Apache Ant ...

Tomcat is installed (Liferay base portal is working) and Apache Ant is
installed but when I run the command

create.bat hello-world "Hello World"

It takes a lot of time and I get several errors about some of the servers
not available (but I see the ivy cache being loaded with some stuffs). I
tried with and without Windows Firewall turned on.
The output will always be BUILD FAILED:

hello-world "
Hello World"
Buildfile: F:\COEProjects\plugins\liferay-plugins-sdk-6.2\portlets\build.xml
[ivy:resolve] :: Apache Ivy 2.3.0 - 20130110142753 ::
[ivy:resolve] :: loading settings :: file =
[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
(Continue reading)

Matt Bertolini | 18 Dec 05:18 2014

Parse jar:file prefix to Resource


I am writing some custom ant tasks and I want to support files inside of
zip/jar files. I have noticed that some ant tasks use the
jar:file:/path/to/a.jar!/path/in/jar/file.xml syntax but I can't seem to
get it work. How do I use this pattern in my tasks and map them to a
Resource object like FileResource, URLResource, etc. Thanks.

Matt Bertolini
Eric Fetzer | 5 Dec 19:24 2014

<exec> kicking my butt with something very simple

I've tried all I can figure out to try on a simple unix command in redhat.  I can run the command line and it works
fine, but ant can't run it to save its life:
<exec executable="sort" dir=".">
  <arg value="-u"/>
  <arg value="existingFile"/>
  <arg value=">"/>
  <arg value="newFile"/>
I've tried putting all the args together, putting some of the args together...  If I run it like this, I get
"sort: stat failed: >: No such file or directory.  If I put the "existingFile > newFile" in the same arg, I get
"sort: stat failed existingFile > newFile: No such file or directory.  If I make the executable "bash" and
use "sort" as the first argument, I get:  [exec] /bin/sort: /bin/sort: cannot execute binary file.  If I run
it as bash and put all the arguments into a single arg value, I get: [exec] bash: sort -u existingFile >
newFile: No such file or directory.

This has got to be simple, please help!

Ryan Payton | 5 Dec 03:13 2014

Problems parsing <at> <at>


I am running into an issue using  <at>  <at>  in a .properties file. The variable is
a database password (I also tried using it in the username and still didn't
work), and fails our build since Ant is unable to connect to the database.
However, when I enter  <at>  <at>  <at>  in the .properties file, and leave the DB user's
password with  <at>  <at>  in it then everything works.

Has anyone encountered any issues like this? If so, what was your solution?
Also, would this be considered a bug, and should I file a bug report?

Thank you

This is a customer's issue, and we cannot change the password or use any