1. tbrugz
  2. pdfsplice

Commits

tbrugz  committed 96dc13b

added ivy dependency manager

  • Participants
  • Parent commits be6e917
  • Branches default

Comments (0)

Files changed (5)

File .classpath

View file
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="src_test"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="lib" path="lib/bcprov-jdk15-146.jar"/>
-	<classpathentry kind="lib" path="lib/itextpdf-5.1.3.jar"/>
-	<classpathentry kind="lib" path="lib/desenv/bcmail-jdk15-146.jar"/>
-	<classpathentry kind="lib" path="lib/desenv/bctsp-jdk15-146.jar"/>
-	<classpathentry kind="lib" path="lib/desenv/joda-time-2.1.jar"/>
-	<classpathentry kind="lib" path="lib/desenv/junit-4.1.jar"/>
+	<classpathentry kind="lib" path="lib/default/bcprov-jdk15-1.46.jar"/>
+	<classpathentry kind="lib" path="lib/default/itextpdf-5.1.3.jar"/>
+	<classpathentry kind="lib" path="lib/test/joda-time-2.0.jar"/>
+	<classpathentry kind="lib" path="lib/test/junit-4.1.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

File .hgignore

View file
 dist/*
 test-data/output-data/*
 test-data/cert/*
+lib/*
+z_old/*

File README.markdown

View file
 ========================
 1. Make sure you have JRE (Java Runtime) 5 or newer
 2. Download [pdfsplice.allinone.jar](http://sourceforge.net/projects/pdfsplice/files/pdfsplice%200.3.1/pdfsplice.allinone.jar/download)
-3. Double click on `pdfsplice.allinone.jar` _or_ run in the command line: `java -jar pdfsplice.jar`
+3. Double click on `pdfsplice.allinone.jar` _or_ run in the command line: `java -jar pdfsplice.allinone.jar`
 
 
 Running (extended version)

File build.xml

View file
 <?xml version="1.0"?>
-
-<project name="pdf-splice" default="compile" basedir=".">
+<project name="pdf-splice" default="compile" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
 	<description>
 		PDF Splice project. see: http://pdfsplice.sf.net/
 	</description>
 	<property name="src.test.dir"         value="${root.dir}/src_test"/>
 	<property name="compile.dir"          value="${root.dir}/bin"/> 
 	<property name="lib.dir"              value="${root.dir}/lib"/>
-	<property name="lib.build.dir"        value="${root.dir}/lib/desenv/"/>
 	<property name="dist.dir"             value="${root.dir}/dist"/>
 	<property name="test.pdfout.dir"      value="${root.dir}/test-data/output-data"/>
 	<property name="test.cert.dir"        value="${root.dir}/test-data/cert"/>
 	
 	<property name="manifest.version"     value="1.0"/>
 	<property name="manifest.mainclass"   value="net.sf.pdfsplice.PDFSplice"/>
-	<property name="manifest.classpath"   value="itextpdf-5.1.3.jar bcprov-jdk15-146.jar"/>
+	<property name="manifest.classpath"   value="itextpdf-5.1.3.jar bcprov-jdk15-146.jar bcprov-jdk15-1.46.jar"/>
 
 	<loadproperties srcfile="${src.dir}/pdfsplice.properties"/>
 	<loadproperties srcfile="build.properties"/>
 	
 	<path id="run.classpath">
 		<pathelement location="${compile.dir}"/>
-		<fileset dir="${lib.dir}">
+		<fileset dir="${lib.dir}/default">
 			<include name="*.jar"/>
 		</fileset>
 	</path>
 
 	<path id="compile.classpath">
 		<path refid="run.classpath"/>
-		<fileset dir="${lib.build.dir}">
+		<fileset dir="${lib.dir}/test">
 			<include name="*.jar"/>
 		</fileset>
 	</path>
 
 	<path id="test.classpath">
 		<path refid="run.classpath"/>
-		<fileset dir="${lib.build.dir}">
+		<fileset dir="${lib.dir}/test">
 			<include name="*.jar"/>
 		</fileset>
 	</path>
 		<delete dir="${test.cert.dir}"/>
 	</target>
 
+	<target name="resolve-ivy" description="retrieve dependencies with ivy" depends="prepare">
+		<!--ivy:retrieve /-->
+		<ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[artifact]-[revision](-[classifier]).[ext]"/>
+		<!--ivy:report todir="${dist.dir}" /-->
+		
+		<echo message="ivy.lib.dir: ${ivy.lib.dir}" />
+		<echo message="ivy.retrieve.pattern: ${ivy.retrieve.pattern}" />
+	</target>	
+
 	<target name="compile" 
 			depends="prepare"
 			description="Compiles Java files">
 				<attribute name="Main-Class" value="${manifest.mainclass}"/>
 			</manifest>
 			<fileset refid="jar.classes"/>
-			<zipfileset src="${lib.dir}/itextpdf-5.1.3.jar" includes="**/*.class, *.properties"/>
-			<zipfileset src="${lib.dir}/bcprov-jdk15-146.jar" includes="**/*.class, *.properties"/>
+			<zipfileset src="${lib.dir}/default/itextpdf-5.1.3.jar" includes="**/*.class, *.properties"/>
+			<zipfileset src="${lib.dir}/default/bcprov-jdk15-1.46.jar" includes="**/*.class, *.properties"/>
 		</jar>
 	</target>
 	
 		</junit>
 	</target>
 	
-    <target name="dist"
-            depends="jar, jar.all-in-one">
-    	<copy todir="${dist.dir}">
-    		<fileset dir="${lib.dir}" includes="*.jar"/>
-    	</copy>
-    </target>
+	<target name="dist"
+			depends="jar, jar.all-in-one">
+		<copy todir="${dist.dir}">
+			<fileset dir="${lib.dir}/default" includes="*.jar"/>
+		</copy>
+	</target>
 	
-	<target name="all" depends="version, test, dist">
+	<target name="all" depends="version, resolve-ivy, test, dist">
 	</target>
 
 	<target name="version"

File ivy.xml

View file
+<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
+	<!-- see: http://mvnrepository.com/ -->
+	<info organisation="org.bitbucket.tbrugz" module="pdfsplice"/>
+	<configurations>
+		<conf name="default"/>
+		<conf name="test" visibility="private"/>
+	</configurations>	
+	<dependencies>
+		<dependency org="com.itextpdf" name="itextpdf" rev="5.1.3" conf="default"/>
+		<!-- dependency org="bouncycastle" name="bcprov-jdk15" rev="140"/ -->
+		<dependency org="org.bouncycastle" name="bcprov-jdk15" rev="1.46" conf="default"/>
+		
+		<!-- dependency org="org.bouncycastle" name="bcmail-jdk15" rev="1.46" conf="test->default"/>
+		<dependency org="org.bouncycastle" name="bctsp-jdk15" rev="1.46" conf="test->default"/-->
+		<dependency org="joda-time" name="joda-time" rev="2.0" conf="test->default"/>
+		<dependency org="junit" name="junit" rev="4.1" conf="test->default"/>
+	</dependencies>
+</ivy-module>