public
Description: JRuby from Codehaus
Homepage:
Clone URL: git://github.com/bobmcwhirter/jruby.git
jruby / netbeans-ant.xml
100644 109 lines (98 sloc) 4.593 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="netbeans-ant">
  
  <target name="profile-gem-install-rake" depends="jar" description="Profile a local gem installation of Rake">
    <fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>
    
    <nbprofiledirect>
      <classpath> <pathelement location="... specify ..."/> </classpath>
    </nbprofiledirect>
    
    <java classname="org.jruby.Main" maxmemory="${jruby.launch.memory}" fork="true">
      <classpath>
        <pathelement location="${jruby.instrumented.classes.dir}" />
        <path refid="build.classpath"/>
        <pathelement path="${lib.dir}/jruby.jar"/>
        <pathelement path="${test.classes.dir}"/>
        <pathelement path="${test.dir}/requireTest.jar"/>
      </classpath>
      <jvmarg value="-Djruby.home=${basedir}"/>
      <jvmarg value="-Djruby.lib=${lib.dir}"/>
      <jvmarg value="-Djruby.shell=/bin/sh"/>
      <jvmarg value="-Djruby.script=jruby"/>
      <jvmarg value="${profiler.info.jvmargs.agent}"/>
      <arg value="bin/gem"/>
      <arg value="install"/>
      <arg value="lib/ruby/gems/1.8/cache/rake-0.7.1.gem"/>
    </java>
  </target>
  
  <target name="profile-rails-server" depends="jar" description="Profile the Rails server">
    <fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>
    
    <nbprofiledirect>
      <classpath> <pathelement location="... specify ..."/> </classpath>
    </nbprofiledirect>
    
    <java classname="org.jruby.Main" maxmemory="${jruby.launch.memory}" fork="true">
      <classpath>
        <pathelement location="${jruby.instrumented.classes.dir}" />
        <path refid="build.classpath"/>
        <pathelement path="${lib.dir}/jruby.jar"/>
        <pathelement path="${test.classes.dir}"/>
        <pathelement path="${test.dir}/requireTest.jar"/>
      </classpath>
      <jvmarg value="-Djruby.home=${basedir}"/>
      <jvmarg value="-Djruby.lib=${lib.dir}"/>
      <jvmarg value="-Djruby.shell=/bin/sh"/>
      <jvmarg value="-Djruby.script=jruby"/>
      <jvmarg value="-Djruby.thread.pooling=true"/>
      <jvmarg value="-server"/>
      <jvmarg value="${profiler.info.jvmargs.agent}"/>
      <arg value="testapp/script/server"/>
    </java>
  </target>
  
  <target name="profile-nb" depends="compile" description="Profile Project">
    <fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>
    
    <nbprofiledirect>
      <classpath>
        <pathelement path="${jruby.classes.dir}"/>
        <path refid="build.classpath"/>
      </classpath>
    </nbprofiledirect>
    
    <java classname="org.jruby.Main" maxmemory="${jruby.launch.memory}" fork="true">
      <classpath>
        <pathelement path="${jruby.classes.dir}"/>
        <path refid="build.classpath"/>
      </classpath>
      <sysproperty key="jruby.home" value="${jruby.home}"/>
      <jvmarg value="${profiler.info.jvmargs.agent}"/>
      <jvmarg value="-Djruby.home=${basedir}"/>
      <jvmarg value="-Djruby.lib=${lib.dir}"/>
      <jvmarg value="-Djruby.shell=/bin/sh"/>
      <jvmarg value="-Djruby.script=jruby"/>
      <!-- uncomment below and point to your ruby script -->
      <!-- <arg value="/path/to/your/ruby/script.rb"/> -->
    </java>
  </target>
  
  <target name="debug-nb" depends="jar" description="Task for debugging JRuby within NetBeans">
    <fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>
    <nbjpdastart addressproperty="jpda.address" name="JRuby" transport="dt_socket">
      <classpath>
        <pathelement path="${jruby.classes.dir}"/>
        <path refid="build.classpath"/>
      </classpath>
    </nbjpdastart>
    <java classname="org.jruby.Main" maxmemory="${jruby.launch.memory}" fork="true">
      <classpath>
        <pathelement path="${jruby.classes.dir}"/>
        <path refid="build.classpath"/>
      </classpath>
      <sysproperty key="jruby.home" value="${jruby.home}"/>
      <jvmarg value="-Xdebug"/>
      <jvmarg value="-Xnoagent"/>
      <jvmarg value="-Djava.compiler=none"/>
      <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
      <jvmarg value="-Djruby.home=${basedir}"/>
      <jvmarg value="-Djruby.lib=${lib.dir}"/>
      <jvmarg value="-Djruby.shell=/bin/sh"/>
      <jvmarg value="-Djruby.script=jruby"/>
      <!-- uncomment below and point to your ruby script -->
      <!-- <arg value="/path/to/your/ruby/script.rb"/> -->
    </java>
  </target>
</project>