a.binder 9 yıl önce
ebeveyn
işleme
bb9904e870
1 değiştirilmiş dosya ile 13 ekleme ve 49 silme
  1. 13 49
      SE/dev/php-cli/build.xml

+ 13 - 49
SE/dev/php-cli/build.xml

@@ -561,11 +561,14 @@
         </exec>
     </target>
     
-    <target name="import_ssl_certificates_to_system_check" description="Sprawdzenie czy nie zostal juz prawidlowo dodany do danego systemu certyfikat">
-        <echo>Sprawdzam czy nie ma certyfikatu - czy jest plik ${API_address_cert.installed} </echo>
-        
+    <target name="import_ssl_certificates_to_system_check" description="Veryfing to be sure if we have already a certificate. Else we should add it ">
+        <!-- This is example by Arkadiusz Binder with Procesy5 system workaround example -->
+        <echo>We check if we have already this SSL certificate -  </echo>
+        <!--<property name="API_address" value="biuro.biall-net.pl"/>-->
         <exec command="keytool" output="${API_address_cert.installed}">
             <arg value="-list"/>
+            <arg value="-alias"/>
+            <arg value="${API_address}"/>
             <arg value="-keystore"/>
             <arg value="${cacert_dir}"/>
             <arg value="-storepass"/>
@@ -573,7 +576,6 @@
             <arg value="-noprompt"/>
         </exec>
         <loadfile property="API_address_cert.installed_contents" srcfile="${API_address_cert.installed}" />
-        
         <condition  property="API_address_cert.installed_exists_ok"  taskname="import_ssl_certificates_to_system"  else="NotInstalled"  >
             <!--<available file="${API_address_cert.installed}" filepath="."/>-->
             <contains string="${API_address_cert.installed_contents}" substring="${API_address}"/>
@@ -581,17 +583,12 @@
         <echo message="API_address_cert.installed_exists_ok ${API_address_cert.installed_exists_ok}  .  "/>
     </target>
     
-    <target name="import_ssl_certificates_to_system" depends="import_ssl_certificates_to_system_check"  unless="${API_address_cert.installed_exists_ok}" description="niezbedne jest sciagniecie certyfikatow bo nie dzialaja przy requestach WFS">
-        <echo>  bedzie wgrany certyfikat do ${java.home}/ ant home: ${ant.home}  dokl do ${cacert_dir}  </echo>
+    <target name="import_ssl_certificates_to_system" depends="import_ssl_certificates_to_system_check"  unless="${API_address_cert.installed_exists_ok}" description="It is good to be sure if we are correct keys to ">
+        <echo>  We will upload certificate to ${cacert_dir}/   </echo>
+        <!--<property name="cacert_dir" value="${java.home}/lib/security/cacerts"/>-->
         <delete file="${API_address_cert.txt}"/>
         <delete file="${API_address_cert.cert}"/>
         <delete file="${API_address_cert.installed}"/>
-        
-        <echo  message="${java.home}">   $java.home  </echo>
-        <echo  message="${sun.boot.library.path}"> $sun.boot.library.path</echo>
-        <echo  message="${java.library.path}"> $java.library.path</echo>
-        <echo message="${java.security.policy}">java.security.policy</echo>
-        
         <exec output="${API_address_cert.txt}"  executable="${gnutls-cli}" >
             <arg line=" --print-cert ${API_address} &lt; /dev/null "/>
         </exec>
@@ -601,54 +598,21 @@
         <exec executable="keytool">
             <arg line="-import -v -trustcacerts -alias ${API_address} -file ${API_address}.cert -keystore ${cacert_dir} -storepass ${Password_for_cacerts} -noprompt"/>
         </exec>
-        
         <echoproperties destfile="${API_address_cert.installed}">
             <propertyset><propertyref name="API_address"/></propertyset>
         </echoproperties>
-        <!--<touch file="${API_address_cert.installed}"/>-->
-        <!--<echoproperties destfile="build.settings.xml"/>-->
     </target>
     
-    <target name="get_PE_fixings_from_db"   description="sciagniecie zmian PE glownie usunietych aby wyliczyc ponownie kable do innych wezlow" depends="import_ssl_certificates_to_system">
-        <!--wget -\-http-user=$usr -\-password=$passwd  
-            https://biuro.biall-net.pl/SE/version-git/api.php/xml/table/default_db/_S_ADDRESS_STREETS_distincts/items -\-no-check-certificate -O _S_ADDRESS_STREETS_distincts.xml ;-->
+    <target name="get_PE_fixings_from_db"   description="Get data from API with XML - this example shows how easy is to use Procesy5 framework/system!" depends="import_ssl_certificates_to_system">
         <property name="WFS_VERSION" value="&amp;VERSION=1.0.0"/>
         <property name="TYPENAME" value="&amp;TYPENAME=p5_default_db:Rozdzielcza_test_bzyk_PE"/>  
-        <!--<property name="API_wfst_url2" value="https://onet.pl"/>-->
-        <!--<property name="OGC_Filter"> 
-            &amp;Filter=
-            &lt;ogc:Filter&gt;
-            &lt;ogc:Or&gt;
-            &lt;ogc:Not&gt;
-            &lt;ogc:PropertyIsNull&gt;
-            &lt;ogc:PropertyName&gt;the_geom&lt;/ogc:PropertyName&gt;
-            &lt;/ogc:PropertyIsNull&gt;
-            &lt;/ogc:Not&gt;
-            &lt;ogc:PropertyIsEqualTo&gt;
-            &lt;ogc:PropertyName&gt;ID&lt;/ogc:PropertyName&gt;
-            &lt;ogc:Literal&gt;2&lt;/ogc:Literal&gt;
-            &lt;/ogc:PropertyIsEqualTo&gt;
-            &lt;/ogc:Or&gt;
-            &lt;/ogc:Filter&gt;</property>-->
-        <property name="OGC_Filter" value=""/>
-            
+        <delete file="${PE_fixings.xml}"></delete>
+        <property name="OGC_Filter">%26lt;ogc:Filter%26gt;%26lt;ogc:And%26gt;%26lt;ogc:PropertyIsNull%26gt;%26lt;ogc:PropertyName%26gt;the_geom%26lt;/ogc:PropertyName%26gt;%26lt;/ogc:PropertyIsNull%26gt;%26lt;/ogc:And%26gt;%26lt;/ogc:Filter%26gt;</property>
         <property name="URL_get_PE_fixings_from_db" value="${API_wfst_url}?SERVICE=WFS${WFS_VERSION}&amp;${TYPENAME}&amp;REQUEST=GetFeature&amp;SRSNAME=EPSG:3003${OGC_Filter}"/>
-        <!--<echo output="OGC_Filter">
-           
-        </echo>-->
-        
         <echo message="we get data from URL: ${URL_get_PE_fixings_from_db}"></echo>
-        
-        <echoproperties destfile="${API_address_cert.installed}">
-            <propertyset><propertyref name="URL_get_PE_fixings_from_db"/></propertyset>
-        </echoproperties>
-        
-        <get dest="${PE_fixings.xml}"  username="${username_p5_admin}" password="${username_p5_admin_pass}">
+        <get dest="${PE_fixings.xml}"  username="${username}" password="${pass}" verbose="true" >
             <url  url="${URL_get_PE_fixings_from_db}"/>
         </get>
-        
-        
-        
     </target>
    
     <!--<target name="1_install_mysql_functions">