Permalink
Browse files

[json-lib] added jarjar targets

  • Loading branch information...
1 parent 3115c86 commit b7115d1f4939e62573bf94308aed691ed5137bb7 aalmiray committed May 18, 2009
Showing with 37 additions and 1 deletion.
  1. +1 −0 build.properties
  2. +34 −1 build.xml
  3. BIN src/lib/jarjar-1.0.jar
  4. +2 −0 src/test/java/net/sf/json/TestUserSubmitted.java
View
@@ -0,0 +1 @@
+maven.repo.local = /usr/dev/m2/repository
View
@@ -5,7 +5,6 @@
<property name="maven.build.directory" value="target" />
<property name="maven.test.reports" value="${maven.build.directory}/test-reports" />
<property name="maven.test.output" value="target/test-classes" />
- <property name="maven.repo.local" value="${user.home}/.m2/repository" />
<property name="project.lib.dir" value="${basedir}/src/lib" />
<property name="project.src.jdk3.dir" value="${basedir}/src/main/java" />
<property name="project.src.jdk5.dir" value="${basedir}/src/main/jdk15" />
@@ -228,6 +227,40 @@
<jar jarfile="${maven.build.directory}/${maven.project.build.finalName}-jdk15.jar" basedir="${maven.build.output}" excludes="**/package.html" />
</target>
+ <target name="jarjar" depends="jar">
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
+ classpath="${project.lib.dir}/jarjar-1.0.jar"/>
+ <property name="jarfile" value="${maven.build.directory}/${maven.project.name}-all-${maven.project.version}-jdk13.jar"/>
+ <delete file="${jarfile}"/>
+ <jarjar jarfile="${jarfile}">
+ <zipfileset src="${maven.build.directory}/${maven.project.build.finalName}-jdk13.jar"/>
+ <zipfileset src="${maven.repo.local}/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar"/>
+ <zipfileset src="${maven.repo.local}/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar"/>
+ <zipfileset src="${maven.repo.local}/commons-lang/commons-lang/2.4/commons-lang-2.4.jar"/>
+ <zipfileset src="${maven.repo.local}/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"/>
+ <zipfileset src="${maven.repo.local}/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar"/>
+ <rule pattern="org.apache.commons.**" result="_json.org.apache.commons.@1"/>
+ <rule pattern="net.sf.ezmorph.**" result="_json.net.sf.ezmorph.@1"/>
+ </jarjar>
+ </target>
+
+ <target name="jarjar.jdk5" depends="jar.jdk5">
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
+ classpath="${project.lib.dir}/jarjar-1.0.jar"/>
+ <property name="jarfile" value="${maven.build.directory}/${maven.project.name}-all-${maven.project.version}-jdk15.jar"/>
+ <delete file="${jarfile}"/>
+ <jarjar jarfile="${jarfile}">
+ <zipfileset src="${maven.build.directory}/${maven.project.build.finalName}-jdk15.jar"/>
+ <zipfileset src="${maven.repo.local}/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar"/>
+ <zipfileset src="${maven.repo.local}/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar"/>
+ <zipfileset src="${maven.repo.local}/commons-lang/commons-lang/2.4/commons-lang-2.4.jar"/>
+ <zipfileset src="${maven.repo.local}/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"/>
+ <zipfileset src="${maven.repo.local}/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar"/>
+ <rule pattern="org.apache.commons.**" result="_json.org.apache.commons.@1"/>
+ <rule pattern="net.sf.ezmorph.**" result="_json.net.sf.ezmorph.@1"/>
+ </jarjar>
+ </target>
+
<target name="source.jar" depends="clean" description="Source jar (jdk1.3)">
<mkdir dir="${maven.build.directory}/source/jdk13" />
<copy todir="${maven.build.directory}/source/jdk13">
View
Binary file not shown.
@@ -713,13 +713,15 @@ public void testJSONObject_toBean_FieldBean() {
assertEquals( "stringy", bean2.string );
}
+ /*
public void testBug_2692698() {
String input = "[\"{'selectedOperatorIndex':2,'leftSideValue':'report.field9','rightSideValue':'2009-3-1'}\",\"all\"]";
JSON json = JSONArray.fromObject( input );
String output = json.toString();
System.err.println(input);
System.err.println(output);
}
+ */
public void testWithoutAnyTroubleTheyMayBeAlreadyDoneByOtherTest() {
JsonConfig tConfig = new JsonConfig();

0 comments on commit b7115d1

Please sign in to comment.