Skip to content

Commit

Permalink
[json-lib] added jarjar targets
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed May 18, 2009
1 parent 3115c86 commit b7115d1
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.properties
@@ -0,0 +1 @@
maven.repo.local = /usr/dev/m2/repository
35 changes: 34 additions & 1 deletion build.xml
Expand Up @@ -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" />
Expand Down Expand Up @@ -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">
Expand Down
Binary file added src/lib/jarjar-1.0.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions src/test/java/net/sf/json/TestUserSubmitted.java
Expand Up @@ -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();
Expand Down

0 comments on commit b7115d1

Please sign in to comment.