You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ad...@apache.org on 2007/11/29 07:22:39 UTC
svn commit: r599293 - in /incubator/tuscany/cpp/das: README_ANT_INSTALL
antscripts/OpenPGP.jar antscripts/TuscanyMSVC8DevStudioCCompiler.jar
antscripts/compile-targets.xml antscripts/platform.properties
antscripts/system.xml build.xml
Author: adrianocrestani
Date: Wed Nov 28 22:22:37 2007
New Revision: 599293
URL: http://svn.apache.org/viewvc?rev=599293&view=rev
Log:
-adding signing file support for ant distribution system
-updated README_ANT_INSTALL file with instructions to use the distribution targets
Added:
incubator/tuscany/cpp/das/antscripts/OpenPGP.jar (with props)
Modified:
incubator/tuscany/cpp/das/README_ANT_INSTALL
incubator/tuscany/cpp/das/antscripts/TuscanyMSVC8DevStudioCCompiler.jar
incubator/tuscany/cpp/das/antscripts/compile-targets.xml
incubator/tuscany/cpp/das/antscripts/platform.properties
incubator/tuscany/cpp/das/antscripts/system.xml
incubator/tuscany/cpp/das/build.xml
Modified: incubator/tuscany/cpp/das/README_ANT_INSTALL
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/README_ANT_INSTALL?rev=599293&r1=599292&r2=599293&view=diff
==============================================================================
--- incubator/tuscany/cpp/das/README_ANT_INSTALL (original)
+++ incubator/tuscany/cpp/das/README_ANT_INSTALL Wed Nov 28 22:22:37 2007
@@ -175,7 +175,41 @@
Public targets are those that have descriptions and are usually the only ones needed for
compiling, installing and cleaning. For more avanced use, the private targets can be seen
+
by looking at the actual build.xml file.
+
+
+GENERATING A PROJECT DISTRIBUTION
+=================================
+
+To create a src and bin distribution of Tuscany DAS subproject, there must be set some properties on platform.properties files:
+
+Property Required Example Description
+-------- -------- ------- -----------
+
+platform.public.key.path Yes "E:/gnupg/trustdb.gpg" The public key ring file path
+
+platform.secret.key.path Yes "E:/gnupg/secring.gpg" The secret key ring file path
+
+platform.key.id Yes "148CAFB2" The key id used to sign the distribution files
+
+platform.tuscanyDAS.distribution.dir NO "C:\distribution\" The folder where the distribution files will be generated, default=tuscanyDAS.root.dir/distribution
+
+platform.tuscanyDAS.release.file.name NO "tuscany_das_native-1.0-incubator-M4-" The beginning of src and bin packed distribution file name, default="tuscany_cpp_das".
+ TUSCANY_DASCPP_RELEASE_NAME env var may be used as an alternative
+
+Also is required the bcpg-jdk<latest_version>-<latest_version>.jar and jce-jdk<latest_version>-<latest_version>.jar files defines on classpath.
+Both can be found at http://www.bouncycastle.org/latest_releases.html
+
+Use the "distribution" target to generate the src and bin distribution file structure under platform.tuscanyDAS.distribution.dir folder.
+Then use the "pack.distribution" target to pack the bin and src distribution folders as .zip and .tar.gz and generate their .asc and .md5 files.
+A password must be set on the command line when using pack.distribution target, this password is used to sign the packed distribution files with the secret key defined on platform.secret.key.path
+
+Usage:
+ant distribution
+// do whatever you want on the generated distribution files
+ant pack.distribution -Dpassword="123456"
+
CONFIGURATION
Added: incubator/tuscany/cpp/das/antscripts/OpenPGP.jar
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/antscripts/OpenPGP.jar?rev=599293&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/tuscany/cpp/das/antscripts/OpenPGP.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: incubator/tuscany/cpp/das/antscripts/TuscanyMSVC8DevStudioCCompiler.jar
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/antscripts/TuscanyMSVC8DevStudioCCompiler.jar?rev=599293&r1=599292&r2=599293&view=diff
==============================================================================
Binary files - no diff available.
Modified: incubator/tuscany/cpp/das/antscripts/compile-targets.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/antscripts/compile-targets.xml?rev=599293&r1=599292&r2=599293&view=diff
==============================================================================
--- incubator/tuscany/cpp/das/antscripts/compile-targets.xml (original)
+++ incubator/tuscany/cpp/das/antscripts/compile-targets.xml Wed Nov 28 22:22:37 2007
@@ -197,6 +197,10 @@
</sequential>
</macrodef>
+
+
+
+
<!--
Create a symlink on unix and mac only
@param lib - library file to install
Modified: incubator/tuscany/cpp/das/antscripts/platform.properties
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/antscripts/platform.properties?rev=599293&r1=599292&r2=599293&view=diff
==============================================================================
--- incubator/tuscany/cpp/das/antscripts/platform.properties (original)
+++ incubator/tuscany/cpp/das/antscripts/platform.properties Wed Nov 28 22:22:37 2007
@@ -27,6 +27,11 @@
platform.tuscanyDAS.root.dir=
platform.tuscanyDAS.install.dir=
platform.tuscanyDAS.release.file.name=
+platform.tuscanyDAS.distribution.dir=
+
+platform.public.key.path=
+platform.secret.key.path=
+platform.key.id=
platform.axis2c.home.dir=
platform.libxml2.lib.dir=
Modified: incubator/tuscany/cpp/das/antscripts/system.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/antscripts/system.xml?rev=599293&r1=599292&r2=599293&view=diff
==============================================================================
--- incubator/tuscany/cpp/das/antscripts/system.xml (original)
+++ incubator/tuscany/cpp/das/antscripts/system.xml Wed Nov 28 22:22:37 2007
@@ -26,6 +26,7 @@
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<taskdef resource="cpptasks.tasks"/>
<typedef resource="cpptasks.types"/>
+ <typedef name="signer" classname="org.apache.commons.openpgp.ant.OpenPgpSignerTask" classpath="${basedir}/antscripts/OpenPGP.jar"/>
<!--
Configure the tuscanyDAS.root.dir
@@ -99,20 +100,49 @@
<!--
Configure tuscanyDAS.release.file.name that defines the generated packed file used on releases
Take the override value from platform.properties if set
- Else use as default "tuscany_das_cpp" name
+ Else take it from env var TUSCANY_DASCPP_RELEASE_NAME
+ If both are not defined, use as default "tuscany_das_cpp" name
-->
- <if>
- <and>
- <isset property="platform.tuscanyDAS.release.file.name"/>
+ <if>
+ <and>
+ <isset property="platform.tuscanyDAS.release.file.name"/>
<length string="${platform.tuscanyDAS.release.file.name}" when="greater" length="0" trim="true"/>
</and>
<then>
<property name="tuscanyDAS.release.file.name" value="${platform.tuscanyDAS.release.file.name}"/>
</then>
- <else>
- <property name="tuscanyDAS.release.file.name" value="tuscany_das_cpp"/>
- </else>
- </if>
+ <elseif>
+ <and>
+ <isset property="env.TUSCANY_DASCPP_RELEASE_NAME"/>
+ <length string="${env.TUSCANY_DASCPP_RELEASE_NAME}" when="greater" length="0" trim="true"/>
+ </and>
+ <then>
+ <property name="tuscanyDAS.release.file.name" value="${env.TUSCANY_DASCPP_RELEASE_NAME}"/>
+ </then>
+ </elseif>
+ <else>
+ <property name="tuscanyDAS.release.file.name" value="tuscany_das_cpp"/>
+ </else>
+ </if>
+
+<!--
+ Configure distribution.dir that defines where the distribution files will be placed
+ Take the override value from platform.properties if set
+ Else assumes ${basedir}/distribution as the distribution folder
+ -->
+ <if>
+ <and>
+ <isset property="platform.tuscanyDAS.distribution.dir"/>
+ <length string="${platform.tuscanyDAS.distribution.dir}" when="greater" length="0" trim="true"/>
+ </and>
+ <then>
+ <property name="distribution.dir" location="${platform.tuscanyDAS.distribution.dir}"/>
+ </then>
+ <else>
+ <property name="distribution.dir" value="${basedir}/distribution"/>
+ </else>
+ </if>
+
@@ -162,6 +192,42 @@
</if>
</target>
+ <!--
+ Load key id, public and secret key path from platform.properties files into key.id, public.key.path and secret.key.path variables respectively
+ Also checks if the user defined the password on the command line
+ -->
+ <target name="check.keys">
+ <if>
+ <and>
+ <isset property="platform.public.key.path"/>
+ <isset property="platform.key.id"/>
+ <isset property="platform.secret.key.path"/>
+ <length string="${platform.public.key.path}" when="greater" length="0" trim="true"/>
+ <length string="${platform.key.id}" when="greater" length="0" trim="true"/>
+ <length string="${platform.secret.key.path}" when="greater" length="0" trim="true"/>
+ </and>
+ <then>
+ <property name="public.key.path" location="${platform.public.key.path}"/>
+ <property name="secret.key.path" location="${platform.secret.key.path}"/>
+ <property name="key.id" value="${platform.key.id}"/>
+ </then>
+ <else>
+ <fail message="The public, secret and key id must be defined on platform.properties file"/>
+ </else>
+ </if>
+ <if>
+ <and>
+ <isset property="password"/>
+ <length string="${password}" when="greater" length="0" trim="true"/> </and>
+ <then>
+ <property name="secret.key.password" value="${password}"/>
+ </then>
+ <else>
+ <fail message='Secret key password was not properly set. Add on the ant command line, for example, -Dpassword="123"'/>
+ </else>
+ </if>
+ </target>
+
<!--
Configure the debug.compile flag
Try looking first on the command line
@@ -416,6 +482,7 @@
<compiler id="msvc8-Compiler"
extends="Tuscany-BaseCompiler"
classname="tuscany.antCompilers.das.TuscanyMSVC8DevStudioCCompiler">
+
<defineset define="WIN32,_CRT_SECURE_NO_DEPRECATE,_CRT_NON_CONFORMING_SWPRINTFS"/>
</compiler>
Modified: incubator/tuscany/cpp/das/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/das/build.xml?rev=599293&r1=599292&r2=599293&view=diff
==============================================================================
--- incubator/tuscany/cpp/das/build.xml (original)
+++ incubator/tuscany/cpp/das/build.xml Wed Nov 28 22:22:37 2007
@@ -20,10 +20,6 @@
<project name="TuscanyDASNative" default="all" basedir=".">
<property name="test.dir" location="runtime/test"/>
-<property name="distribution.dir" location="distribution"/>
-<property name="pack.dir" location="${distribution.dir}"/>
-<property name="distribution.bin.dir" location="${distribution.dir}/bin"/>
-<property name="distribution.src.dir" location="${distribution.dir}/src"/>
<property name="samples.dir" location="samples"/>
<property name="tools.dir" location="tools"/>
@@ -36,6 +32,9 @@
<import file="antscripts/system.xml"/>
+ <property name="distribution.bin.dir" location="${distribution.dir}/bin"/>
+ <property name="distribution.src.dir" location="${distribution.dir}/src"/>
+ <property name="pack.dir" location="${distribution.dir}"/>
<property name="runtime.das.dir" value="runtime/core"/>
<!--
@@ -51,7 +50,7 @@
<antcall target="build.das"/>
</target>
- <target name="pack.distribution" description="Build all TuscanyDASNative source code and documentation">
+ <target name="pack.distribution" description="Build all TuscanyDASNative source code and documentation" depends="check.keys">
<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}bin.zip"/>
<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}src.zip"/>
<delete quiet="true" file="${pack.dir}/${tuscanyDAS.release.file.name}bin.tar.gz"/>
@@ -100,14 +99,15 @@
<delete quiet="true" dir="${pack.dir}/${tuscanyDAS.release.file.name}src"/>
<!--Generate the checksum files-->
- <checksum file="${pack.dir}/${tuscanyDAS.release.file.name}bin.zip" fileext=".md5"/>
- <checksum file="${pack.dir}/${tuscanyDAS.release.file.name}src.zip" fileext=".md5"/>
- <checksum file="${pack.dir}/${tuscanyDAS.release.file.name}bin.tar.gz" fileext=".md5"/>
- <checksum file="${pack.dir}/${tuscanyDAS.release.file.name}src.tar.gz" fileext=".md5"/>
- <checksum file="${pack.dir}/${tuscanyDAS.release.file.name}bin.zip" algorithm="SHA" fileext=".asc"/>
- <checksum file="${pack.dir}/${tuscanyDAS.release.file.name}src.zip" algorithm="SHA" fileext=".asc"/>
- <checksum file="${pack.dir}/${tuscanyDAS.release.file.name}bin.tar.gz" algorithm="SHA" fileext=".asc"/>
- <checksum file="${pack.dir}/${tuscanyDAS.release.file.name}src.tar.gz" algorithm="SHA" fileext=".asc"/>
+ <checksum forceOverwrite="yes" file="${pack.dir}/${tuscanyDAS.release.file.name}bin.zip" fileext=".md5"/>
+ <checksum forceOverwrite="yes" file="${pack.dir}/${tuscanyDAS.release.file.name}src.zip" fileext=".md5"/>
+ <checksum forceOverwrite="yes" file="${pack.dir}/${tuscanyDAS.release.file.name}bin.tar.gz" fileext=".md5"/>
+ <checksum forceOverwrite="yes" file="${pack.dir}/${tuscanyDAS.release.file.name}src.tar.gz" fileext=".md5"/>
+
+ <signer asciiarmor="true" artefact="${pack.dir}/${tuscanyDAS.release.file.name}bin.zip" secring="${secret.key.path}" pubring="${public.key.path}" password="${secret.key.password}" keyid="${key.id}"/>
+ <signer asciiarmor="true" artefact="${pack.dir}/${tuscanyDAS.release.file.name}src.zip" secring="${secret.key.path}" pubring="${public.key.path}" password="${secret.key.password}" keyid="${key.id}"/>
+ <signer asciiarmor="true" artefact="${pack.dir}/${tuscanyDAS.release.file.name}bin.tar.gz" secring="${secret.key.path}" pubring="${public.key.path}" password="${secret.key.password}" keyid="${key.id}"/>
+ <signer asciiarmor="true" artefact="${pack.dir}/${tuscanyDAS.release.file.name}src.tar.gz" secring="${secret.key.path}" pubring="${public.key.path}" password="${secret.key.password}" keyid="${key.id}"/>
</target>
@@ -220,6 +220,10 @@
<target name="clean.samples">
<ant target="clean" antfile="${samples.dir}/build.xml" inheritAll="false"/>
+ </target>
+
+ <target name="clean.distribution">
+ <delete dir="${distribution.dir}/" quiet="true"/>
</target>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org