mirror of
https://github.com/nicolabs/ciform.git
synced 2026-05-21 12:13:25 +02:00
# some refactoring (removed some levels of directories)
+ sha1 build scripts + top level README
This commit is contained in:
parent
3b6f5f091f
commit
abe7ad5541
|
|
@ -13,3 +13,10 @@ codecs/rsa/build
|
|||
codecs/base64/build
|
||||
codecs/base64/local.properties
|
||||
codecs/hex/build
|
||||
ciform/local.properties
|
||||
ciform/target
|
||||
codecs/sha1/build
|
||||
codecs/sha1/local.properties
|
||||
codecs/sha1/target
|
||||
ciform/build
|
||||
ciform/lib
|
||||
|
|
|
|||
7
README.txt
Normal file
7
README.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
This folder contains several projects and dependent resources :
|
||||
|
||||
ciform -> Ciform project directory tree
|
||||
codecs -> Dependent Javascript libraries for Ciform
|
||||
Each subdirectory is a Maven-style project with a build script that generates Ivy artifacts for use with Ciform.
|
||||
Run "ant install" to generate and import artifacts into the local Ivy repository.
|
||||
tools -> Tools required to build the projects : extract required binaries before building the projects
|
||||
72
ciform/build.properties
Normal file
72
ciform/build.properties
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
########################################
|
||||
#
|
||||
# This file is a convenient way to define some parameters,
|
||||
# rather than from inside the build script.
|
||||
#
|
||||
# Depending on the ant targets that will be invoked,
|
||||
# some properties will be required, some others won't.
|
||||
#
|
||||
# Some important properties are marked "required" so you can spot
|
||||
# the ones to define locally if you want to build this project.
|
||||
#
|
||||
# You should not need to override those properties.
|
||||
# If you really need to, you can create a new file called "local.properties"
|
||||
# in the same directory and put inside any property you want to fit your local configuration.
|
||||
#
|
||||
# Do NOT commit the "local.properties" file to the version control system
|
||||
# (CVS, SVN, ...) : it should stay as a local configuration only.
|
||||
# Do not commit or remove this file from the v.c.s. either ;-o
|
||||
#
|
||||
# If you don't wish to create such a file, you can pass the required properties
|
||||
# to ant as command line arguments using the -D option.
|
||||
#
|
||||
########################################
|
||||
|
||||
basedir=.
|
||||
|
||||
# Where the source files are : here Maven-style
|
||||
src.dir=${basedir}/src/main/javascript
|
||||
|
||||
# Directory used to put temporary files during build
|
||||
build.dir=${basedir}/build
|
||||
|
||||
# Where the generated files are going
|
||||
target.dir=${basedir}/target
|
||||
|
||||
# Where the generated libraries are going
|
||||
lib.dir=${target.dir}/lib
|
||||
|
||||
# Where to copy the documentation
|
||||
doc.dir=${target.dir}/doc
|
||||
|
||||
|
||||
########################################
|
||||
#
|
||||
# External programs : you should copy this section to "local.properties"
|
||||
# and change it for your configuration.
|
||||
#
|
||||
########################################
|
||||
|
||||
# (convenience) -> set to common 'tools' directory
|
||||
#tools.dir=../../tools
|
||||
|
||||
# JsUnit files
|
||||
#jsunit.dir=/opt/jsunit
|
||||
jsunit.coreJs=${jsunit.dir}/app/jsUnitCore.js
|
||||
#jsunit.build=${jsunit.dir}/build.xml
|
||||
jsunit.testRunner=${jsunit.dir}/testRunner.html
|
||||
#jsunit.browsers=/usr/bin/firefox,/usr/bin/konqueror
|
||||
|
||||
# Ant settings
|
||||
# (required) -> set to Ivy library containing Ant task
|
||||
#ant.ivytask.path=${tools.dir}/ivy-2.2.0.jar
|
||||
# (required) -> set to Javascript Ant template project
|
||||
#ant.jsproject.path=${tools.dir}/ant-js.xml
|
||||
|
||||
# (required) -> define this property in your "local.properties" file
|
||||
# Full path to the jar of the YUI compressor (http://developer.yahoo.com/yui/compressor)
|
||||
#yuicompressor.jar=${tools.dir}/yuicompressor-2.4.7.jar
|
||||
|
||||
# (required) -> define this property in your "local.properties" file
|
||||
# Installation directory of JSDoc-toolkit (http://code.google.com/p/jsdoc-toolki)
|
||||
#jsdoc.dir=${tools.dir}/jsdoc-toolkit
|
||||
14
ciform/build.xml
Normal file
14
ciform/build.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<!--
|
||||
Build script for the project "Ciform".
|
||||
-->
|
||||
<project name="Ciform" default="javascript.package" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
|
||||
<!-- custom, local only, properties for this project -->
|
||||
<property file="local.properties"/>
|
||||
<!-- default properties for this project -->
|
||||
<property file="build.properties"/>
|
||||
|
||||
<!-- template for javascript projects -->
|
||||
<import file="${ant.jsproject.path}" />
|
||||
|
||||
</project>
|
||||
25
ciform/ivy.xml
Normal file
25
ciform/ivy.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<ivy-module version="2.0">
|
||||
<info organisation="ciform" module="" revision="1.0.0" status="integration" publication="20120127120313">
|
||||
<license name="LGPL" url="http://plugnauth.sf.net/ciform/license" />
|
||||
<ivyauthor name="Nicolas BONARDELLE" url="http://nicobo.net/contact?subject=ciform+ivy" />
|
||||
<description homepage="http://plugnauth.sourceforge.net/ciform">
|
||||
Ciform encrypts web forms before they are submitted, so data is not sent in clear text over the Internet.
|
||||
</description>
|
||||
</info>
|
||||
<configurations>
|
||||
<conf name="core"/>
|
||||
<conf name="standalone"/>
|
||||
</configurations>
|
||||
<publications>
|
||||
<artifact name="ciform" type="js" conf="core" />
|
||||
<artifact name="ciform-min" type="js" conf="core" />
|
||||
<artifact name="minilib" type="js" conf="core" />
|
||||
<artifact name="minilib-min" type="js" conf="core" />
|
||||
<artifact name="libciform" type="js" conf="standalone" />
|
||||
<artifact name="libciform-min" type="js" conf="standalone" />
|
||||
</publications>
|
||||
<dependencies>
|
||||
<dependency org="crypto" name="rsa" rev="latest.integration" conf="core->minified;standalone->minified" />
|
||||
<dependency org="crypto" name="sha1" rev="latest.integration" conf="core->minified;standalone->minified" />
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<ivy-module version="2.0">
|
||||
<info organisation="ciform" module="javascript" status="integration">
|
||||
<license name="LGPL" url="http://plugnauth.sf.net/ciform/license" />
|
||||
<ivyauthor name="Nicolas BONARDELLE" url="http://nicobo.net/contact?subject=ciform+ivy" />
|
||||
<repository name="plugnauth@sourceforge" url="http://plugnauth.sourceforge.net/ciform/ivy" ivys="true" artifacts="true" />
|
||||
<description homepage="http://plugnauth.sourceforge.net/ciform">
|
||||
Ciform encrypts web forms before they are submitted, so data is not sent in clear text over the Internet.
|
||||
</description>
|
||||
</info>
|
||||
<configurations>
|
||||
<conf name="standalone"/>
|
||||
<conf name="plain"/>
|
||||
</configurations>
|
||||
<publications>
|
||||
<artifact name="libciform" ext="js" conf="standalone" />
|
||||
<artifact name="ciform" ext="js" conf="plain" />
|
||||
</publications>
|
||||
<dependencies>
|
||||
<dependency name="version" rev="latest.integration" conf="core->default" />
|
||||
<dependency name="list" rev="latest.integration" conf="core" />
|
||||
<dependency name="minilib" rev="latest.integration" conf="plain->plain;standalone->compressed" />
|
||||
<dependency org="crypto" name="rsa" rev="latest.integration" conf="plain->plain;standalone->compressed" />
|
||||
<dependency org="crypto" name="sha1" rev="latest.integration" conf="plain->plain;standalone->compressed" />
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<ivy-module version="2.0">
|
||||
<info organisation="crypto" module="base64" revision="1.0.0" status="integration" publication="20120127121502">
|
||||
<license name="Copyright 2005 Herbert Hanewinkel" url="www.haneWIN.de"/>
|
||||
<ivyauthor name="Nicolas BONARDELLE" url="http://nicobo.net/contact?subject=crypto+hex+ivy"/>
|
||||
<ivyauthor name="Nicolas BONARDELLE" url="http://nicobo.net/contact?subject=crypto+base64+ivy"/>
|
||||
<description homepage="http://code.google.com/p/ciform">
|
||||
OpenPGP radix-64/base64 string encoding/decoding.
|
||||
</description>
|
||||
|
|
|
|||
|
|
@ -1,41 +1,72 @@
|
|||
########################################
|
||||
#
|
||||
# This file is a convenient way to define some parameters
|
||||
# specific to the project, rather than from inside the build script.
|
||||
# This file is a convenient way to define some parameters,
|
||||
# rather than from inside the build script.
|
||||
#
|
||||
# Depending on the ant targets that will be invoked,
|
||||
# some properties will be required, some others won't.
|
||||
#
|
||||
# Usually you should not need to override those properties.
|
||||
# Some important properties are marked "required" so you can spot
|
||||
# the ones to define locally if you want to build this project.
|
||||
#
|
||||
# You should not need to override those properties.
|
||||
# If you really need to, you can create a new file called "local.properties"
|
||||
# in the same directory and put inside any property you want to fit your local configuration.
|
||||
#
|
||||
# Do NOT commit the "local.properties" file to the version control system
|
||||
# (CVS, SVN, ...) : it should stay as a local configuration only.
|
||||
# Do not commit or remove this file from the v.c.s. either ;-o
|
||||
#
|
||||
# If you don't wish to create such a file, you can pass the required properties
|
||||
# to ant as command line arguments using the -D option.
|
||||
#
|
||||
# Do NOT commit the "local.properties" file to the version control system
|
||||
# (CVS, SVN, ...) : it should stay as a local configuration only.
|
||||
# Do not modify or remove this file from the v.c.s. either ;-o
|
||||
#
|
||||
########################################
|
||||
|
||||
basedir=.
|
||||
|
||||
# Where the source files are : here Maven-style
|
||||
src.dir=${basedir}/src/main/javascript
|
||||
|
||||
# A working directory to store temporary files
|
||||
# Directory used to put temporary files during build
|
||||
build.dir=${basedir}/build
|
||||
|
||||
# Where to find the tests sources
|
||||
tests.dir=${basedir}/src/test/javascript
|
||||
|
||||
# Where to output tests results
|
||||
tests.logs=${build.dir}/logs
|
||||
|
||||
# Where to create the packages
|
||||
# Where the generated files are going
|
||||
target.dir=${basedir}/target
|
||||
|
||||
# Where the generated libraries are going
|
||||
lib.dir=${target.dir}/lib
|
||||
|
||||
# Where to copy the api documentation
|
||||
doc.dir=${target.dir}/api
|
||||
# Where to copy the documentation
|
||||
doc.dir=${target.dir}/doc
|
||||
|
||||
|
||||
########################################
|
||||
#
|
||||
# External programs : you should copy this section to "local.properties"
|
||||
# and change it for your configuration.
|
||||
#
|
||||
########################################
|
||||
|
||||
# (convenience) -> set to common 'tools' directory
|
||||
#tools.dir=../../tools
|
||||
|
||||
# JsUnit files
|
||||
#jsunit.dir=/opt/jsunit
|
||||
jsunit.coreJs=${jsunit.dir}/app/jsUnitCore.js
|
||||
#jsunit.build=${jsunit.dir}/build.xml
|
||||
jsunit.testRunner=${jsunit.dir}/testRunner.html
|
||||
#jsunit.browsers=/usr/bin/firefox,/usr/bin/konqueror
|
||||
|
||||
# Ant settings
|
||||
# (required) -> set to Ivy library containing Ant task
|
||||
#ant.ivytask.path=${tools.dir}/ivy-2.2.0.jar
|
||||
# (required) -> set to Javascript Ant template project
|
||||
#ant.jsproject.path=${tools.dir}/ant-js.xml
|
||||
|
||||
# (required) -> define this property in your "local.properties" file
|
||||
# Full path to the jar of the YUI compressor (http://developer.yahoo.com/yui/compressor)
|
||||
#yuicompressor.jar=${tools.dir}/yuicompressor-2.4.7.jar
|
||||
|
||||
# (required) -> define this property in your "local.properties" file
|
||||
# Installation directory of JSDoc-toolkit (http://code.google.com/p/jsdoc-toolki)
|
||||
#jsdoc.dir=${tools.dir}/jsdoc-toolkit
|
||||
|
|
@ -1,198 +1,16 @@
|
|||
<!--
|
||||
Build script for the project "Crypto.SHA1".
|
||||
Build script for the project "Crypto.Base64".
|
||||
|
||||
This script is an Ant script using Ivy extension to resolve dependencies.
|
||||
You will need both Ant (http://ant.apache.org/) and Ivy (http://ant.apache.org/ivy) to use it.
|
||||
This script is based on a template for Javascript projects.
|
||||
-->
|
||||
<project name="sha1" default="verify" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<project name="Crypto.Base64" default="javascript.package" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
|
||||
<!--
|
||||
Runs JsUnit tests. This target saves a lot of verbosity in the projects' build scripts.
|
||||
|
||||
Firefox 3 users : change the security.fileuri.strict_origin_policy parameter to 'false' for the following target to work
|
||||
|
||||
// static configuration
|
||||
@in jsunit.dir the directory where JsUnit resides
|
||||
@in jsunit.coreJs the jsUnitCore.js file
|
||||
@in jsunit.testRunner the test runner's HTML page
|
||||
-->
|
||||
<taskdef name="jsunit" classname="net.jsunit.ant.StandaloneTestTask" classpath="/home/cbonar/src/jsunit/java/bin" />
|
||||
|
||||
<!-- ==================== -->
|
||||
<!-- Settings -->
|
||||
<!-- ==================== -->
|
||||
|
||||
<!-- default properties, specific to this project -->
|
||||
<!-- custom, local only, properties for this project -->
|
||||
<property file="local.properties"/>
|
||||
<!-- default properties for this project -->
|
||||
<property file="build.properties"/>
|
||||
<!-- properties common to all projects -->
|
||||
<property file="../../local.properties"/>
|
||||
<property file="../../common.properties"/>
|
||||
|
||||
|
||||
<!-- ==================== -->
|
||||
<!-- Public targets : they are greatly inspired from the Maven build lifecycle -->
|
||||
<!-- ==================== -->
|
||||
|
||||
|
||||
<target name="clean" description="Restores the initial state of the project, deleting any generated file.">
|
||||
<delete includeemptydirs="true" dir="${target.dir}"/>
|
||||
<delete includeemptydirs="true" dir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="validate" description="Validates the project is correct and all necessary information is available.">
|
||||
<!-- Retreives dependencies with ivy -->
|
||||
<ivy:retrieve/>
|
||||
<!-- Creates necessary directories -->
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<mkdir dir="${target.dir}" />
|
||||
</target>
|
||||
|
||||
|
||||
<target name="compile" depends="validate" description="Compiles the source code of the project.">
|
||||
|
||||
<!-- We use this target to copy all required files for the tests together in a consistent hierarchy -->
|
||||
<!--
|
||||
<copy file="${jsunit.coreJs}" todir="${jsunit.tmp}"/>
|
||||
<copy todir="${jsunit.tmp}" overwrite="true">
|
||||
<resources refid="jsunit.in.files"/>
|
||||
</copy>
|
||||
-->
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<!-- NOTE : These tests should not require the code be packaged or deployed. -->
|
||||
<target name="test" depends="compile" description="Tests the compiled source code using a suitable unit testing framework.">
|
||||
|
||||
<jsunit showoutput="true"
|
||||
printsummary="true"
|
||||
filtertrace="false"
|
||||
jsUnitRoot="${jsunit.dir}"
|
||||
haltonfailure="true"
|
||||
haltonerror="true"
|
||||
>
|
||||
<sysproperty key="browserFileNames" value="${jsunit.browsers}"/>
|
||||
<sysproperty key="port" value="45678"/>
|
||||
<sysproperty key="logsDirectory" value="${tests.logs}"/>
|
||||
<test todir="${tests.logs}">
|
||||
<fileset dir="${src.dir}" includes="**/*.js"/>
|
||||
<fileset dir="${tests.dir}" includes="**/*.js"/>
|
||||
</test>
|
||||
<!--
|
||||
<scripts dir="${src.dir}" includes="**/*.js"/>
|
||||
<scripts dir="${tests.dir}" includes="**/*.js"/>
|
||||
-->
|
||||
<classpath>
|
||||
<fileset dir="${jsunit.dir}/java/lib">
|
||||
<include name="*.jar"/>
|
||||
</fileset>
|
||||
<!--
|
||||
<fileset dir="${jsunit.dir}/java/bin">
|
||||
<include name="jsunit.jar"/>
|
||||
</fileset>
|
||||
-->
|
||||
<dirset dir="/home/cbonar/src/jsunit/java/bin"/>
|
||||
<dirset dir="${jsunit.dir}/java/config"/>
|
||||
</classpath>
|
||||
<formatter type="xml"/>
|
||||
</jsunit>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<target name="package" depends="test, doc, build-default, build-compressed" description="Takes the compiled code and package it in its distributable format.">
|
||||
</target>
|
||||
|
||||
|
||||
<target name="integration-test" depends="package" description="Processes and deploys the package if necessary into an environment where integration tests can be run.">
|
||||
|
||||
<!-- Testing the compressed version of the library -->
|
||||
|
||||
<!-- Replaces the tested library with the compressed version -->
|
||||
<!-- FIXME : it's not clean : it should not override a file already in build.dir -->
|
||||
<!--
|
||||
<copy file="${target.dir}/${ant.project.name}-compressed-${ivy.revision}.js" tofile="${build.dir}/sha1.js"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<resources id="jsunit.in.files">
|
||||
<file file="${build.dir}/sha1.js"/>
|
||||
<fileset dir="${tests.dir}"/>
|
||||
</resources>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<antcall target="jsunit">
|
||||
<reference refid="jsunit.in.files"/>
|
||||
<param name="jsunit.in.testsuite" value="AllTests.html"/>
|
||||
<param name="jsunit.out.logs" value="${tests.logs}"/>
|
||||
</antcall>
|
||||
-->
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<target name="verify" depends="integration-test" description="Runs any checks to verify the package is valid and meets quality criteria.">
|
||||
<!-- nothing to do -->
|
||||
</target>
|
||||
|
||||
|
||||
<target name="install" depends="verify" description="Installs the package into the local repository, for use as a dependency in other projects locally.">
|
||||
<ivy:publish resolver="local" artifactspattern="${lib.dir}/[artifact]-[revision].[ext]" overwrite="true" />
|
||||
</target>
|
||||
|
||||
|
||||
<target name="deploy" depends="verify" description="Done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.">
|
||||
<!-- nothing to do -->
|
||||
</target>
|
||||
|
||||
|
||||
<target name="cruisecontrol" depends="verify" description="This target can be used to trigger a build useable with CruiseControl.">
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ==================== -->
|
||||
<!-- Internal targets -->
|
||||
<!-- ==================== -->
|
||||
|
||||
|
||||
<!-- Generates developer documentation. -->
|
||||
<target name="doc" depends="validate">
|
||||
<!-- Generates a report of dependencies -->
|
||||
<ivy:report todir="${doc.dir}"/>
|
||||
<!-- Generates the API doc -->
|
||||
<exec command="${jsdoc}" failonerror="true">
|
||||
<arg value="-d"/> <arg value="${doc.dir}"/>
|
||||
<arg value="--no-lexical-privates"/>
|
||||
<arg value="--package-naming"/>
|
||||
<arg value="--nested-file-naming"/>
|
||||
<arg line="--project-name Crypto.SHA1"/>
|
||||
<arg value="${src.dir}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- Builds the default package. -->
|
||||
<target name="build-default" depends="validate">
|
||||
<!-- Simply copies the library to the target dir (nothing more to do for the standard library) -->
|
||||
<copy file="${src.dir}/sha1.js" tofile="${target.dir}/${ant.project.name}-${ivy.revision}.js" />
|
||||
</target>
|
||||
|
||||
|
||||
<!-- Builds the compressed version of the package. -->
|
||||
<target name="build-compressed" depends="validate">
|
||||
<!-- Creates the compressed version of the library -->
|
||||
<java jar="${yuicompressor.jar}" fork="true" output="${target.dir}/${ant.project.name}-compressed-${ivy.revision}.js" failonerror="true">
|
||||
<arg line="--type js" />
|
||||
<arg file="${src.dir}/sha1.js"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ==================== -->
|
||||
<!-- CruiseControl targets -->
|
||||
<!-- ==================== -->
|
||||
<!-- template for javascript projects -->
|
||||
<import file="${ant.jsproject.path}" />
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,23 @@
|
|||
<ivy-module version="2.0">
|
||||
<info organisation="crypto" module="sha1" revision="2.1a" status="integration">
|
||||
<license name="Copyright 2000 - 2002 Paul Johnston" url="http://pajhome.org.uk/crypt/md5/" />
|
||||
<license name="BSD License" url="http://pajhome.org.uk/site/legal.html#bsdlicense" />
|
||||
<ivyauthor name="Nicolas BONARDELLE" url="http://nicobo.net/contact?subject=crypto+sha1+ivy" />
|
||||
<repository name="plugnauth@sourceforge" url="http://plugnauth.sourceforge.net/ivy" ivys="true" artifacts="true" />
|
||||
<description homepage="http://plugnauth.sourceforge.net/crypto">
|
||||
This library provides an implementation of the SHA-1 hash algorithm.
|
||||
<info organisation="crypto" module="sha1" revision="1.0.0" status="integration" publication="20120127135932">
|
||||
<license name="Copyright Paul Johnston 2000 - 2002" url="http://pajhome.org.uk/crypt/md5"/>
|
||||
<license name="BSD License"/>
|
||||
<ivyauthor name="Nicolas BONARDELLE" url="http://nicobo.net/contact?subject=crypto+base64+ivy"/>
|
||||
<description homepage="http://code.google.com/p/ciform">
|
||||
A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined in FIPS PUB 180-1
|
||||
</description>
|
||||
</info>
|
||||
<configurations>
|
||||
<!-- The source script as plain text, including all inner informations and comments. -->
|
||||
<conf name="source"/>
|
||||
<!-- An obfuscated, size-reduced version of the script. Use to speed up loading time in final environment. -->
|
||||
<conf name="minified"/>
|
||||
</configurations>
|
||||
<publications>
|
||||
<!-- The source script as plain text, including all inner informations and comments. -->
|
||||
<artifact name="sha1" type="javascript" ext="js" />
|
||||
<!-- An obfuscated, size-reduced version of the script. Use to speed up loading time in final environment. -->
|
||||
<artifact name="sha1-compressed" type="javascript" ext="js" />
|
||||
<artifact name="sha1" type="js" conf="source"/>
|
||||
<artifact name="sha1-min" type="js" conf="minified"/>
|
||||
</publications>
|
||||
<dependencies>
|
||||
<!-- no dependency required -->
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
</ivy-module>
|
||||
|
|
|
|||
103
tools/ant-js.xml
103
tools/ant-js.xml
|
|
@ -27,6 +27,13 @@
|
|||
</target>
|
||||
|
||||
<target name="compile" depends="validate" description="Compiles the source code of the project.">
|
||||
<!-- We use this target to copy all required files for the tests together in a consistent hierarchy -->
|
||||
<!--
|
||||
<copy file="${jsunit.coreJs}" todir="${jsunit.tmp}"/>
|
||||
<copy todir="${jsunit.tmp}" overwrite="true">
|
||||
<resources refid="jsunit.in.files"/>
|
||||
</copy>
|
||||
-->
|
||||
<!-- nothing more to do -->
|
||||
</target>
|
||||
|
||||
|
|
@ -39,6 +46,29 @@
|
|||
</target>
|
||||
|
||||
<target name="integration-test" depends="package" description="Processes and deploys the package if necessary into an environment where integration tests can be run.">
|
||||
|
||||
<!-- Testing the compressed version of the library -->
|
||||
|
||||
<!-- Replaces the tested library with the compressed version -->
|
||||
<!-- FIXME : it's not clean : it should not override a file already in build.dir -->
|
||||
<!--
|
||||
<copy file="${target.dir}/${ant.project.name}-compressed-${ivy.revision}.js" tofile="${build.dir}/sha1.js"/>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<resources id="jsunit.in.files">
|
||||
<file file="${build.dir}/sha1.js"/>
|
||||
<fileset dir="${tests.dir}"/>
|
||||
</resources>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<antcall target="jsunit">
|
||||
<reference refid="jsunit.in.files"/>
|
||||
<param name="jsunit.in.testsuite" value="AllTests.html"/>
|
||||
<param name="jsunit.out.logs" value="${tests.logs}"/>
|
||||
</antcall>
|
||||
-->
|
||||
<!-- nothing more to do -->
|
||||
</target>
|
||||
|
||||
|
|
@ -56,7 +86,7 @@
|
|||
<!-- nothing more to do -->
|
||||
</target>
|
||||
|
||||
<target name="clean" description="Cleans this project.">
|
||||
<target name="clean" description="Restores the initial state of the project, deleting any generated file.">
|
||||
<delete includeemptydirs="true" failonerror="false">
|
||||
<fileset dir="${build.dir}"/>
|
||||
<fileset dir="${target.dir}"/>
|
||||
|
|
@ -114,4 +144,75 @@
|
|||
<echo message="Minified : ${lib.dir}/${ivy.module}-min-${ivy.revision}.js" />
|
||||
</target>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
TODO fix and integrate the following targets
|
||||
-->
|
||||
|
||||
<!--
|
||||
Runs JsUnit tests. This target saves a lot of verbosity in the projects' build scripts.
|
||||
|
||||
Firefox 3 users : change the security.fileuri.strict_origin_policy parameter to 'false' for the following target to work
|
||||
|
||||
// static configuration
|
||||
@in jsunit.dir the directory where JsUnit resides
|
||||
@in jsunit.coreJs the jsUnitCore.js file
|
||||
@in jsunit.testRunner the test runner's HTML page
|
||||
-->
|
||||
<!--<taskdef name="jsunit" classname="net.jsunit.ant.StandaloneTestTask" classpath="/home/cbonar/src/jsunit/java/bin" />-->
|
||||
|
||||
<!-- NOTE : These tests should not require the code be packaged or deployed. -->
|
||||
<target name="test-fixme" depends="compile" description="Tests the compiled source code using a suitable unit testing framework.">
|
||||
|
||||
<jsunit showoutput="true"
|
||||
printsummary="true"
|
||||
filtertrace="false"
|
||||
jsUnitRoot="${jsunit.dir}"
|
||||
haltonfailure="true"
|
||||
haltonerror="true"
|
||||
>
|
||||
<sysproperty key="browserFileNames" value="${jsunit.browsers}"/>
|
||||
<sysproperty key="port" value="45678"/>
|
||||
<sysproperty key="logsDirectory" value="${tests.logs}"/>
|
||||
<test todir="${tests.logs}">
|
||||
<fileset dir="${src.dir}" includes="**/*.js"/>
|
||||
<fileset dir="${tests.dir}" includes="**/*.js"/>
|
||||
</test>
|
||||
<!--
|
||||
<scripts dir="${src.dir}" includes="**/*.js"/>
|
||||
<scripts dir="${tests.dir}" includes="**/*.js"/>
|
||||
-->
|
||||
<classpath>
|
||||
<fileset dir="${jsunit.dir}/java/lib">
|
||||
<include name="*.jar"/>
|
||||
</fileset>
|
||||
<!--
|
||||
<fileset dir="${jsunit.dir}/java/bin">
|
||||
<include name="jsunit.jar"/>
|
||||
</fileset>
|
||||
-->
|
||||
<dirset dir="/home/cbonar/src/jsunit/java/bin"/>
|
||||
<dirset dir="${jsunit.dir}/java/config"/>
|
||||
</classpath>
|
||||
<formatter type="xml"/>
|
||||
</jsunit>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- Generates developer documentation using (old) jsdoc. -->
|
||||
<target name="jsdoc" depends="validate">
|
||||
<!-- Generates a report of dependencies -->
|
||||
<ivy:report todir="${doc.dir}"/>
|
||||
<!-- Generates the API doc -->
|
||||
<exec command="${jsdoc}" failonerror="true">
|
||||
<arg value="-d"/> <arg value="${doc.dir}"/>
|
||||
<arg value="--no-lexical-privates"/>
|
||||
<arg value="--package-naming"/>
|
||||
<arg value="--nested-file-naming"/>
|
||||
<arg line="--project-name Crypto.SHA1"/>
|
||||
<arg value="${src.dir}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
Loading…
Reference in a new issue