Skip to content

Commit

Permalink
Now produce a single monolithic env.js.jar that is the combination of
Browse files Browse the repository at this point in the history
the locally-tracked Rhino release jar, js.jar, and our local Rhino
extension classes.  Ant task to build extensions-only mainForEnvjs.jar
remains present in the build.xml files, but is not run by default.
Local unit tests now run using the combined jar.
  • Loading branch information
gleneivey committed Aug 16, 2009
1 parent 72bde9d commit 6667580
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 7 deletions.
5 changes: 1 addition & 4 deletions build.xml
Expand Up @@ -152,10 +152,7 @@
</target>

<target name="test" description="Run the tests">
<java fork="true"
failonerror="true"
classname="org.wontology.floss.rhino.envjs.EnvjsRhinoMain"
classpath="rhino/js.jar:rhino/mainForEnvjs.jar">
<java fork="true" jar="rhino/env.js.jar" failonerror="true">
<arg value="test/test.js"/>
<jvmarg value="-Dfile.encoding=utf-8"/>
</java>
Expand Down
8 changes: 7 additions & 1 deletion rhino/build.properties
Expand Up @@ -7,10 +7,16 @@ implementation.version: mainForEnvjs 0 ${implementation.date}

build.dir: build
src.dir: src
this.jar: mainForEnvjs.jar

jar.jar: mainForEnvjs.jar
dist.name: mainforenvjs${version}
dist.dir: ${build.dir}/${dist.name}

combined.jar: env.js.jar
rhino.jar: js.jar
combined.name: mainforenvjs${version}
combined.dir: ${build.dir}/${dist.name}

# compilation destionation
classes: ${build.dir}/classes

Expand Down
2 changes: 1 addition & 1 deletion rhino/build.xml
@@ -1,6 +1,6 @@

<project name="rhino" default="all" basedir=".">
<target name="all">
<ant antfile="src/build.xml" target="jar"/>
<ant antfile="src/build.xml" target="combined-jar"/>
</target>
</project>
Binary file added rhino/env.js.jar
Binary file not shown.
Binary file removed rhino/mainForEnvjs.jar
Binary file not shown.
21 changes: 20 additions & 1 deletion rhino/src/build.xml
@@ -1,4 +1,12 @@

<!--
* This file is a component of env.js,
* http://github.com/gleneivey/env-js/commits/master/README
* a Pure JavaScript Browser Environment
* Copyright 2009 John Resig, licensed under the MIT License
* http://www.opensource.org/licenses/mit-license.php
-->


<project name="mainForEnvjs" default="jar" basedir="..">

Expand All @@ -13,6 +21,7 @@
<mkdir dir="${build.dir}"/>
<mkdir dir="${classes}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${combined.dir}"/>
</target>

<target name="compile" depends="init">
Expand All @@ -29,7 +38,17 @@
</target>

<target name="jar" depends="compile">
<jar jarfile="${this.jar}"
<jar jarfile="${jar.jar}"
basedir="${classes}"
manifest="${src.dir}/manifest"
compress="${jar-compression}"
/>
</target>

<target name="combined-jar" depends="compile">
<copy file="${rhino.jar}" tofile="${combined.jar}"/>
<jar jarfile="${combined.jar}"
update="true"
basedir="${classes}"
manifest="${src.dir}/manifest"
compress="${jar-compression}"
Expand Down

0 comments on commit 6667580

Please sign in to comment.