javacommons/security/build/build.xml
branchRCL_3
changeset 83 26b2b12093af
parent 60 6c158198356e
equal deleted inserted replaced
77:7cee158cb8cd 83:26b2b12093af
     1 <!--
     1 <!--
     2     Copyright (c) 2008-2010 Nokia.  All rights reserved.
     2     Copyright (c) 2008 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" basedir=".">
    12 <project name="javasecurity" default="deploy.generate.policies.and.certs" basedir=".">
    13   <description>
    13   <description>
    14         Builds OMJ security and generates the policy files in their internal format
    14         Builds OMJ security, generates the policy files in their internal format and copies the certificates and the metadata into right locations
    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"/>
    35   </target>
    36   </target>
    36   
    37   
    37   <target name="deliver.classes.to.external.tool">
    38   <target name="deliver.classes.to.external.tool">
    38     <jar jarfile="${external.policy.editor.tool.lib}" update="true">
    39     <jar jarfile="${external.policy.editor.tool.lib}" update="true">
    39         <fileset dir="${compile.result.root}/javasecurity/classes/collection" 
    40         <fileset dir="${compile.result.root}/javasecurity/classes/collection" 
    45                       com/nokia/mj/impl/security/midp/common/PermissionMappingTable.class,
    46                       com/nokia/mj/impl/security/midp/common/PermissionMappingTable.class,
    46                       com/nokia/mj/impl/security/midp/common/UserSecuritySettings.class"/>
    47                       com/nokia/mj/impl/security/midp/common/UserSecuritySettings.class"/>
    47     </jar>
    48     </jar>
    48   </target>
    49   </target>
    49   
    50   
    50   <target name="deploy.generate.policies" depends="init, deploy.dual, deliver.classes.to.external.tool">
    51   <target name="deploy.generate.policies.and.certs" depends="init, deploy.dual, deliver.classes.to.external.tool, set.linux.certs">
    51     <java classname="com.nokia.mj.tools.security.midp.PolicyEditor"
    52     <java classname="com.nokia.mj.tools.security.midp.PolicyEditor"
    52          failonerror="true">
    53          failonerror="true">
    53          <sysproperty key="emma.properties" value="${emma.properties}"/>
    54          <sysproperty key="emma.properties" value="${emma.properties}"/>
    54          <arg value="${external.policies.dir}"/>
    55          <arg value="${external.policies.dir}"/>
    55          <arg value="${internal.policies.dir}"/>
    56          <arg value="${internal.policies.dir}"/>
    59            <pathelement path="${emma.dir}/emma.jar"/>
    60            <pathelement path="${emma.dir}/emma.jar"/>
    60          </classpath>
    61          </classpath>
    61     </java>
    62     </java>
    62   </target>
    63   </target>
    63 
    64 
       
    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 
    64   <target name="clean" depends="init">
    74   <target name="clean" depends="init">
    65     <ant antfile="../../../build/utilities.xml" target="clean"/>  
    75     <ant antfile="../../../build/utilities.xml" target="clean"/>  
    66     <delete dir="${internal.policies.dir}"/>
    76     <delete dir="${internal.policies.dir}"/>
    67     <delete file="${external.policy.editor.tool.lib}"/>
    77     <delete file="${external.policy.editor.tool.lib}"/>
       
    78     <delete dir="${security_res_dir}"/>
    68   </target>
    79   </target>
    69   
    80   
    70   
    81   
    71   <target name="create.internal.api.jar">
    82   <target name="create.internal.api.jar">
    72     <omj.internal.apis includes="com/nokia/mj/impl/security/common/Certificate.class,
    83     <omj.internal.apis includes="com/nokia/mj/impl/security/common/Certificate.class,