Apache Flex SDK errors when building with ANT

Hi,

I am trying to build the SDK using IntelliJ and it fails with errors such like the one below (8 errors in total)  [ see stack trace below ]

I am using IDEA IntelliJ 12.1.4 and ant 1.8.4 and JDK 1.6.

Running the same build.xml from the cmd line ends sucessfully:
D:\ApacheFlex\git_source\flex-sdk>ant.bat
ANT_OPTS=-Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=512m -XX:MaxHeapSize=512m -XX:+CMSClassUnloadingEnabled -Djava.net
Buildfile: D:\ApacheFlex\git_source\flex-sdk\build.xml

(note: the ANT_OPTS are added at the beginning of ant.bat) .

I tried another simple build.xml under IntelliJ that deletes a non-existing dir, and echoes trace messages.
It completes without any error message.

I tried another build that has the same structure as SDK build, using 3 nested build.xml, called using <ant dir="..." />   and doint the delete at level 3.
Again it was sucessful.

So What's wrong?
should I raise a JIRA for this ?

Simple build.xml:
build.xml source:
<project name="test_delete" default="main" basedir=".">
       <target name="main" >
           <echo message="delete non-existing directory."/>
           <delete dir="notexists" failonerror="false" />
           <echo message="passed the delete." />
       </target>
</project>

build output:
build.xml
main
echo
delete non-existing directory.
delete
echo
passed the delete.

Ant build completed successfully in 0s at 30/09/13 11:39

Nested build.xml
output:
build.xml
main
echo
main, pre- sub1
ant
sub1_main
echo
sub1_main, pre- sub2
ant
sub2
echo
sub2 - delete non-existing directory.
delete
echo
sub2 - passed the delete.
echo
sub1_main, post- sub2
echo
main, post- sub1
Ant build completed successfully in 0s at 30/09/13 11:57


Apache Flex SDK build.xml:
build.xml output:


"C:\Program Files (x86)\Java\jdk1.6.0_17\bin\java" -Xmx256m -Xss4m "-Dant.home=C:\Program Files (x86)\Apache\apache-ant-1.8.4" "-Dant.library.dir=C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib" -Dfile.encoding=windows-1252 -classpath "C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-antlr.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-apache-bcel.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-apache-bsf.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-apache-log4j.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-apache-oro.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-apache-regexp.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-apache-resolver.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-apache-xalan2.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-commons-logging.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-commons-net.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-jai.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-javamail.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-jdepend.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-jmf.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-jsch.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-junit.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-junit4.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-launcher.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-netrexx.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-swing.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant-testutil.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\ant.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\commons-net-3.2.jar;C:\Program Files (x86)\Apache\apache-ant-1.8.4\lib\commons-net-3.3.jar;C:\Program Files (x86)\Java\jdk1.6.0_17\lib\tools.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\lib\idea_rt.jar" com.intellij.rt.ant.execution.AntMain2 -logger com.intellij.rt.ant.execution.IdeaAntLogger2 -inputhandler com.intellij.rt.ant.execution.IdeaInputHandler -buildfile D:\ApacheFlex\git_source\flex-sdk\build.xml main

[...]

Directory does not exist: D:\ApacheFlex\git_source\flex-sdk\frameworks\libs\mx
 at org.apache.tools.ant.taskdefs.Delete.handle(Delete.java:720)
 at org.apache.tools.ant.taskdefs.Delete.execute(Delete.java:629)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
 at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at org.apache.tools.ant.Target.execute(Target.java:392)
 at org.apache.tools.ant.Target.performTasks(Target.java:413)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
 at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
 at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
 at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at org.apache.tools.ant.Target.execute(Target.java:392)
 at org.apache.tools.ant.Target.performTasks(Target.java:413)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
 at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
 at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
 at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
 at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at org.apache.tools.ant.Target.execute(Target.java:392)
 at org.apache.tools.ant.Target.performTasks(Target.java:413)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
 at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
 at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
 at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at org.apache.tools.ant.Target.execute(Target.java:392)
 at org.apache.tools.ant.Target.performTasks(Target.java:413)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
 at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
 at org.apache.tools.ant.Main.runBuild(Main.java:811)
 at org.apache.tools.ant.Main.startAnt(Main.java:217)
 at org.apache.tools.ant.Main.start(Main.java:180)
 at org.apache.tools.ant.Main.main(Main.java:268)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)
[...]

ant main target completed on 09/30/2013 11:05:52 AM

Ant build completed with 8 errors 8 warnings in 6m 11s at 30/09/13 11:05

3 comments

More info:

Build source for the delete in Apache SDK nested build (in frameworks/projects/mx/build.xml)
<target name="clean" depends="bundles-clean">
        <delete failonerror="false">
            <fileset dir="${basedir}" >
                <include name="bundles.properties"/>
                <include name="bundles/en_US/packages.dita"/>
            </fileset>
            <fileset dir="${FLEX_HOME}/frameworks/libs/mx">
                <include name="mx.swc"/>
                <include name="mx.swc.incr"/>
            </fileset>
        </delete>
    </target>

Note:
Actually, the ant build "seems" to be complete, although it signals errors,
so is that delete quiet="false" log trace  is wrongly considered as an error?

0

Looks like a known issue: http://youtrack.jetbrains.com/issue/IDEA-56227. No idea why it has not been fixed for so long time. I'll ask responsible developer.
Is it a stopper or just incorrect presentation of a successful build?

0

I think it's has been partly fixed :), because it does not occur on the simple example provided, and not event on the simpe nested example.
Only the full SDKbuild triggers this option.
Anyway, I checked the full build result by comparing with reference output and it "seems" to be identifical.
I don't know if there are other impacts ...

[edited]
To make things clearer:  It's not a blocker issue, because I know the build is ok.
However, I have to go through the errors, to make sure it's only false "Delete" errors.
Running ant from the command line is an option, but I prefer "integrated" software.
So a fix would be welcome.

0

Please sign in to leave a comment.