I'm confused on the inner-workings of the lite, min, pack, and test targets within build.xml in the jQuery source. Specifically, I'm confused about the <java> procedure within the target.
[Code included for reference]
<property description="Files executefor parsing etc." name="BUILD_DIR" value="build" />
<property description="Rhino JS Engine" name="JAR" value="${BUILD_DIR}/js.jar" />
<property name="JQ" value="${DIST_DIR}/jquery.js" />
<property name="JQ_MIN" value="${DIST_DIR}/jquery.min.js" />
<target name="min" depends="jquery" description="Remove all comments and whitespace, no compression">
<echo message="Building ${JQ_MIN}" />
<java jar="${JAR}" fork="true">
<arg value="${BUILD_DIR}/build/min.js" />
<arg value="${JQ}" />
<arg value="${JQ_MIN}" />
</java>
<echo message="${JQ_MIN} built." />
</target>
I understand that the <java> tag allows Ant to call a java class from within an Ant build. However, what do the arguments mean? In the case above, I see what the value are, but I'm confused on how different behaviors are triggered because <target name="pack"> has pretty much the same syntax but with different behavior.
<target name="pack" depends="jquery" description="Remove all comments and whitespace and compress">
<echo message="Building ${JQ_PACK}" />
<java jar="${JAR}" fork="true">
<arg value="${BUILD_DIR}/build/pack.js" />
<arg value="${JQ}" />
<arg value="${JQ_PACK}" />
</java>
<echo message="${JQ_PACK} built." />
</target>
Except this piece of code removes whitespace AND compresses the code whereas the "min" code doesn't compress.
How does the Java class determine which method to execute? Will someone explain to me the intricacies of this target?
Thanks,
Derrek
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
