fix up wala.core.testdata structure so things work from maven

We put all the jar files (the testdata jar, JLex, etc.) in the root
directory now, and set up the build.properties so that these jars get
copied into the final plugin jar, making the tests work properly from
maven.  We also still copy the jars into the bin/ directory, so the
Eclipse launchers still work.
This commit is contained in:
Manu Sridharan 2013-05-26 14:47:00 -07:00
parent 9bc5bcbb3c
commit cfc01b5ab6
4 changed files with 16 additions and 10 deletions

2
.gitignore vendored
View File

@ -8,7 +8,7 @@ com.ibm.wala.cast.java.test.data/src/JLex/
*~
com.ibm.wala.cast.js.test.data/examples-src/ajaxslt/
com.ibm.wala.core.testdata/@dot/
com.ibm.wala.core.testdata/lib/
com.ibm.wala.core.testdata/*.jar
com.ibm.wala.core/dat/wala.properties
com.ibm.wala.core.tests/dat/wala.examples.properties
com.ibm.wala.cast.js.html.nu_validator/lib/

View File

@ -1,4 +1,8 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
.,\
JLex.jar,\
bcel-5.2.jar,\
java-cup-11a.jar,\
com.ibm.wala.core.testdata_1.0.0.jar

View File

@ -36,7 +36,7 @@
<property name="bundleBootClasspath" value="${bootclasspath}"/>
<target name="JLexPresent" depends="init">
<available file="${plugin.destination}/lib/JLex.jar" property="jlex.present"/>
<available file="${plugin.destination}/JLex.jar" property="jlex.present"/>
</target>
<target name="fetchJLex" depends="JLexPresent" unless="jlex.present">
@ -44,20 +44,20 @@
<mkdir dir="${temp.folder}/JLex"/>
<get src="http://www.cs.princeton.edu/~appel/modern/java/JLex/current/Main.java" dest="${temp.folder}/JLex/Main.java"/>
<javac includeAntRuntime="no" srcdir="${temp.folder}" destdir="${temp.folder}"/>
<jar destfile="${plugin.destination}/lib/JLex.jar" basedir="${temp.folder}" />
<jar destfile="${plugin.destination}/JLex.jar" basedir="${temp.folder}" />
<delete dir="${temp.folder}"/>
</target>
<target name="javaCupPresent" depends="init">
<available file="${plugin.destination}/lib/java-cup-11a.jar" property="javacup.present"/>
<available file="${plugin.destination}/java-cup-11a.jar" property="javacup.present"/>
</target>
<target name="fetchJavaCup" depends="javaCupPresent" unless="javacup.present">
<get src="http://www2.cs.tum.edu/projects/cup/java-cup-11a.jar" dest="${plugin.destination}/lib/java-cup-11a.jar"/>
<get src="http://www2.cs.tum.edu/projects/cup/java-cup-11a.jar" dest="${plugin.destination}/java-cup-11a.jar"/>
</target>
<target name="bcelPresent" depends="init">
<available file="${plugin.destination}/lib/bcel-5.2.jar" property="bcel.present"/>
<available file="${plugin.destination}/bcel-5.2.jar" property="bcel.present"/>
</target>
<target name="fetchBcel" depends="bcelPresent" unless="bcel.present">
@ -66,13 +66,13 @@
<get src="http://archive.apache.org/dist/jakarta/bcel/binaries/bcel-5.2.tar.gz" dest="${temp.folder}/bcel-5.2.tar.gz"/>
<gunzip src="${temp.folder}/bcel-5.2.tar.gz" dest="${temp.folder}/bcel-5.2.tar"/>
<untar src="${temp.folder}/bcel-5.2.tar" dest="${temp.folder}"/>
<copy file="${temp.folder}/bcel-5.2/bcel-5.2.jar" tofile="${plugin.destination}/lib/bcel-5.2.jar" />
<copy file="${temp.folder}/bcel-5.2/bcel-5.2.jar" tofile="${plugin.destination}/bcel-5.2.jar" />
<delete dir="${temp.folder}"/>
</target>
<target name="copyJars" depends="fetchJLex,fetchJavaCup,fetchBcel">
<copy todir="${plugin.destination}/bin">
<fileset dir="${plugin.destination}/lib" />
<fileset dir="${plugin.destination}" includes="*.jar" />
</copy>
</target>
@ -103,6 +103,7 @@
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
<zip destfile="${plugin.destination}/bin/com.ibm.wala.core.testdata_1.0.0.jar" basedir="${temp.folder}/com.ibm.wala.core.testdata_1.0.0" filesonly="false" whenempty="skip" update="false"/>
<zip destfile="${plugin.destination}/com.ibm.wala.core.testdata_1.0.0.jar" basedir="${temp.folder}/com.ibm.wala.core.testdata_1.0.0" filesonly="false" whenempty="skip" update="false"/>
<delete dir="${temp.folder}"/>
</target>

View File

@ -7,7 +7,8 @@ Bundle-Vendor: %providerName
Require-Bundle: com.ibm.wala.shrike,
com.ibm.wala.core,
org.eclipse.core.runtime,
org.junit;bundle-version="4.3.1"
org.junit;bundle-version="4.3.1",
com.ibm.wala.core.testdata;bundle-version="1.3.4"
Bundle-Localization: plugin
Export-Package: com.ibm.wala.core.tests.basic,
com.ibm.wala.core.tests.callGraph,