+ more ignored local files

+ full ivy tooling
+ working ivy local publishing
This commit is contained in:
cbonar 2012-01-26 19:56:53 +01:00
parent ca46f266bb
commit ddc0c4464a
5 changed files with 84 additions and 63 deletions

View file

@ -1,3 +1,7 @@
syntax: glob
ciform/trunk/crypto/rsa/local.properties
codecs/rsa/local.properties
codecs/rsa/target
codecs/rsa/.project
tools/yuicompressor-*.jar
tools/ivy-*.jar

View file

@ -33,18 +33,20 @@ 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
# name of the ivy configurations
target.conf.min=min
########################################
#
# External programs
# 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
@ -53,13 +55,15 @@ jsunit.testRunner=${jsunit.dir}/testRunner.html
#jsunit.browsers=/usr/bin/firefox,/usr/bin/konqueror
# Ivy settings
# (required) -> set to Ivy libraries directory (contains all required *.jar)
#ivy.lib.dir=/opt/ivy
#ivy.file = ${basedir}/ivy.xml
#repository.dir=${target}/ivy
# (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=/opt/yuicompressor/yuicompressor.jar
#yuicompressor.jar=${tools.dir}/yuicompressor-2.4.7.jar
# (required) -> define this property in your "local.properties" file
# Command line to execute JSDoc (http://jsdoc.sourceforge.net)
#jsdoc=/opt/JSDoc/jsdoc.pl
#jsdoc=${tools.dir}/JSDoc/jsdoc.pl

View file

@ -15,45 +15,62 @@
<property file="build.properties"/>
<!-- ==================== -->
<!-- Third party tasks -->
<!-- ==================== -->
<path id="ivy.lib.path">
<fileset file="${ant.ivytask.path}" />
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
<!-- ==================== -->
<!-- Main targets : they are greatly inspired from the Maven build lifecycle -->
<!-- ==================== -->
<target name="validate" description="Validates the project is correct and all necessary information is available.">
<!-- Retreives dependencies with ivy -->
<ivy:retrieve/>
<!-- Creates necessary directories -->
<!-- Retrieves dependencies with ivy : required to initialize the cache and to get informations about the module being built -->
<ivy:retrieve />
<!-- Creates required directories -->
<mkdir dir="${target.dir}" />
</target>
<target name="compile" depends="validate" description="Compiles the source code of the project.">
<!-- nothing to do -->
</target>
<target name="test" depends="compile" description="Tests the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed.">
<!-- nothing to do -->
</target>
<target name="package" depends="test, doc, build-default, build-min" description="Takes the compiled code and package it in its distributable format, such as a JAR.">
<!-- nothing more to do -->
</target>
<target name="test" depends="compile" description="Tests the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed.">
<!-- nothing more to do -->
</target>
<target name="package" depends="build-src, build-min, test, doc" description="Takes the compiled code and package it in its distributable format, such as a JAR.">
<!-- nothing more to do -->
</target>
<target name="integration-test" depends="package" description="Processes and deploys the package if necessary into an environment where integration tests can be run.">
<!-- nothing to do -->
<!-- nothing more to do -->
</target>
<target name="verify" depends="integration-test" description="Runs any checks to verify the package is valid and meets quality criteria.">
<!-- nothing to do -->
<!-- nothing more 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" />
<!-- 'local' resolver is a default one bundled with Ivy -->
<!-- 'artifactspattern' must match the name of the files this script builds -->
<ivy:publish resolver="local" srcivypattern="ivy.xml" artifactspattern="${lib.dir}/[artifact]-[revision].[ext]" overwrite="true" forcedeliver="true" />
<!--<echo message="Published to default local Ivy repository." />-->
</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 -->
<!-- nothing more to do -->
</target>
<target name="clean" description="Cleans this project.">
<delete includeemptydirs="true" dir="${target.dir}"/>
</target>
<!-- ==================== -->
<!-- Some more specific targets -->
@ -61,31 +78,30 @@
<target name="doc" depends="validate" description="Generates developer documentation.">
<!-- Generates a report of dependencies -->
<ivy:report todir="${doc.dir}"/>
<ivy:report todir="${doc.dir}/ivy"/>
<!-- Generates the API doc -->
<exec command="${jsdoc}" failonerror="true">
<arg value="-d"/> <arg value="${doc.dir}"/>
<arg value="-d"/> <arg value="${doc.dir}/api"/>
<arg value="--no-lexical-privates"/>
<arg value="--package-naming"/>
<arg value="--nested-file-naming"/>
<arg line="--project-name Crypto.RSA"/>
<arg value="${src.dir}"/>
</exec>
<echo message="Done generating doc." />
</target>
<target name="build-default" depends="validate" description="Builds the default package.">
<target name="build-src" depends="validate" description="Builds the default .js.">
<copy file="${src.dir}/rsa.js" tofile="${lib.dir}/rsa-${ivy.revision}.js" />
<echo message="Copied : ${lib.dir}/rsa-${ivy.revision}.js" />
</target>
<target name="build-min" depends="validate" description="Builds the minified version of the package.">
<java jar="${yuicompressor.jar}" fork="true" output="${lib.dir}/rsa-${target.conf.min}-${ivy.revision}.js" failonerror="true">
<target name="build-min" depends="validate" description="Builds a minified version of the .js.">
<java jar="${yuicompressor.jar}" fork="true" output="${lib.dir}/rsa-min-${ivy.revision}.js" failonerror="true">
<arg line="--type js" />
<arg file="${src.dir}/rsa.js"/>
</java>
</target>
<target name="clean" description="Cleans this project.">
<delete includeemptydirs="true" dir="${target.dir}"/>
<echo message="Minified : ${lib.dir}/rsa-min-${ivy.revision}.js" />
</target>
</project>

View file

@ -1,26 +1,23 @@
<ivy-module version="2.0">
<info organisation="crypto" module="rsa" revision="1.0" status="integration">
<license name="Copyright 2000 by John M Hanna" url="http://sourceforge.net/projects/shop-js" />
<license name="GNU General Public License (GPL)" url="http://www.gnu.org/copyleft/gpl.html" />
<ivyauthor name="Nicolas BONARDELLE" url="http://nicobo.net/contact?subject=crypto+rsa+ivy" />
<repository name="nicobo.net" url="http://code.google.com/p/ciform/files" ivys="true" artifacts="true" />
<description homepage="http://code.google.com/p/ciform">
This library provides a Javascript implementation of the RSA cipher.
</description>
</info>
<configurations>
<conf name="src"/>
<conf name="min"/>
</configurations>
<publications>
<artifact name="rsa" type="javascript" ext="js">
<!-- The source script as plain text, including all inner informations and comments. -->
<conf name="src" />
<!-- An obfuscated, size-reduced version of the script. Use to speed up loading time in final environment. -->
<conf name="min" />
</artifact>
</publications>
<dependencies>
<!-- no dependency required -->
</dependencies>
</ivy-module>
<ivy-module version="2.0">
<info organisation="crypto" module="rsa" revision="1.0.0" status="integration" publication="20120126183301">
<license name="Copyright 2000 by John M Hanna" url="http://sourceforge.net/projects/shop-js"/>
<license name="GNU General Public License (GPL)" url="http://www.gnu.org/copyleft/gpl.html"/>
<ivyauthor name="Nicolas BONARDELLE" url="http://nicobo.net/contact?subject=crypto+rsa+ivy"/>
<description homepage="http://code.google.com/p/ciform">
This library provides a Javascript implementation of the RSA cipher.
</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>
<artifact name="rsa" type="js" conf="source"/>
<artifact name="rsa-min" type="js" conf="minified"/>
</publications>
<dependencies>
<!-- no dependency required -->
</dependencies>
</ivy-module>

Binary file not shown.