]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Updated for optional PDF encryption support (depending on availability of JCE)
authorJeremias Maerki <jeremias@apache.org>
Thu, 13 Mar 2003 16:47:20 +0000 (16:47 +0000)
committerJeremias Maerki <jeremias@apache.org>
Thu, 13 Mar 2003 16:47:20 +0000 (16:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196090 13f79535-47bb-0310-9956-ffa450edef68

build.xml

index e544b7f5d39da585eb4fa5cff60d97e8e4b41874..2160c3a10407f5f8decf2d344c86008eaf8a4b8d 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -114,11 +114,16 @@ list of possible build targets.
     <exclude name="org/apache/fop/image/JAIImage.java"/>
   </patternset>
 
+  <patternset id="exclude-jce-dependencies">
+    <exclude name="org/apache/fop/pdf/PDFEncryptionJCE.java"/>
+  </patternset>
+
   <patternset id="base-sources">
     <include name="**/*.java"/>
     <exclude name="**/*${ignore_this}"/>
     <patternset refid="exclude-jimi"/>
     <patternset refid="exclude-jai"/>
+    <patternset refid="exclude-jce-dependencies"/>
   </patternset>
 
   <!-- =================================================================== -->
@@ -228,6 +233,7 @@ list of possible build targets.
   <target name="init-avail">
     <available property="jimi.present" classname="com.sun.jimi.core.Jimi" classpathref="libs-build-classpath"/>
     <available property="jai.present" classname="javax.media.jai.JAI" classpathref="libs-build-classpath"/>
+    <available property="jce.present" classname="javax.crypto.Cipher" classpathref="libs-build-classpath"/>
     <available property="jdk14.present" classname="java.lang.CharSequence"/>
   </target>
 
@@ -417,7 +423,17 @@ list of possible build targets.
       <include name="**/${jai}"/>
     </javac>
   </target>
-  <target name="compile" depends="compile-src,compile-jimi,compile-jai" description="Compiles the source code"/>
+
+  <target name="compile-jce" depends="compile-src" if="jce.present">
+    <echo message="JCE is present. Fop installs JCE-dependent classes (for PDF encryption)."/>
+    <javac destdir="${build.dest}" debug="${debug}" deprecation="${deprecation}" optimize="${optimize}">
+      <src path="${src.java}"/>
+      <classpath refid="libs-build-classpath"/>
+      <include name="**/pdf/PDFEncryptionJCE.java"/>
+    </javac>
+  </target>
+
+  <target name="compile" depends="compile-src,compile-jimi,compile-jai,compile-jce" description="Compiles the source code"/>
 
   <!-- =================================================================== -->
   <!-- compiles hyphenation patterns                                       -->