Issue Type: Improvement Improvement
Affects Versions: JRuby 1.7.2
Assignee: Unassigned
Components: Java Integration
Created: 17/Jan/13 10:39 AM
Description:

Given a simple ant file we want to conver to rake which uses namespaces like:

<?xml version="1.0" encoding="UTF-8"?>
<project name="HelloWorldApp" default="default" basedir="."
         xmlns:fx="javafx:com.sun.javafx.tools.ant">
    <path id="fxant">
      <filelist>
        <file name="${java.home}\..\lib\ant-javafx.jar"/>
        <file name="${java.home}\lib\jfxrt.jar"/>
      </filelist>
    </path>
    <target name="default">
        <taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
                uri="javafx:com.sun.javafx.tools.ant"
                classpath="${java.home}\..\lib\ant-javafx.jar"/>
    </target>
<target name="package-bundle">
      <taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
                uri="javafx:com.sun.javafx.tools.ant"
                classpath="${java.home}\..\lib\ant-javafx.jar"/>
      <fx:deploy nativeBundles="all"
                   width="100" height="100"
                   outdir="build/" outfile="HelloWorldApp">
            <info title="Hello World App" vendor="Me"
                     description="Test built from Java executable jar"/>
            <fx:application mainClass="org.jruby.JarBootstrapMain"/>
            <fx:resources>
               <fx:fileset dir="dist">
                  <include name="HelloWorldApp.jar"/>
               </fx:fileset>
            </fx:resources>
      </fx:deploy>
</target>
</project>

We want a simple mechanism for calling 'fx'. from the Rake side. Here is the workaround currently needed:

require 'ant'

task :default do
  ant.echo message: "${java.home}"
  ant.taskdef(resource: "com/sun/javafx/tools/ant/antlib.xml",
              uri: "javafx:com.sun.javafx.tools.ant",
              classpath: "${java.home}/../lib/ant-javafx.jar")
end

task :package_bundle do
  ant do
    taskdef(resource: "com/sun/javafx/tools/ant/antlib.xml",
            uri: "javafx:com.sun.javafx.tools.ant",
            classpath: "${java.home}/../lib/ant-javafx.jar")
    __send__("javafx:com.sun.javafx.tools.ant:deploy", nativeBundles: "all", 
             width: "100", height: "100", outdir: "build/",
             outfile: "HelloWorldApp") do
      info(title: "Hello World App", vendor: "Me",
           description: "Test built from Java executable jar")
      application(mainClass: "org.jruby.JarBootstrapMain")
      resources do
        fileset(dir: "dist") do
          include name: "HelloWorldApp.jar"
        end
      end
    end
  end
end

We probably want xmlns:{name} to become a method or element object.

Project: JRuby
Priority: Major Major
Reporter: Thomas E Enebo
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to