FlexBuilder 3 = MXMLC and ANT?

Hi all-
Admittedly I'm a flash / flex newbie, I have kindof a basic
question... Flex Builder 3 has the .project and
.actionScriptProperties files. I'm aware that MXMLC has a
"--load-config" option. What is the best way to unify those two
things? I've been trying for a week to get this stuff working using
basic MXMLC stuff and I've got some things but I don't think it's
the same thing that running a build in FlexBuilder does.
The command I'm running is:
mxmlc +FOO=something +BAR=something
--load-config=./test-flex-config.xml MyFile.as -output MyOutput.swf
...so I think I've gotten far, but I don't understand why I
can't use "mxmlc
--load-actionScriptProperties=./.actionScriptProperties" ??? Aren't
they all made by Adobe?
--Robert

No not really (thanks anyway). The link shows basically the same as my input except for the better formatting of the output.
Both my and the example given both uses the Ant <exec> tag which start ojaudit from the command line. The problems still exist because I would like Ant to know if something was reported and the stop the Ant build process. A kind of "failOnValidationError".
PMD has this (example below shows and Ant tag called pmd which is part of the PMD system.
<pmd printToConsole="yes" failOnRuleViolation="on">
Can ojaudit also do something like this? Or is there a way Ant can "scan" the result from the audit process and take the appropriate action?

Similar Messages

  • Swf, swc and the mxmlc, compc ant tasks

    I'm a bit confused on the end result of the mxmlc / compc ant
    tasks, or maybe the difference between swf and swc files. I have a
    library of 60 or so AS3 files used for
    serialization/deserialization of my Java backend (using GDS for
    serialization of data between java serverside and my flex front
    end). I first use the compc ant task on these AS3 files to create a
    swc file. This swc is 453316 bytes. With this flash library, I use
    the mxmlc ant task on my mxml file, which produces a 201,492-byte
    swf file.
    I have a couple questions related to the procedure above.
    Shouldn't the swf file include the swc file, and hence be bigger
    than the swc? I'm just wondering if I deploy the swf file, will it
    have all it needs in the swc file to perform the functions
    correctly?
    My second question relates to setting the
    keep-generated-actionscript="true" in the mxmlc task. When
    doing this, I see all the AS3 code generated. However, it does not
    include 55 of the 60 AS3 classes compiled in the swc. It only
    generated AS3 code for those AS3 classes explicitly declared in the
    mxml code (via import and actual declaration). Am I doing something
    wrong here or is this the way flex does its thing?
    The reason why I'm concerned about this is that I'm getting a
    "ArgumentError: Error #2004: One of the parameters is
    invalid" issue am I'm think its happening in the AS3 code (not
    the Java server side) and I don't know how to debug this.
    Any help would be appreciated. Thanks in advanced!
    -los

    I am also facing with the same problem.....
    Is there any resolution for this problem.?
    Not sure where i am going wrong.
    Any help will be appreciated.
    Thanks in advance.

  • Cannot make .war file using tomcat with eclipse and ant

    i have made all necesary configuration for deploying application using eclipse and ant for the tomcat server.
    when i start the server by clicking the tomcat icon on eclipse toolbar, the message is prompted that "missing application web.xml and using defaults". i have placed the web.xml file in the web/WEB-INF directory of the source project directory.
    also when i use ant by right-clicking on the build.xml file and choose Run as ant.. the process creates a desired .war file in webapps folder of the tomcat server but that war file does not works.
    where is the error i cannot figure out.
    am attaching the code of build.xml for reference.
    please help.
    build.xml:-
    <project name="BecilCTI" default="compile" basedir=".">
    <property file="build.properties"/>
    <property file="${user.home}/build.properties"/>
    <property name="app.name" value="BecilCTI"/>
    <property name="app.path" value="/${app.name}"/>
    <property name="app.version" value="0.1-dev"/>
    <property name="build.home" value="${basedir}/build"/>
    <property name="catalina.home" value="c:/Tomcat_5.5"/> <!-- UPDATE THIS! -->
    <property name="dist.home" value="${basedir}/dist"/>
    <property name="docs.home" value="${basedir}/docs"/>
    <property name="manager.url" value="http://localhost:8080/manager"/>
    <property name="src.home" value="${basedir}/src"/>
    <property name="web.home" value="${basedir}/web"/>
    <property name="compile.debug" value="true"/>
    <property name="compile.deprecation" value="false"/>
    <property name="compile.optimize" value="true"/>
    <!--<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>-->
    <path id="compile.classpath">
    <!-- Include all elements that Tomcat exposes to applications -->
    <pathelement location="${catalina.home}/common/classes"/>
    <fileset dir="${catalina.home}/common/endorsed">
    <include name="*.jar"/>
    </fileset>
    <fileset dir="${catalina.home}/common/lib">
    <include name="*.jar"/>
    </fileset>
    <pathelement location="${catalina.home}/shared/classes"/>
    <fileset dir="${catalina.home}/shared/lib">
    <include name="*.jar"/>
    </fileset>
    </path>
    <target name="all" depends="clean,compile"
    description="Clean build and dist directories, then compile"/>
    <target name="clean"
    description="Delete old build and dist directories">
         <echo message="Cleaning all dirs."/>
    <delete dir="${build.home}"/>
    <delete dir="${dist.home}"/>
    </target>
    <target name="compile" depends="prepare"
    description="Compile Java sources">
    <!-- Compile Java classes as necessary -->
    <mkdir dir="${build.home}/WEB-INF/classes"/>
    <javac srcdir="${src.home}"
    destdir="${build.home}/WEB-INF/classes"
    debug="${compile.debug}"
    deprecation="${compile.deprecation}"
    optimize="${compile.optimize}">
    <classpath refid="compile.classpath"/>
    </javac>
    <!-- Copy application resources -->
    <copy todir="${build.home}/WEB-INF/classes">
    <fileset dir="${src.home}" excludes="**/*.java"/>
    </copy>
    </target>
    <target name="dist" depends="compile"
    description="Create binary distribution">
    <!-- Copy documentation subdirectories
    <mkdir dir="${dist.home}/docs"/>
    <copy todir="${dist.home}/docs">
    <fileset dir="${docs.home}"/>
    </copy> -->
    <!-- Create application JAR file -->
    <jar jarfile="${catalina.home}/webapps/${app.name}.war"
    basedir="${build.home}"/>
    <!-- Copy additional files to ${dist.home} as necessary -->
    </target>
    <target name="install" depends="compile"
    description="Install application to servlet container">
    <deploy url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"
    path="${app.path}"
    localWar="file://${build.home}"/>
    </target>
    <target name="list"
    description="List installed applications on servlet container">
    <list url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"/>
    </target>
    <target name="prepare">
    <!-- Create build directories as needed -->
    <mkdir dir="${build.home}"/>
    <mkdir dir="${build.home}/WEB-INF"/>
    <mkdir dir="${build.home}/WEB-INF/classes"/>
    <!-- Copy static content of this web application -->
    <copy todir="${build.home}">
    <fileset dir="${web.home}"/>
    </copy>
    <mkdir dir="${build.home}/WEB-INF/lib"/>
    </target>
    <target name="reload" depends="compile"
    description="Reload application on servlet container">
    <reload url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"
    path="${app.path}"/>
    </target>
    <target name="remove"
    description="Remove application on servlet container">
    <undeploy url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"
    path="${app.path}"/>
    </target>
    </project>

    So is context.xml actually overwriting the settings found in server.xml?I think so. The way I understand it is the the context.xml file saves you from having to edit server.xml. It is preferred for each web app to do its own config, rather than lumping them all together in server.xml.
    And what would be the best way to create the war file? IAt its heart, a WAR is just a zip file with its contents laid out in according to the specification of a web application directory structure.
    So the simplest way to make a war file is to zip up your directory structure with a tool like winzip, and rename it to be myApp.war.
    Regarding ant, I would recommend you take a look through [url http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
    ]this tutorial. It explains the basics of website layout, configuration and deployment.
    On [url http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/source.html] this page  in particular, it includes a link to a basic ant file that you can use as a starting point.
    Cheers,
    evnafets

  • 10g BPEL process upgrade to 11g hangs in Jdeveloper and Ant script

    I have successfully upgraded several 10g (10.1.3.4) BPEL processes and ESB services using Jdeveloper 11g (11.1.1.6.0) migration wizard and deployed them to an 11g environment. Both 10g and 11g environments are up and running.
    However, my 11g jdeveloper hangs when migrating the next BPEL process. It hangs at the message box with the title: "Migration Status". I tried the Ant script and it hangs too. It hangs after printing out:
    "CompositeRefs
    [upgrade] WARNING: UPGBPEL-02009: No Binding setup for : "soapCheckPrivileges"
    . This will cause compilation of the upgraded project to fail. Check SOA Upgrade
    documentation on manual steps necessary to bind this composite reference. If ne
    cessary, upgrade and deploy any dependencies. If planning to retain 1013x nodes
    in this projects dependency tree, check earlier part of this log for 1013x WSDL
    URLs that can be used."
    I guess it makes sense since Jdeveloper and Ant script use the same code base for migration.
    One other observation is that if I kill the hanging jdeveloper process and reopen it and go through the migration wizard again, it will be successful without hanging. However, when I fix all the wsdl reference and do a build and deploy to sar. The resulting sar is defective and cannot be deployed to Weblogic even if both build and deploy to sar report success. The defective sar contains only scac.log and scac-log.xml, not even composite.xml.
    One difference between this BPEL process and others I have successfully upgraded is that it depends on an ESB service (this esb service has been upgraded and deployed to 11g).
    Any ideas?
    Thanks,

    I will answer my question. I killed the migrating Java process and the migrating wizard will report failure of migrating the .jpr file. Actually, the only thing missing in the migrated .jpr file is deployment profile which I can generate from deployment menu. And I can deploy the migrated process. This works as a workaround.

  • [svn] 758: Updating all modules to Java 1.5.0 and Ant 1.7.0

    Revision: 758
    Author: [email protected]
    Date: 2008-03-07 10:47:56 -0800 (Fri, 07 Mar 2008)
    Log Message:
    Updating all modules to Java 1.5.0 and Ant 1.7.0
    * Updated setup.sh to reflect this.
    * Added an Eclipse project called flex-asc; it's required to run the other compiler projects now (now you can build and debug the entire compiler, including asc, all in Eclipse; I've removed the reference to asc.jar).
    * The other Eclipse projects now specify Java 1.5.
    * Revving asc.jar for compatibility with Java 1.5; it's taken from the 3.0.x branch temporarily while mainline asc is fixed up.
    * Fixed some assertions in mainline ASC (commenting them out with comments means fixing them, in this case)
    * Fixed some in-your-face warnings in the modules when compiling.
    * This will probably break the build, so hold tight. Preemptively, I'm on it...
    Modified Paths:
    flex/sdk/trunk/README.txt
    flex/sdk/trunk/development/eclipse/java/flex-compiler/.classpath
    flex/sdk/trunk/development/eclipse/java/flex-compiler/.settings/org.eclipse.jdt.core.pref s
    flex/sdk/trunk/development/eclipse/java/flex-compiler/.settings/org.eclipse.jdt.ui.prefs
    flex/sdk/trunk/development/eclipse/java/flex-debugger/.classpath
    flex/sdk/trunk/development/eclipse/java/flex-debugger/.settings/org.eclipse.jdt.core.pref s
    flex/sdk/trunk/development/eclipse/java/flex-debugger/.settings/org.eclipse.jdt.ui.prefs
    flex/sdk/trunk/development/eclipse/java/flex-jars/.classpath
    flex/sdk/trunk/development/eclipse/java/flex-swfutils/.classpath
    flex/sdk/trunk/development/eclipse/java/flex-swfutils/.settings/org.eclipse.jdt.core.pref s
    flex/sdk/trunk/development/eclipse/java/flex-swfutils/.settings/org.eclipse.jdt.ui.prefs
    flex/sdk/trunk/lib/asc.jar
    flex/sdk/trunk/modules/antTasks/build.xml
    flex/sdk/trunk/modules/asc/README.txt
    flex/sdk/trunk/modules/asc/build/java/build.xml
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/embedding/LintEvaluator.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/MetaDataEvaluator.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/util/Context.java
    flex/sdk/trunk/modules/compiler/build.xml
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/API.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/config/ConfigurationBuffer.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/swc/zip/ZipEntry.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/ToolsConfiguration.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/Library.java
    flex/sdk/trunk/modules/debugger/build.xml
    flex/sdk/trunk/modules/swfutils/build.xml
    flex/sdk/trunk/modules/swfutils/src/java/flash/util/ExceptionUtil.java
    flex/sdk/trunk/setup.sh
    Added Paths:
    flex/sdk/trunk/development/eclipse/java/flex-asc/
    flex/sdk/trunk/development/eclipse/java/flex-asc/.classpath
    flex/sdk/trunk/development/eclipse/java/flex-asc/.project
    flex/sdk/trunk/development/eclipse/java/flex-asc/.settings/
    flex/sdk/trunk/development/eclipse/java/flex-asc/.settings/org.eclipse.jdt.core.prefs
    flex/sdk/trunk/development/eclipse/java/flex-asc/.settings/org.eclipse.jdt.ui.prefs
    flex/sdk/trunk/development/eclipse/java/flex-jars/.settings/
    flex/sdk/trunk/development/eclipse/java/flex-jars/.settings/org.eclipse.jdt.core.prefs
    Property Changed:
    flex/sdk/trunk/development/eclipse/java/flex-compiler/
    flex/sdk/trunk/development/eclipse/java/flex-debugger/
    flex/sdk/trunk/development/eclipse/java/flex-jars/
    flex/sdk/trunk/development/eclipse/java/flex-swfutils/

    I'm expieriencing the very same problem, i.e. code compilation with a 1.5.0_06 compiler and execution on a 1.5.0_06 jre works fine, but the code parser will display an red line under a code line like the following:
    Vector<String> sv = new Vector<String>();
    I did what was hinted to in the reply. I connected to archive rt.jar in the jre-director of the jdk-1.5 and connected the javadoc for 1.5, but I still have the red lines.
    I have also added the argument -source 1.5 to the compiler, but nothing seems to help.
    Any hints very much appreciated. Many thanks.
    Pasqualino

  • Jdeveloper and ant

    hello,
    i need execute ant script before create EAR and WAR file
    i found the option in the project war properties ant xml execute but the build.xml don't run ,
    any ideas for jdeveloper and Ant integration ?
    the use case this i want create a properties file with svn version.
    thanks!!

    <?xml version="1.0" encoding="windows-1252" ?>
    <project xmlns="antlib:org.apache.tools.ant" default="generar">
    <path id="path.svnant">
    <pathelement location="libs/svnant/svnant.jar"/>
    <pathelement location="libs/svnant/svnClientAdapter.jar"/>
    <pathelement location="libs/svnant/svnjavahl.jar"/>
    <pathelement location="libs/svnant/svnkit.jar"/>
    <pathelement location="libs/svnant/ganymed.jar"/>
    <pathelement location="libs/svnant/jna.jar"/>
    </path>
    <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="path.svnant"/>
    <target name="find_revision" >
    <property name="directorio" value="${buildir}"/>
    <!-- find out revision number of HEAD, need svn.exe installed on local machine -->
    <exec executable="svn" outputproperty="svnlog.out">
    <arg line="log ../"/>
    </exec>
    <echo>${homedir}</echo>
    <echo>${svnlog.out}</echo>
    <taskdef resource="net/sf/antcontrib/antcontrib.properties">
    <classpath>
    <pathelement location="libs/svnant/ant-contrib-1.0b3.jar"/>
    </classpath>
    </taskdef>
    <propertyregex property="revision.number" input="${svnlog.out}" select="\1">
    <regexp pattern="r([0-9]*)"/>
    </propertyregex>
    <echo file="src\org\sidoc\common\BuildInfo.java">
    package org.common;
    public class BuildInfo {
    public static final String revisionNumber="${revision.number}";
    </echo>
    </target>
    </project>
    works!

  • Howto - JDev 10.1.3 - Audit tools and Ant

    Hi
    I'm playing around with Audit tools. I want to be able to call this from Ant. One primitive method is as follows:
    <target name="Audit" description="Running audit on source code">
    <property name="audit" value="ojaudit"/>
    <property name="profile" value="-profile MyRules"/>
    <property name="project" value="test3.jpr"/>
    <property name="output" value="-output d:\result.xml"/>
    <exec executable="cmd.exe" os="Windows XP" >
    <arg line="/c ${audit} ${profile} ${project} ${output}"/>
    </exec>
    </target>
    With results like:
    Audit:
    [exec] Oracle JDeveloper 10g Early Access Audit 10.1.3.0.3.3412
    [exec] Copyright (c) 2003-2005 Oracle. All Rights Reserved.
    [exec]
    [exec] Audit completed: 1 violation, no exceptions, 2 documents, 3 seconds
    BUILD SUCCESSFUL
    Total time: 3 seconds
    But then I'm unable to handle the result - unless I parse the output file. I want the Ant build file to fail if ojaudit find errors. Is this possible?
    I know the PMD extension exist but I really like the Jdev Audit stuff - but I need an interface to Ant to make it really useful: We have a build tool which build on every SCM check in. I would like the JDev Audit be part of that process so that source code problems (audit, metrics) are handles in the same process as well.
    By the way JDev 10.1.3 is great...
    johnny

    No not really (thanks anyway). The link shows basically the same as my input except for the better formatting of the output.
    Both my and the example given both uses the Ant <exec> tag which start ojaudit from the command line. The problems still exist because I would like Ant to know if something was reported and the stop the Ant build process. A kind of "failOnValidationError".
    PMD has this (example below shows and Ant tag called pmd which is part of the PMD system.
    <pmd printToConsole="yes" failOnRuleViolation="on">
    Can ojaudit also do something like this? Or is there a way Ant can "scan" the result from the audit process and take the appropriate action?

  • Difference happened between jar files by Jbuilder and ANT.

    I have a java project, and write an .xml file for it. I found that when I use this build.xml file to build the project in JBuilder, it generated a .jar file. Later when I go to command line and use this build.xml file directly with ANT, another .jar file is generated. The 2 files are different (The version of JDK and ANT are same).
    Has someone met such phenomenon before ? Or who can tell me what the reason is ?
    Thanks a lot.

    I too had the same. If U got any info plz do inform me........

  • JDev9033, SQLJ and Ant

    Hi, can anybody help me with this?
    In this project we use JDev9033, JDK1.4.2_02, SQLJ, Ant1.54 and Oracle 9.2.0.1 client. Now I have a problem integrating OJC and Ant, since we want to use Ant from within JDev to build the project.
    I have set up the paths and class paths according to Oracle 9i SQLJ Developers Guide (Release 2). If I compile from JDev without Ant, JDev compiles the projects *.java and *.sqlj classes corretly.
    I have set the build.properties and build.xml file according to the paths specified in the build.xml file, which JDev can generate for me. And I have included jdev.jar and ojc.jar in the class path.
    Any way I get the exception with the -debug flag set i Ant:
    BUILD FAILED
    file:D:/JDev/GCSSMLIS/Tests/build.xml:166: Compiler Adapter 'oracle.jdeveloper.compiler.ant.teskdefs.OjcAdapter' can't be found.
         at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.resolveClassName(CompilerAdapterFactory.java:195)
    In build.properties I have:
    # COMPILATION SETTINGS
    compiler=oracle.jdeveloper.compiler.ant.teskdefs.OjcAdapter
    source="1.4"
    target="1.4"
    deprecation="on"
    optimize="off"
    debug="on"
    optimize=off
    and in build.xml:
    <javac
    compiler="${compiler}"
    srcdir="${comp.dir}"
    destdir="${build.dir}"
    includes="**/*.java, **/*TEST*.java, **/Test*.java"
    >
    <classpath refid="classpath" />
    </javac>
    with classpath:
    <path id="classpath">
    <fileset dir="${javac.path}" >
    <include name="*.jar" />
    </fileset>
    <fileset dir="${jdev.home}/sqlj/lib" >
    <include name="*.jar" />
    </fileset>
    <pathelement location="${jdev.home}/jdev/lib/jdev.jar" />
    <pathelement location="${jdev.home}/jdev/lib/ojc.jar" />
    <pathelement location="${ora.home}/jdbc/lib/ojdbc14.jar" />
    <pathelement location="${ant.path}/optional.jar"/>
    <pathelement location="${junit.path}/junit.jar" />
    </path>
    Regards
    Flemming

    Matthew,
    Thank for your replies. I manages to get rid of the Ant error by using the first method. I would expect the second to work to.
    I do not expect the OjcAdapter to translate the sqlj files into java files. I have read those chapters in the SQLJ Developers Guide.
    I would like to do obtain is the following:
    1) Use Ant as build system. I do not care, if Ant is external or internal to JDeveloper since both version are 1.5.3. But we have a lot of other steps like ftp to development server, running JUnit, updating CVS and VSS, documentation and so on, so I need Ant to make one build file that every body in the project can use.
    2) Use jre/sdk 1.4.2, sqlj and Oracle client 9.2.0. So I have to translate the projects sqlj files to x.generate.java files before I pass all projects files to a Java compiler.
    3) I tried to build an Ant precompile task in this way:
    a) copy all java and sqlj files from src directory to compile directory.
    b) From the Ant task run the sqlj translator on the compile directory
    c) pass the translated files to javac or ojc
    Since I can translate and compile the project with jdsk1.4.2 from the Jdev Make/Recompile menu point I assume I should be able to write Ant tasks to behave as I have want it to.
    Flemming

  • Ant, mxmlc and font managers

    My team is building an AIR application and we are using SVN and a Flex Ant task to compile it on a staging server.  I have a decent understanding of what each piece of the compilation process needs to run and got the AIR application compiled and packaged without too much hassle.
    We recently switched fonts and require the command line switch '-managers=flash.fonts.AFEFontManager' in Flex Builder.  I've been reading about how to get this done and have found two solutions:
    1) Edit the file frameworks/flex-config.xml and change the order of the font managers.  This isn't a great solution because every time we upgrade the SDK on the server we'll have to go through and make this change again.  This process is described in the adobe livedocs http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_06.html
    2) Set it as a managers attribute in the ant build file as described here http://stackoverflow.com/questions/610386/how-to-include-additional-compiler-arguments-whe n-using-mxmlc-ant-task I can't seem to get this to work, I end up with an error like this:
    src/build.xml:75: The <mxmlc> type doesn't support the "compiler.fonts.managers" attribute.
    I get the same error when I use the "managers" alias.
    My question is what is the preferred method of reordering the font managers?  Thanks in advance!

    I forgot to attach the relevant section of my build.xml, here it is:
        <target name="compile.release"
            description="Compile swf modules and main swf" depends="clean">
            <!-- compile main SWF -->
            <mxmlc file="${src.dir}/application.mxml"
                output="${out.dir}/application.swf"
                debug="${DEBUG}"
                optimize="${OPTIMIZE}"
                link-report="${out.dir}/swf-report.xml"
                locale="en_US"
                configname="air"
                compiler.fonts.managers="flash.fonts.AFEFontManager">
                <source-path path-element="${src.dir}" />
                <library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
                    <include name="*.swc" />
                </library-path>
                <library-path dir="${FLEX_HOME}/frameworks/libs/air"
                    append="true">
                    <include name="*.swc" />
                </library-path>
                <library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
                    <include name="{locale}" />
                </library-path>
                <library-path dir="${lib.dir}" append="true">
                    <include name="*.swc" />
                </library-path>
            </mxmlc>

  • Mxmlc ant  task with Groovy and ant builder

    Hi,
    i'm doing some Groovy scripting in the build scripts of my project and among the other things have included Flex sources compilation in there. It cares about auto-compilation of source trees so maybe someone will be interested in that:
    http://tech4web.blogspot.com/2008/12/mxmlc-ant-flex-task-in-groovy.html
    Cheers,
    Piotr

    Are you using Adobe FlexAnt?
    On this
    page
    , there is a <compiler.library-path> node that seems to
    import a bundle directory that contains locales. I believe
    <compiler.library-path> is from FlexAnt, so you would need to
    enable it if you haven't.
    Also look on the next page from the link I posted, there is
    another example on how to import bundles in an automation.

  • Library Projects compiled using Flash Builder and ANT have different outputs

    Hi Guys.,
    I am really having hard time to get something work right with RSL projects in Flex 3.2 SDK. Here is my weird problem.
    I have a library projects which has the following settings in Flash Builder
    Link Type : External
    airglobal.swc
    framework.swc
    datavisualization.swc
    rpc.swc
    utilites.swc
    applicationupdater.swc
    applicationupdater_ui.swc
    Link Type: Merged into code
    airframework.swc
    servicemonitor.swc
    Compiler settings
    -directory=true -output=../../lib/core -debug=true -optimize=false -define+=CONFIG::bindingdebug,false -define+=CONFIG::frameworkdebug,false -define+=CONFIG::flexspy,true -define+=CONFIG::debug,true -define+=CONFIG::release,false -define+=CONFIG::logtoconsole,false -allow-source-path-overlap=true  -keep-as3-metadata+=Metadata,DefaultProperty,Required,Event,AssignableTo,Inject,InjectCon structor,Publish,Subscribe,PublishSubscribe,Factory,Init,Destroy,Observe,AsyncInit,Managed Events,MessageDispatcher,MessageHandler,MessageBinding,MessageInterceptor,MessageError,Com mand,CommandComplete,CommandResult,CommandError,CommandStatus,ResourceBinding,Selector,Tar get,Autoremove,Internal,ObjectDefinition,DynamicObject
    When I compile my library projects I get a MyLibraryproject.swc. The SWC has the following files in it
    mx/controls/HTML.png
    mx/core/Windows.png
    library.swf
    Note: airframework.swc and servicemonitor.swc has a many png files and properties files in it. But these properties and png files are not included when compiled in Flash builder.
    But when the same project is compiled using ANT compc task, i get all the png and properties files from airframework.swc and servicemonitor.swc files into my library project SWC file.
    Here is the ANT version which is used to compile the library project
    <compc output="${project.output.dir}/${project.name}.swc"
       include-classes="${as} ${mxml}"
       use-network="false"
       directory="false"
       allow-source-path-overlap="true"
       incremental="${build.incremental}"
       debug="${build.debug}"
       locale="${build.locale}"
       optimize="false"
       >
    <define name="CONFIG::bindingdebug" value="${build.bindingdebug}" />
    <define name="CONFIG::logtoconsole" value="${build.logtoconsole}" />
    <define name="CONFIG::frameworkdebug" value="${build.frameworkdebug}" />
    <define name="CONFIG::flexspy" value="${build.flexspy}" />
    <define name="CONFIG::debug" value="${build.debug}" />
    <define name="CONFIG::release" value="${build.release}" />
    <keep-as3-metadata name="Metadata" />
    <keep-as3-metadata name="DefaultProperty" />
    <keep-as3-metadata name="Required" />
    <keep-as3-metadata name="Event" />
    <keep-as3-metadata name="AssignableTo" />
    <keep-as3-metadata name="Inject" />
    <keep-as3-metadata name="InjectConstructor" />
    <keep-as3-metadata name="Publish" />
    <keep-as3-metadata name="Subscribe" />
    <keep-as3-metadata name="PublishSubscribe" />
    <keep-as3-metadata name="Factory" />
    <keep-as3-metadata name="Init" />
    <keep-as3-metadata name="Destroy" />
        <keep-as3-metadata name="Observe" />
        <keep-as3-metadata name="AsyncInit" />
        <keep-as3-metadata name="ManagedEvents" />
        <keep-as3-metadata name="MessageDispatcher" />
        <keep-as3-metadata name="MessageHandler" />
        <keep-as3-metadata name="MessageBinding" />
        <keep-as3-metadata name="MessageInterceptor" />
        <keep-as3-metadata name="MessageError" />
        <keep-as3-metadata name="Command" />
        <keep-as3-metadata name="CommandComplete" />
        <keep-as3-metadata name="CommandResult" />
        <keep-as3-metadata name="CommandError" />
        <keep-as3-metadata name="CommandStatus" />
        <keep-as3-metadata name="ResourceBinding" />
    <keep-as3-metadata name="Selector" />
    <keep-as3-metadata name="Target" />
    <keep-as3-metadata name="Autoremove" />
    <keep-as3-metadata name="Internal" />
    <keep-as3-metadata name="ObjectDefinition" />
    <keep-as3-metadata name="DynamicObject" />
    <load-config filename="${air.config}"/>
    <compiler.include-libraries dir="${flex.frameworks.dir}/libs/air" append="true">
         <include name="servicemonitor.swc" />
         <include name="airframework.swc" />
    </compiler.include-libraries>
    <external-library-path dir="${build.compc.dir}" append="true">
         <include name="TriGeoFlexFramework/TriGeoFlexFramework.swc" />
         <include name="TriGeoLibrary/TriGeoLibrary.swc" />
         <include name="TriGeoRPCFramework/TriGeoRPCFramework.swc" />
         <include name="Degrafa_Beta3.1_Flex3" />
         <include name="parsley-flex3-2.4.0.swc" />
         <include name="spicelib-flex-2.4.0.swc" />
    </external-library-path>
    <external-library-path dir="${flex.frameworks.dir}/libs" append="true">
         <include name="framework.swc" />
         <include name="datavisualization.swc" />
         <include name="utilities.swc" />
         <include name="rpc.swc" />
         <include name="air/airglobal.swc" />
         <include name="air/applicationupdater.swc" />
         <include name="air/applicationupdater_ui.swc" />
    </external-library-path>
    <source-path path-element="${basedir}/src" />
    </compc>
    </target>
    </project>
    Any insights is greatly appreciated.!

    #1, If it compiles then you have no issue. There's no reason at this point not to use 4.6. You should bundle a captive runtime to assure the users computer won't need to have AIR installed at all.
    #2, Papervision is old. Use the Stage3D and/or a wrapper framework. As far as the generic "If I download lots of data will it take the user more time to load it", well, of course. Just don't make the loading experience painful. Entertain them while they way or find ways of displaying data sooner than later. If it's desirable on the web has more to do with the context of the app and the device displaying it. In other words, a phone user would find it easy but obviously not a desktop user.
    #3, Definitely referring you to Google on that one.
    #4, Size always matters, it's common sense. The more you process the harder it is. While I haven't done AR I've used the Microsoft Kinect SDK and ANE and tracking was extremely fast but limited. From what I've seen and your basic built in location and direction hardware on any mobile device you shouldn't have much trouble. Depends on what you're doing.
    #5, This discussion would be way too large for a forum. You'd need to consult a firm experienced in AR development.
    #6, "Applications using the commercial license do not have to provide source code, but must pay a licensing fee. Contact ARToolworks at [email protected] for more information." They will base your price on your product, there is no single price.
    #7, The models could be huge and elaborate or tiny and simple which changes the answer. Consult the answer in #4. Ultimately most people are getting on fast networks with mobile and excessively fast on desktop/wifi. Size matters a lot less than 3 years ago.
    #8, Depends on what you're doing. You have to explain it.

  • Flash Builder 4.5 for PHP and ANT

    I just installed Flash Builder 4.5 for PHP Premium and I am trying to install ANT so I can automate the AsDoc generation process.
    In the past (Flash Builder 4), I just point to "http://download.eclipse.org/releases/galileo/" and select "Eclipse Java Development Tools".
    However, when I do the same in " Flash Builder 4.5 for PHP Premium", I got an error message saying that a newer version of "Eclipse Java Development Tools" has already been installed. I go to the "Already Installed Software" tab, and indeed I see "Eclipse Java Development Tools" under "Eclipse Java IDE", but ANT is nowhere to be found.
    By the way, I am doing everything on the stock, standalone Flash Builder 4.5 for PHP Premium.
    Any suggestion is much appreciated.

    I also have Flash Builder 4.5 for PHP and the ANT view does not show when going to Window -> Show View --> Other.  I could not find it in any of the folders.
    However, I was able to add it by hitting Command 3 (CTRL 3 on PC) and typing Ant.

  • Problems with JDev 11g using JBOSS and ANT

    Hi,
    I'm trying to migrate to JDev 11g with JBoss ( version 7.X ) as the AppServer
    With JDev 10g all works fine with JBoss, even the Remote Debug, all OK
    here is the problems I have :
    1) ANT
    JDev doesn't save my ANT settings
    every time I launch ANT : Run Ant Target - I must set the Advance settings
    JDev 10g I only need to do that once, the settings are saved but not in the 11g, why ?
    2) persistence
    I get this error when deploying to JBoss
    16:34:50,967 INFO [org.jboss.as.server] (HttpManagementService-threads - 1) JBA
    S015870: Deploy of deployment "prod_v0.0.1_iDigital.menu.ear" was rolled back wi
    th failure message {"JBAS014771: Services with missing/unavailable dependencies"
    => ["jboss.persistenceunit.\"prod_v0.0.1_iDigital.menu.ear/iDigital.menu-WebApp
    .war#InfraModel\"jboss.naming.context.java.jdbc.stdDSMissing[jboss.persistenceun
    it.\"prod_v0.0.1_iDigital.menu.ear/iDigital.menu-WebApp.war#InfraModel\"jboss.na
    ming.context.java.jdbc.stdDS]","jboss.persistenceunit.\"prod_v0.0.1_iDigital.men
    u.ear#InfraModel\"jboss.naming.context.java.jdbc.stdDSMissing[jboss.persistenceu
    nit.\"prod_v0.0.1_iDigital.menu.ear#InfraModel\"jboss.naming.context.java.jdbc.s
    tdDS]"]}
    it seems that is something related to dependencies not well configured during build stage of the EAR, but with 10g works fine
    BTW, I can't run my project with WebLogic either, gives this error :
    <5/Abr/2013 18H27m BST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1365182860563' for task '0'. Error is: 'weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: adf.oracle.domain, exact-match: false].'
    weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: adf.oracle.domain, exact-match: false].
         at weblogic.application.internal.flow.CheckLibraryReferenceFlow.prepare(CheckLibraryReferenceFlow.java:26)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
         at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
         Truncated. see log file for complete stacktrace
    >
    <5/Abr/2013 18H27m BST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'iDigital.menu'.>
    <5/Abr/2013 18H27m BST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: adf.oracle.domain, exact-match: false].
         at weblogic.application.internal.flow.CheckLibraryReferenceFlow.prepare(CheckLibraryReferenceFlow.java:26)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
         at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
         Truncated. see log file for complete stacktrace
    can someone give me a clue ?
    thanks
    Edited by: FernandoLeite on Apr 5, 2013 10:31 AM

    I can't say many about the ant stuff, but have you tried to put the parameters in a property file and use this to get the parameters to ant?
    The reason you can't run the application on WLS is that you have not installed the adf runtime on your wls. The error 'application.xml: [Extension-Name: adf.oracle.domain, exact-match: false].' points to this.
    Timo

  • Problems with ExcludeDoclet and Ant

    Greetings.
    I've been trying to use the ExcludeDoclet (http://java.sun.com/j2se/javadoc/excludedoclet/index.jsp)
    to generate docs for the classes that aren't excluded. My ant task looks like this:
    <target name="javadoc" depends="init"
            description="Build the javadoc in genericized form">
      <delete dir="${javadocdir}"/>
      <mkdir  dir="${javadocdir}"/>
      <javadoc packagenames="net.sf.jga.*,net.sf.jga.fn.*"
               sourcepathref="project.sourcepath"
               source="1.5"
               defaultexcludes="yes"
               destdir="${javadocdir}"
               version="true"
               overview="${basedir}/src/overview.html"
               windowtitle="jga: Java Generic Algorithms">
        <doctitle><![CDATA[<h1>jga: Generic Algorithms for Java</h1>]]></doctitle>
        <bottom><![CDATA[<i>Copyright � 2002-2005  David A. Hall. All Rights Reserved.</i>]]>
        </bottom>
        <classpath>
          <pathelement path="${jnlp.api}"/>
          <path refid="project.classpath"/>
        </classpath>
        <doclet name="tools.ExcludeDoclet" path=".">
            <param name="-excludefile" value="visitors.txt"/>
         </doclet>
       </javadoc>
      <jar jarfile="${javadocjar}" basedir="${javadocdir}"/>
    </target>I've also tried the form where the doclet information is passed as attributes of the javadoc tag, and I've tried skipping ant by building a shell script with the same collection of arguments. In all cases, I get output indicating that the ExcludeDoclet has successfully read the file, processed the list of classes in the indicated packages, and removed those from the visitors.txt file. It appears, however, that once the excluded list of source files has been procesed, javadoc exits without processing the remaining files.
    javadoc:
       [delete] Deleting directory /home/dave/projects/jga/doc/javadoc
       [delete] Deleting directory /home/dave/projects/jga/doc/javadoc
        [mkdir] Created dir: /home/dave/projects/jga/doc/javadoc
      [javadoc] Generating Javadoc
      [javadoc] Executing '/opt/jdk1.5.0/bin/javadoc' with arguments:
      [javadoc] '-d'
      [javadoc] '/home/dave/projects/jga/doc/javadoc'
      [javadoc] '-overview'
      [javadoc] '/home/dave/projects/jga/src/overview.html'
      [javadoc] '-windowtitle'
      [javadoc] 'jga: Java Generic Algorithms'
      [javadoc] '-doctitle'
      [javadoc] '<h1>jga: Generic Algorithms for Java</h1>'
      [javadoc] '-bottom'
      [javadoc] '<i>Copyright � 2002-2005  David A. Hall. All Rights Reserved.</i>
      [javadoc]     '
      [javadoc] '-classpath'
      [javadoc] '/opt/jdk1.5.0/sample/jnlp/servlet/jnlp.jar:...'
      [javadoc] '-sourcepath'
      [javadoc] '/home/dave/projects/jga/src:/home/dave/projects/jga/build/src'
      [javadoc] '-doclet'
      [javadoc] 'tools.ExcludeDoclet'
      [javadoc] '-docletpath'
      [javadoc] '/home/dave/projects/jga:/opt/ant/lib/ant-launcher.jar:...'
      [javadoc] '-excludefile'
      [javadoc] 'visitors.txt'
      [javadoc] '-source'
      [javadoc] '1.5'
      [javadoc] 'net.sf.jga.fn'
      [javadoc] 'net.sf.jga.util'
      [javadoc] 'net.sf.jga.parser'
      [javadoc]
      [javadoc] The ' characters around the executable and arguments are
      [javadoc] not part of the command.
      [javadoc] Javadoc execution
      [javadoc] Loading source files for package net.sf.jga.fn...
      [javadoc] Loading source files for package net.sf.jga.util...
      [javadoc] Loading source files for package net.sf.jga.parser...
      [javadoc] Constructing Javadoc information...
      [javadoc] Removing excluded source files.......
      [javadoc] Excluding net.sf.jga.fn.adaptor.OrBinary.Visitor
      [javadoc] Excluding net.sf.jga.fn.adaptor.OrUnary.Visitor
      [javadoc] Excluding net.sf.jga.fn.string.DefaultFormat.Visitor
      [javadoc] Excluding net.sf.jga.fn.string.Match.VisitorDoes anyone have any ideas how I can get this to work?
    Dave Hall
    http://jga.sf.net/
    http://jroller.com/page/dhall/

    I'd read Ant's documentation as being able to
    include/exclude whole packages, but not individual
    classes within packages: I may have read it this was
    because I expect that ant is simply assembling the
    command line arguments that it'll pass to javadoc.
    My expectation was that if there is no way for
    javadoc proper to exclude individual classes, that
    there would be no way for ant to do it either.Taken straight from the documentation of the Javadoc task in the ANT Manual:
    Parameters specified as nested elements
    fileset
    A FileSet. All matched files will be passed to javadoc as source files. Ant will automatically add the include pattern **/*.java to these filesets.
    Nested filesets can be used to document sources that are in the default package or if you want to exclude certain files from documentation. If you want to document all source files and don't use the default package, packagesets should be used instead as this increases javadocs performance.
    The packagenames, excludepackagenames and defaultexcludes attributes of the task have no effect on the nested <fileset> elements.
    ...  <javadoc
               destdir="docs/api"
               author="true"
               version="true"
               use="true"
               windowtitle="Test API">
        <fileset dir="src" defaultexcludes="yes">
          <include name="com/dummy/test/**" />
          <exclude name="com/dummy/test/doc-files/**"/>
        </fileset>
        <doctitle><![CDATA[<h1>Test</h1>]]></doctitle>
        <bottom><![CDATA[<i>Copyright � 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom>
        <tag name="todo" scope="all" description="To do:" />
        <group title="Group 1 Packages" packages="com.dummy.test.a*"/>
        <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
        <link offline="true" href="http://java.sun.com/products/jdk/1.2/docs/api/" packagelistLoc="C:\tmp"/>
        <link href="http://developer.java.sun.com/developer/products/xml/docs/api/"/>
      </javadoc>Although this example illustrates how to exclude whole directories, this technique works for files, too.
    How hard would it be to turn ExcludeDoclet into
    something that could be passed to javadoc on the
    command line?I don't think that is possible.
    IMHO, there are 3 options you might want to investigate:
    1. Use the fileset parameter of ANT's Javadoc task to exclude files by name.
    2. Use ANT's Java task to run ExcludeDoclet as an application from within ANT.
    3. Try yDoc (a commercial Javadoc enhancement that allows you to define custom filter criteria)  http://www.yworks.com/products/ydoc/Each of these options has its drawbacks:
    Suppose there are multiple classes defined in one source file (visible nested classes count, too), then you have to specify all these classes in the excludefile for ExcludeDoclet to actually exclude that file from documentation (it's either all or nothing for any given source file).
    Since the fileset parameter of ANT's Javadoc task is - well - file based, it will always exclude all classes in a given source file from documentation, so ExcludeDoclet's behavior might be preferable in a "better too much than too less documentation" way, but both lack, IMHO.
    yDoc actually allows you to exclude on a documentation element basis - although it does a poor job when handling references (i.e. hyperlinks) to the excluded elements.

Maybe you are looking for