mirror of
				https://github.com/MinimalBible/MinimalBible-Legacy
				synced 2025-10-30 17:00:34 -04:00 
			
		
		
		
	Get the JarJar system running to build a shaded Jar
Unfortunately means I can't just copy the ivy.xml from jSword. But I do have excludes="" that I didn't with maven previously.
This commit is contained in:
		
							
								
								
									
										1
									
								
								jsword-minimalbible/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								jsword-minimalbible/.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -4,4 +4,3 @@ | ||||
| /ivy | ||||
| /libs | ||||
| /tools | ||||
| /ivy.xml | ||||
|  | ||||
| @ -26,7 +26,6 @@ | ||||
| 		<delete dir="${build.src}" /> | ||||
| 		<delete dir="${build.class}" /> | ||||
| 		<delete dir="${distribution}" /> | ||||
| 		<!-- Forces us to redownload dependencies, but I'm OK with that --> | ||||
| 		<delete dir="${jsword-dependencydir}" /> | ||||
| 	</target> | ||||
|  | ||||
| @ -36,9 +35,6 @@ | ||||
| 		<mkdir dir="${build.class}" /> | ||||
| 		<mkdir dir="${distribution}" /> | ||||
| 		<mkdir dir="${jsword-dependencydir}" /> | ||||
| 		<copy todir="${jsword-tweaks.home}"> | ||||
| 		    <fileset file="${jsword.project}/ivy.xml" /> | ||||
| 		</copy> | ||||
| 	</target> | ||||
|  | ||||
| 	<target name="mergeCode" depends="init"> | ||||
| @ -82,14 +78,21 @@ | ||||
| 	</target> | ||||
|  | ||||
| 	<target name="jar" depends="compile"> | ||||
| 		<jar jarfile="${distribution}/jsword.jar"> | ||||
| 		<!-- And use JarJar to shade the HttpClient --> | ||||
| 		<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" | ||||
| 			classpath="${jsword-dependencydir}/jarjar-1.3.jar" /> | ||||
| 		<jarjar jarfile="${distribution}/jsword.jar"> | ||||
| 			<fileset dir="${build.class}" /> | ||||
| 			<!-- need to include the .properties and .plugin files --> | ||||
| 			<fileset dir="${build.src}"> | ||||
| 				<exclude name="**/*.java" /> | ||||
| 				<exclude name="**/*.html" /> | ||||
| 			</fileset> | ||||
| 		</jar> | ||||
| 			<zipgroupfileset dir="${jsword-dependencydir}" includes="*.jar" excludes="junit-*.jar, hamcrest-*.jar, jarjar-*.jar" /> | ||||
| 			<rule pattern="org.apache.http.**" result="org.apache.shaded.http.@1" /> | ||||
| 		</jarjar> | ||||
| 		 | ||||
| 		<!-- We can use regular jar to build the src --> | ||||
| 		<jar jarfile="${distribution}/jsword-src.jar" basedir="${build.src}" /> | ||||
| 	</target> | ||||
|  | ||||
| @ -97,7 +100,7 @@ | ||||
| 		description="Copy generated jars to And Bible for use"> | ||||
| 		<copy todir="${MinimalBible}/libs"> | ||||
| 			<fileset dir="${distribution}" includes="*.jar" excludes="*-src.jar" /> | ||||
| 			<fileset dir="${jsword-dependencydir}" includes="*.jar" /> | ||||
| 			<!-- We only need to include jsword.jar, the jarjar already included dependencies. --> | ||||
| 		</copy> | ||||
| 		<copy todir="${MinimalBible}/libs-src"> | ||||
| 			<fileset dir="${distribution}" includes="*-src.jar" /> | ||||
|  | ||||
							
								
								
									
										30
									
								
								jsword-minimalbible/ivy.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								jsword-minimalbible/ivy.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,30 @@ | ||||
| <ivy-module version="2.0"> | ||||
|   <info organisation="org.crosswire" module="jsword"/> | ||||
|   <dependencies> | ||||
|     <dependency org="commons-codec"             name="commons-codec"    rev="1.9"       conf="default->master,sources" /> | ||||
|     <dependency org="commons-net"               name="commons-net"      rev="3.3"       conf="default->master,sources" /> | ||||
|     <dependency org="org.apache.commons"        name="commons-compress" rev="1.7"       conf="default->master,sources" /> | ||||
|     <dependency org="org.tukaani"               name="xz"               rev="1.4"       conf="default->master,sources" /> | ||||
|     <dependency org="org.apache.httpcomponents" name="httpcore"         rev="4.3.2"     conf="default->master,sources" /> | ||||
|     <dependency org="org.apache.httpcomponents" name="httpclient"       rev="4.3.2"     conf="default->master,sources" /> | ||||
|     <dependency org="org.jdom"                  name="jdom2"            rev="2.0.5"     conf="default->master,sources" /> | ||||
|     <dependency org="org.apache.lucene"         name="lucene-core"      rev="3.0.3"     conf="default->master,sources" /> | ||||
|     <dependency org="org.apache.lucene"         name="lucene-analyzers" rev="3.0.3"     conf="default->master,sources" /> | ||||
|     <dependency org="org.apache.lucene"         name="lucene-smartcn"   rev="3.0.3"     conf="default->master,sources" /> | ||||
|     <dependency org="org.apache.lucene"         name="lucene-snowball"  rev="3.0.3"     conf="default->master,sources" /> | ||||
|     <dependency org="junit"                     name="junit"            rev="4.11"      conf="default->master,sources" /> | ||||
|     <dependency org="org.hamcrest"              name="hamcrest-library" rev="1.3"/> | ||||
|     <dependency org="com.ibm.icu"               name="icu4j"            rev="52.1"      conf="default->master,sources" /> | ||||
| 	<dependency org="org.slf4j"                 name="slf4j-api"        rev="1.7.6"     conf="default->master,sources" /> | ||||
| 	<dependency org="org.slf4j"                 name="jcl-over-slf4j"   rev="1.7.6"     conf="default->master,sources" /> | ||||
| 	<dependency org="org.slf4j"                 name="slf4j-jdk14"      rev="1.7.6"     conf="default->master,sources" /> | ||||
|     <!-- dependency org="xalan"                     name="xalan"            rev="2.7.1"     conf="default->master,sources" / --> | ||||
|     <!-- dependency org="xalan"                     name="serializer"       rev="2.7.1"     conf="default->master,sources" / --> | ||||
|     <!-- dependency org="xerces"                    name="xercesImpl"       rev="2.11.0"    conf="default->master,sources" / --> | ||||
|      | ||||
|     <!-- And to fix the HttpClient shenanigans... | ||||
|     	http://stackoverflow.com/questions/20238421/java-lang-nosuchfielderror-org-apache-http-message-basiclineformatter-instance --> | ||||
|     <dependency org="com.googlecode.jarjar" name="jarjar" rev="1.3" /> | ||||
|      | ||||
|   </dependencies> | ||||
| </ivy-module> | ||||
		Reference in New Issue
	
	Block a user
	 Bradlee Speice
					Bradlee Speice