summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2010-08-13 00:27:58 +0200
committerFlorian Frank <flori@ping.de>2010-08-18 03:42:57 +0200
commit2bc58ce2827fba8bd6890ad6d9085d54ba169c6a (patch)
tree777be0fded5c551e1323e5a79b995130950421bb
parent6ed5e19ef82df3f33a358c676c344009ac59d7a2 (diff)
downloadjson-2bc58ce2827fba8bd6890ad6d9085d54ba169c6a.tar.gz
prepare new version
fixed some warnings wrote some rake tasks to build jruby extension
-rw-r--r--.gitignore6
-rw-r--r--CHANGES3
-rw-r--r--Rakefile50
-rw-r--r--VERSION2
-rw-r--r--build.xml15
-rw-r--r--json-java.gemspec2
-rw-r--r--lib/json/ext.rb2
-rw-r--r--lib/json/pure.rb2
-rw-r--r--lib/json/version.rb2
-rw-r--r--nbproject/build-impl.xml161
-rw-r--r--nbproject/genfiles.properties4
-rw-r--r--nbproject/project.properties9
-rwxr-xr-xtests/test_json_addition.rb6
-rwxr-xr-xtests/test_json_rails.rb6
14 files changed, 210 insertions, 60 deletions
diff --git a/.gitignore b/.gitignore
index 072a97e..d3ea0cf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,12 +2,6 @@
coverage
pkg
.nfs.*
-
-# java build
-/src/json/ext/Parser.java
-/*.gem
-/build
-/lib/json/ext/*.jar
# java: NetBeans
/nbproject/private
# java: Eclipse
diff --git a/CHANGES b/CHANGES
index 6caff4f..8216a20 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2010-08-15 (1.5.0)
+ * Included Java source codes for the Jruby extension made by Daniel Luz
+ <dev@mernen.com>.
2010-08-09 (1.4.6)
* Fixed oversight reported in http://github.com/flori/json/issues/closed#issue/23,
always create a new object from the state prototype.
diff --git a/Rakefile b/Rakefile
index dfcf3cd..a4e6eef 100644
--- a/Rakefile
+++ b/Rakefile
@@ -13,16 +13,16 @@ require 'rbconfig'
include Config
require 'rake/clean'
-CLOBBER.include Dir['benchmarks/data/*.{dat,log}'], FileList['**/*.rbc']
+CLOBBER.include Dir['benchmarks/data/*.{dat,log}']
CLEAN.include FileList['diagrams/*.*'], 'doc', 'coverage', 'tmp',
- FileList["ext/**/{Makefile,mkmf.log}"],
- FileList["{ext,lib}/**/*.{so,bundle,#{CONFIG['DLEXT']},o,obj,pdb,lib,manifest,exp,def}"]
+ FileList["ext/**/{Makefile,mkmf.log}"], 'build', 'dist', FileList['**/*.rbc'],
+ FileList["{ext,lib}/**/*.{so,bundle,#{CONFIG['DLEXT']},o,obj,pdb,lib,manifest,exp,def,jar}"]
MAKE = ENV['MAKE'] || %w[gmake make].find { |c| system(c, '-v') }
PKG_NAME = 'json'
PKG_TITLE = 'JSON Implementation for Ruby'
PKG_VERSION = File.read('VERSION').chomp
-PKG_FILES = FileList["**/*"].exclude(/CVS|pkg|tmp|coverage|Makefile|\.nfs\./).exclude(/\.(so|bundle|o|#{CONFIG['DLEXT']})$/)
+PKG_FILES = FileList["**/*"].exclude(/CVS|pkg|tmp|coverage|Makefile|\.nfs\./).exclude(/\.(so|bundle|o|class|#{CONFIG['DLEXT']})$/)
EXT_ROOT_DIR = 'ext/json/ext'
EXT_PARSER_DIR = "#{EXT_ROOT_DIR}/parser"
EXT_PARSER_DL = "#{EXT_PARSER_DIR}/parser.#{CONFIG['DLEXT']}"
@@ -45,6 +45,16 @@ def myruby(*args, &block)
end
end
+def jruby(*args, &block)
+ @jruby ||= `which jruby`.chomp
+ options = (Hash === args.last) ? args.pop : {}
+ if args.length > 1 then
+ sh(*([@jruby] + args + [options]), &block)
+ else
+ sh("#{@jruby} #{args.first}", options, &block)
+ end
+end
+
desc "Installing library (pure)"
task :install_pure => :version do
myruby 'install.rb'
@@ -74,6 +84,19 @@ end
desc "Compiling extension"
task :compile_ext => [ EXT_PARSER_DL, EXT_GENERATOR_DL ]
+desc "Compiling jruby extension"
+task :compile_jruby do
+ sh 'ant -buildfile build.xml jar'
+end
+
+desc "Package the jruby gem"
+task :jruby_gem do
+ sh 'ant -buildfile build.xml clean gem'
+ sh 'gem build json-java.gemspec'
+ mkdir_p 'pkg'
+ mv "json-#{PKG_VERSION}-java.gem", 'pkg'
+end
+
file EXT_PARSER_DL => EXT_PARSER_SRC do
cd EXT_PARSER_DIR do
myruby 'extconf.rb'
@@ -152,8 +175,15 @@ task :test_ext => :compile_ext do
myruby "-S testrb #{Dir['./tests/*.rb'] * ' '}"
end
+desc "Testing library (jruby)"
+task :test_jruby => :compile_jruby do
+ ENV['JSON'] = 'ext'
+ ENV['RUBYOPT'] = "-Iext:lib #{ENV['RUBYOPT']}"
+ jruby "-S testrb #{Dir['./tests/*.rb'] * ' '}"
+end
+
desc "Testing library (pure ruby and extension)"
-task :test => [ :test_pure, :test_ext ]
+task :test => [ :test_pure, :test_jruby, :test_ext ]
desc "Benchmarking parser"
task :benchmark_parser do
@@ -282,11 +312,17 @@ EOT
end
end
-desc "Build all gems and archives for a new release."
-task :release => [ :clean, :version, :cross, :native, :gem ] do
+desc "Build all gems and archives for a new release of the jruby extension."
+task :release_jruby => [ :clean, :version, :jruby_gem ]
+
+desc "Build all gems and archives for a new release of json and json_pure."
+task :release_ruby => [ :clean, :version, :cross, :native, :gem, ] do
sh "#$0 clean native gem"
sh "#$0 clean package"
end
+desc "Build all gems and archives for a new release."
+task :release => [ :release_ruby, :release_jruby ]
+
desc "Compile in the the source directory"
task :default => [ :version, :compile_ext ]
diff --git a/VERSION b/VERSION
index c514bd8..bc80560 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.4.6
+1.5.0
diff --git a/build.xml b/build.xml
index e11e27f..7c8820e 100644
--- a/build.xml
+++ b/build.xml
@@ -10,8 +10,7 @@
</exec>
</target>
- <target name="-pre-compile" depends="ragel">
- </target>
+ <target name="-pre-compile" depends="ragel"/>
<target name="clean-dist">
<delete>
@@ -53,9 +52,19 @@
<target name="gem" depends="jar" description="Build a RubyGem.">
<exec executable="${jruby.dir}/bin/jruby">
- <arg value="json-jruby.gemspec"/>
+ <arg value="json-java.gemspec"/>
</exec>
</target>
+
+ <target name="release" depends="gem" description="Release the current version of the RubyGem.">
+ <mkdir dir="pkg"/>
+ <move todir="pkg">
+ <fileset dir=".">
+ <include name="*.gem"/>
+ </fileset>
+ </move>
+ </target>
+
<target name="-post-test" depends="ruby-tests" />
diff --git a/json-java.gemspec b/json-java.gemspec
index 144f650..c2d6c43 100644
--- a/json-java.gemspec
+++ b/json-java.gemspec
@@ -12,7 +12,7 @@ spec = Gem::Specification.new do |s|
s.platform = 'java'
s.rubyforge_project = "json-jruby"
- s.files = Dir["{docs,lib,tests}/**/*"]
+ s.files = Dir["../{docs,lib,tests}/**/*"]
end
if $0 == __FILE__
diff --git a/lib/json/ext.rb b/lib/json/ext.rb
index 719e560..a6b353d 100644
--- a/lib/json/ext.rb
+++ b/lib/json/ext.rb
@@ -6,7 +6,7 @@ module JSON
module Ext
require 'json/ext/parser'
require 'json/ext/generator'
- $DEBUG and warn "Using c extension for JSON."
+ $DEBUG and warn "Using Ext extension for JSON."
JSON.parser = Parser
JSON.generator = Generator
end
diff --git a/lib/json/pure.rb b/lib/json/pure.rb
index 565ef0c..1848f03 100644
--- a/lib/json/pure.rb
+++ b/lib/json/pure.rb
@@ -68,7 +68,7 @@ module JSON
# This module holds all the modules/classes that implement JSON's
# functionality in pure ruby.
module Pure
- $DEBUG and warn "Using pure library for JSON."
+ $DEBUG and warn "Using Pure library for JSON."
JSON.parser = Parser
JSON.generator = Generator
end
diff --git a/lib/json/version.rb b/lib/json/version.rb
index a369b6c..beff08b 100644
--- a/lib/json/version.rb
+++ b/lib/json/version.rb
@@ -1,6 +1,6 @@
module JSON
# JSON version
- VERSION = '1.4.6'
+ VERSION = '1.5.0'
VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml
index 103789a..1ddf7e8 100644
--- a/nbproject/build-impl.xml
+++ b/nbproject/build-impl.xml
@@ -55,21 +55,52 @@ is divided into following sections:
</target>
<target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
<available file="${manifest.file}" property="manifest.available"/>
- <condition property="manifest.available+main.class">
+ <condition property="main.class.available">
<and>
- <isset property="manifest.available"/>
<isset property="main.class"/>
<not>
<equals arg1="${main.class}" arg2="" trim="true"/>
</not>
</and>
</condition>
+ <condition property="manifest.available+main.class">
+ <and>
+ <isset property="manifest.available"/>
+ <isset property="main.class.available"/>
+ </and>
+ </condition>
+ <condition property="do.mkdist">
+ <and>
+ <isset property="libs.CopyLibs.classpath"/>
+ <not>
+ <istrue value="${mkdist.disabled}"/>
+ </not>
+ </and>
+ </condition>
<condition property="manifest.available+main.class+mkdist.available">
<and>
<istrue value="${manifest.available+main.class}"/>
- <isset property="libs.CopyLibs.classpath"/>
+ <isset property="do.mkdist"/>
</and>
</condition>
+ <condition property="manifest.available+mkdist.available">
+ <and>
+ <istrue value="${manifest.available}"/>
+ <isset property="do.mkdist"/>
+ </and>
+ </condition>
+ <condition property="manifest.available-mkdist.available">
+ <or>
+ <istrue value="${manifest.available}"/>
+ <isset property="do.mkdist"/>
+ </or>
+ </condition>
+ <condition property="manifest.available+main.class-mkdist.available">
+ <or>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="do.mkdist"/>
+ </or>
+ </condition>
<condition property="have.tests">
<or>
<available file="${test.src.dir}"/>
@@ -104,6 +135,7 @@ is divided into following sections:
<property name="javadoc.preview" value="true"/>
<property name="application.args" value=""/>
<property name="source.encoding" value="${file.encoding}"/>
+ <property name="runtime.encoding" value="${source.encoding}"/>
<condition property="javadoc.encoding.used" value="${javadoc.encoding}">
<and>
<isset property="javadoc.encoding"/>
@@ -119,12 +151,11 @@ is divided into following sections:
<condition property="do.depend.true">
<istrue value="${do.depend}"/>
</condition>
- <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
- <and>
- <isset property="jaxws.endorsed.dir"/>
- <available file="nbproject/jaxws-build.xml"/>
- </and>
+ <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
+ <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
+ <length length="0" string="${endorsed.classpath}" when="greater"/>
</condition>
+ <property name="javac.fork" value="false"/>
</target>
<target name="-post-init">
<!-- Empty placeholder for easier customization. -->
@@ -165,7 +196,7 @@ is divided into following sections:
<sequential>
<property location="${build.dir}/empty" name="empty.dir"/>
<mkdir dir="${empty.dir}"/>
- <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
<src>
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
<include name="*"/>
@@ -174,7 +205,8 @@ is divided into following sections:
<classpath>
<path path="@{classpath}"/>
</classpath>
- <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
+ <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <compilerarg line="${javac.compilerargs}"/>
<customize/>
</javac>
</sequential>
@@ -213,7 +245,7 @@ is divided into following sections:
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<sequential>
- <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
+ <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
<batchtest todir="${build.test.results.dir}">
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
<filename name="@{testincludes}"/>
@@ -228,6 +260,7 @@ is divided into following sections:
</syspropertyset>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg line="${run.jvmargs}"/>
</junit>
</sequential>
@@ -284,10 +317,11 @@ is divided into following sections:
<element name="customize" optional="true"/>
<sequential>
<java classname="@{classname}" dir="${work.dir}" fork="true">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg line="${debug-args-line}"/>
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
- <jvmarg value="-Dfile.encoding=${source.encoding}"/>
- <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
+ <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
+ <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
<jvmarg line="${run.jvmargs}"/>
<classpath>
<path path="@{classpath}"/>
@@ -308,8 +342,9 @@ is divided into following sections:
<element name="customize" optional="true"/>
<sequential>
<java classname="@{classname}" dir="${work.dir}" fork="true">
- <jvmarg value="-Dfile.encoding=${source.encoding}"/>
- <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
+ <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
<jvmarg line="${run.jvmargs}"/>
<classpath>
<path path="@{classpath}"/>
@@ -336,7 +371,22 @@ is divided into following sections:
COMPILATION SECTION
===================
-->
- <target depends="init" name="deps-jar" unless="no.deps"/>
+ <target name="-deps-jar-init" unless="built-jar.properties">
+ <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
+ <delete file="${built-jar.properties}" quiet="true"/>
+ </target>
+ <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
+ <echo level="warn" message="Cycle detected: JSON-JRuby was already built"/>
+ </target>
+ <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
+ <mkdir dir="${build.dir}"/>
+ <touch file="${built-jar.properties}" verbose="false"/>
+ <property file="${built-jar.properties}" prefix="already.built.jar."/>
+ <antcall target="-warn-already-built-jar"/>
+ <propertyfile file="${built-jar.properties}">
+ <entry key="${basedir}" value=""/>
+ </propertyfile>
+ </target>
<target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
<target depends="init" name="-check-automatic-build">
<available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
@@ -397,10 +447,10 @@ is divided into following sections:
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
<j2seproject1:jar/>
</target>
- <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
<j2seproject1:jar manifest="${manifest.file}"/>
</target>
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
@@ -443,7 +493,28 @@ is divided into following sections:
<property location="${dist.jar}" name="dist.jar.resolved"/>
<echo>java -jar "${dist.jar.resolved}"</echo>
</target>
- <target depends="init,compile,-pre-pre-jar,-pre-jar" if="libs.CopyLibs.classpath" name="-do-jar-with-libraries-without-manifest" unless="manifest.available+main.class">
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+ <pathconvert property="run.classpath.without.build.classes.dir">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to=""/>
+ </pathconvert>
+ <pathconvert pathsep=" " property="jar.classpath">
+ <path path="${run.classpath.without.build.classes.dir}"/>
+ <chainedmapper>
+ <flattenmapper/>
+ <globmapper from="*" to="lib/*"/>
+ </chainedmapper>
+ </pathconvert>
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <fileset dir="${build.classes.dir}"/>
+ <manifest>
+ <attribute name="Class-Path" value="${jar.classpath}"/>
+ </manifest>
+ </copylibs>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
<pathconvert property="run.classpath.without.build.classes.dir">
<path path="${run.classpath}"/>
@@ -459,13 +530,16 @@ is divided into following sections:
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
<copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
+ <manifest>
+ <attribute name="Class-Path" value="${jar.classpath}"/>
+ </manifest>
</copylibs>
</target>
<target name="-post-jar">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
+ <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
<!--
=================
EXECUTION SECTION
@@ -481,11 +555,11 @@ is divided into following sections:
<target name="-do-not-recompile">
<property name="javac.includes.binary" value=""/>
</target>
- <target depends="init,-do-not-recompile,compile-single" name="run-single">
+ <target depends="init,compile-single" name="run-single">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<j2seproject1:java classname="${run.class}"/>
</target>
- <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
+ <target depends="init,compile-test-single" name="run-test-with-main">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
</target>
@@ -516,12 +590,12 @@ is divided into following sections:
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
<j2seproject3:debug classname="${debug.class}"/>
</target>
- <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
<target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
<j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
</target>
- <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
+ <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
<target depends="init" name="-pre-debug-fix">
<fail unless="fix.includes">Must set fix.includes</fail>
<property name="javac.includes" value="${fix.includes}.java"/>
@@ -623,7 +697,7 @@ is divided into following sections:
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
</target>
- <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
<!--
=======================
JUNIT DEBUGGING SECTION
@@ -650,7 +724,7 @@ is divided into following sections:
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
</target>
- <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
+ <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
</target>
@@ -687,14 +761,45 @@ is divided into following sections:
CLEANUP SECTION
===============
-->
- <target depends="init" name="deps-clean" unless="no.deps"/>
+ <target name="-deps-clean-init" unless="built-clean.properties">
+ <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
+ <delete file="${built-clean.properties}" quiet="true"/>
+ </target>
+ <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
+ <echo level="warn" message="Cycle detected: JSON-JRuby was already built"/>
+ </target>
+ <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
+ <mkdir dir="${build.dir}"/>
+ <touch file="${built-clean.properties}" verbose="false"/>
+ <property file="${built-clean.properties}" prefix="already.built.clean."/>
+ <antcall target="-warn-already-built-clean"/>
+ <propertyfile file="${built-clean.properties}">
+ <entry key="${basedir}" value=""/>
+ </propertyfile>
+ </target>
<target depends="init" name="-do-clean">
<delete dir="${build.dir}"/>
- <delete dir="${dist.dir}"/>
+ <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
</target>
<target name="-post-clean">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
+ <target name="-check-call-dep">
+ <property file="${call.built.properties}" prefix="already.built."/>
+ <condition property="should.call.dep">
+ <not>
+ <isset property="already.built.${call.subproject}"/>
+ </not>
+ </condition>
+ </target>
+ <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
+ <ant antfile="${call.script}" inheritall="false" target="${call.target}">
+ <propertyset>
+ <propertyref prefix="transfer."/>
+ <mapper from="transfer.*" to="*" type="glob"/>
+ </propertyset>
+ </ant>
+ </target>
</project>
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties
index 0deef00..a9c62d4 100644
--- a/nbproject/genfiles.properties
+++ b/nbproject/genfiles.properties
@@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=be360661
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=82862954
-nbproject/build-impl.xml.script.CRC32=303f4a0e
-nbproject/build-impl.xml.stylesheet.CRC32=5c621a33@1.26.2.45
+nbproject/build-impl.xml.script.CRC32=7ab44279
+nbproject/build-impl.xml.stylesheet.CRC32=576378a2@1.32.1.45
diff --git a/nbproject/project.properties b/nbproject/project.properties
index e0d5bbe..e199172 100644
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -6,6 +6,8 @@ build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.sources.dir=${build.dir}/generated-sources
+endorsed.classpath=
+jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
lib.dir=lib
jruby.dir=../jruby
build.generated.dir=${build.dir}/generated
@@ -24,13 +26,14 @@ dist.dir=dist
dist.jar=${dist.dir}/ext.jar
dist.javadoc.dir=${dist.dir}/javadoc
excludes=
-file.reference.jruby.jar=${jruby.dir}/lib/jruby.jar
file.reference.bytelist.jar=${jruby.dir}/build_lib/bytelist.jar
includes=**
jar.compress=false
javac.classpath=\
- ${file.reference.jruby.jar}:\
- ${file.reference.bytelist.jar}
+ ${file.reference.bytelist.jar}:\
+ ${libs.Byelist.classpath}:\
+ ${libs.Constantine.classpath}:\
+ ${libs.JCodings.classpath}
# Space-separated list of extra javac options
javac.compilerargs=-Xlint -Xlint:-serial
javac.deprecation=true
diff --git a/tests/test_json_addition.rb b/tests/test_json_addition.rb
index 844cd4f..2c89e39 100755
--- a/tests/test_json_addition.rb
+++ b/tests/test_json_addition.rb
@@ -110,9 +110,9 @@ class TC_JSONAddition < Test::Unit::TestCase
json_raw_object = raw.to_json_raw_object
hash = { 'json_class' => 'String', 'raw'=> raw_array }
assert_equal hash, json_raw_object
- assert_match /\A\{.*\}\Z/, json
- assert_match /"json_class":"String"/, json
- assert_match /"raw":\[0,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,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255\]/, json
+ assert_match(/\A\{.*\}\Z/, json)
+ assert_match(/"json_class":"String"/, json)
+ assert_match(/"raw":\[0,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,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255\]/, json)
raw_again = JSON.parse(json)
assert_equal raw, raw_again
end
diff --git a/tests/test_json_rails.rb b/tests/test_json_rails.rb
index 6fd201b..7c3d51d 100755
--- a/tests/test_json_rails.rb
+++ b/tests/test_json_rails.rb
@@ -131,9 +131,9 @@ class TC_JSONRails < Test::Unit::TestCase
json_raw_object = raw.to_json_raw_object
hash = { 'json_class' => 'String', 'raw'=> raw_array }
assert_equal hash, json_raw_object
- assert_match /\A\{.*\}\Z/, json
- assert_match /"json_class":"String"/, json
- assert_match /"raw":\[0,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,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255\]/, json
+ assert_match(/\A\{.*\}\Z/, json)
+ assert_match(/"json_class":"String"/, json)
+ assert_match(/"raw":\[0,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,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255\]/, json)
raw_again = JSON.parse(json)
assert_equal raw, raw_again
end