javacommons/security/build/build.xml
branchRCL_3
changeset 60 6c158198356e
parent 19 04becd199f91
child 83 26b2b12093af
equal deleted inserted replaced
59:e5618cc85d74 60:6c158198356e
     1 <!--
     1 <!--
     2     Copyright (c) 2008 Nokia.  All rights reserved.
     2     Copyright (c) 2008-2010 Nokia.  All rights reserved.
     3 
     3 
     4     This material, including documentation and any related computer programs,
     4     This material, including documentation and any related computer programs,
     5     is protected by copyright controlled by Nokia. All rights are reserved.
     5     is protected by copyright controlled by Nokia. All rights are reserved.
     6     Copying, including reproducing, storing, adapting or translating,
     6     Copying, including reproducing, storing, adapting or translating,
     7     any or all of this material requires the prior written consent of Nokia.
     7     any or all of this material requires the prior written consent of Nokia.
     8     This material also contains confidential information, which may not be
     8     This material also contains confidential information, which may not be
     9     disclosed to others without the prior written consent of Nokia.
     9     disclosed to others without the prior written consent of Nokia.
    10 -->
    10 -->
    11 
    11 
    12 <project name="javasecurity" default="deploy.generate.policies.and.certs" basedir=".">
    12 <project name="javasecurity" default="deploy.generate.policies" basedir=".">
    13   <description>
    13   <description>
    14         Builds OMJ security, generates the policy files in their internal format and copies the certificates and the metadata into right locations
    14         Builds OMJ security and generates the policy files in their internal format
    15   </description>
    15   </description>
    16 
    16 
    17   <import file="../../../build/utilities.xml"/>
    17   <import file="../../../build/utilities.xml"/>
    18 
    18 
    19   <property name="javah.classnames" 
    19   <property name="javah.classnames" 
    30   <property name="external.policy.editor.tool.bin" location="${java.src.root}/javatools/javasecuritycustomization/policyeditor/bin/securitypolicyeditor.jar"/>
    30   <property name="external.policy.editor.tool.bin" location="${java.src.root}/javatools/javasecuritycustomization/policyeditor/bin/securitypolicyeditor.jar"/>
    31 
    31 
    32   <target name="init" depends="init.properties">
    32   <target name="init" depends="init.properties">
    33     <property name="internal.policies.dir" location="${java.res.root}/security/policies"/>
    33     <property name="internal.policies.dir" location="${java.res.root}/security/policies"/>
    34     <mkdir dir="${internal.policies.dir}"/>
    34     <mkdir dir="${internal.policies.dir}"/>
    35     <property name="security_res_dir" location="${java.captain.datacage}/security/trustroots/device/certificates"/>
       
    36   </target>
    35   </target>
    37   
    36   
    38   <target name="deliver.classes.to.external.tool">
    37   <target name="deliver.classes.to.external.tool">
    39     <jar jarfile="${external.policy.editor.tool.lib}" update="true">
    38     <jar jarfile="${external.policy.editor.tool.lib}" update="true">
    40         <fileset dir="${compile.result.root}/javasecurity/classes/collection" 
    39         <fileset dir="${compile.result.root}/javasecurity/classes/collection" 
    46                       com/nokia/mj/impl/security/midp/common/PermissionMappingTable.class,
    45                       com/nokia/mj/impl/security/midp/common/PermissionMappingTable.class,
    47                       com/nokia/mj/impl/security/midp/common/UserSecuritySettings.class"/>
    46                       com/nokia/mj/impl/security/midp/common/UserSecuritySettings.class"/>
    48     </jar>
    47     </jar>
    49   </target>
    48   </target>
    50   
    49   
    51   <target name="deploy.generate.policies.and.certs" depends="init, deploy.dual, deliver.classes.to.external.tool, set.linux.certs">
    50   <target name="deploy.generate.policies" depends="init, deploy.dual, deliver.classes.to.external.tool">
    52     <java classname="com.nokia.mj.tools.security.midp.PolicyEditor"
    51     <java classname="com.nokia.mj.tools.security.midp.PolicyEditor"
    53          failonerror="true">
    52          failonerror="true">
    54          <sysproperty key="emma.properties" value="${emma.properties}"/>
    53          <sysproperty key="emma.properties" value="${emma.properties}"/>
    55          <arg value="${external.policies.dir}"/>
    54          <arg value="${external.policies.dir}"/>
    56          <arg value="${internal.policies.dir}"/>
    55          <arg value="${internal.policies.dir}"/>
    60            <pathelement path="${emma.dir}/emma.jar"/>
    59            <pathelement path="${emma.dir}/emma.jar"/>
    61          </classpath>
    60          </classpath>
    62     </java>
    61     </java>
    63   </target>
    62   </target>
    64 
    63 
    65   <target name="set.linux.certs" if="target.linux">
       
    66     <copy todir="${security_res_dir}/">
       
    67         <fileset dir="../../../javatools/testcerts/" includes="*.der"/>
       
    68     </copy>
       
    69     <copy todir="${security_res_dir}/">
       
    70         <fileset dir="../../../javatools/testcerts/" includes="*.metadata"/>
       
    71     </copy>
       
    72   </target>
       
    73 
       
    74   <target name="clean" depends="init">
    64   <target name="clean" depends="init">
    75     <ant antfile="../../../build/utilities.xml" target="clean"/>  
    65     <ant antfile="../../../build/utilities.xml" target="clean"/>  
    76     <delete dir="${internal.policies.dir}"/>
    66     <delete dir="${internal.policies.dir}"/>
    77     <delete file="${external.policy.editor.tool.lib}"/>
    67     <delete file="${external.policy.editor.tool.lib}"/>
    78     <delete dir="${security_res_dir}"/>
       
    79   </target>
    68   </target>
    80   
    69   
    81   
    70   
    82   <target name="create.internal.api.jar">
    71   <target name="create.internal.api.jar">
    83     <omj.internal.apis includes="com/nokia/mj/impl/security/common/Certificate.class,
    72     <omj.internal.apis includes="com/nokia/mj/impl/security/common/Certificate.class,