Ticket #16860: ivy-jmapviewer-v2.patch
File ivy-jmapviewer-v2.patch, 12.3 KB (added by , 6 years ago) |
---|
-
.classpath
commit 9d0282d149eb1357013856132f68360670843856 Author: Simon Legner <Simon.Legner@gmail.com> Date: Sat Jan 5 21:42:34 2019 +0100 fix #16860 - Remove svn:external for jmapviewer and use Apache Ivy to download jar (wiktorn) diff --git a/.classpath b/.classpath index 91faffce1..66a229b8c 100644
a b 32 32 <attribute name="test" value="true"/> 33 33 </attributes> 34 34 </classpathentry> 35 <classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?project=JOSM&ivyXmlPath=ivy.xml&confs=*"/> 35 36 <classpathentry kind="lib" path="test/lib/jfcunit.jar"> 36 37 <attributes> 37 38 <attribute name="test" value="true"/> -
.project
diff --git a/.project b/.project index 572b2b3c1..f8629a548 100644
a b 43 43 <nature>org.sonar.ide.eclipse.core.sonarNature</nature> 44 44 <nature>sf.eclipse.javacc.javaccnature</nature> 45 45 <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> 46 <nature>org.apache.ivyde.eclipse.ivynature</nature> 46 47 </natures> 47 48 </projectDescription> -
build.xml
diff --git a/build.xml b/build.xml index 920e5ed72..0e091ca89 100644
a b 8 8 ** https://josm.openstreetmap.de/wiki/DevelopersGuide/CreateBuild 9 9 ** 10 10 --> 11 <project xmlns:as="antlib:org.codehaus.mojo.animal_sniffer" name="josm" default="dist" xmlns:jacoco="antlib:org.jacoco.ant" xmlns:if="ant:if" xmlns:unless="ant:unless"> 12 <target name="init-properties"> 11 <project name="josm" default="dist" 12 xmlns:as="antlib:org.codehaus.mojo.animal_sniffer" 13 xmlns:if="ant:if" 14 xmlns:ivy="antlib:org.apache.ivy.ant" 15 xmlns:jacoco="antlib:org.jacoco.ant" 16 xmlns:unless="ant:unless" 17 > 18 <target name="init-ivy"> 19 <dirname property="base.dir" file="${ant.file.josm}"/> 20 <property name="lib.dir" location="${base.dir}/lib"/> 21 <property name="tools.dir" location="${base.dir}/tools"/> 22 <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${tools.dir}/ivy/ivy.jar"/> 23 </target> 24 <target name="init-properties" depends="resolve"> 13 25 <property environment="env"/> 14 26 <!-- Load properties in a target and not at top level, so this build file can be 15 27 imported from an IDE ant file (Netbeans) without messing up IDE properties. 16 28 When imported from another file, ${basedir} will point to the parent directory 17 29 of the importing ant file. Use ${base.dir} instead, which is always the parent 18 30 directory of this file. --> 19 <dirname property="base.dir" file="${ant.file.josm}"/>20 31 <property name="test.dir" location="${base.dir}/test"/> 21 32 <property name="src.dir" location="${base.dir}/src"/> 22 33 <condition property="noJavaFX"> … … 30 41 <property name="build.dir" location="${base.dir}/build"/> 31 42 <property name="dist.dir" location="${base.dir}/dist"/> 32 43 <property name="modules.dir" location="${dist.dir}/modules"/> 33 <property name="tools.dir" location="${base.dir}/tools"/>34 44 <property name="pmd.dir" location="${tools.dir}/pmd"/> 35 45 <property name="checkstyle.dir" location="${tools.dir}/checkstyle"/> 36 46 <property name="spotbugs.dir" location="${tools.dir}/spotbugs"/> … … Build-Date: ${build.tstamp} 179 189 <copy file="LICENSE" todir="${build.dir}"/> 180 190 <!-- create josm-custom.jar --> 181 191 <delete file="${dist.jar}"/> 192 <!-- extract libraries to build dir to create uber-jar --> 193 <unzip dest="${build.dir}"> 194 <fileset refid="runtime.fileset" /> 195 <patternset> 196 <exclude name="META-INF/**" /> 197 <exclude name="*" /> 198 </patternset> 199 </unzip> 200 182 201 <jar destfile="${dist.jar}" basedir="${build.dir}" level="${clevel}"> 183 202 <!-- add attribute excludes="**/*BZip2*,**/*Bzip2*" to create a non-bzip2 supporting jar --> 184 203 <manifest> … … Build-Date: ${build.tstamp} 196 215 <zipfileset dir="images" prefix="images"/> 197 216 <zipfileset dir="data" prefix="data"/> 198 217 <zipfileset dir="styles" prefix="styles"/> 199 <zipfileset dir="${src.dir}/org/openstreetmap/gui/jmapviewer/images" prefix="org/openstreetmap/gui/jmapviewer/images"/>200 218 </jar> 201 219 </target> 202 220 <!-- Mac OS X target --> … … Build-Date: ${build.tstamp} 326 344 <exclude name="org/apache/commons/logging/impl/ServletContextCleaner.java"/> 327 345 </javac> 328 346 </target> 329 <target name="compile-jmapviewer" depends="init"> 330 <!-- JMapViewer --> 331 <javac sourcepath="" srcdir="${src.dir}" fork="yes" 332 excludes="com/**,javax/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/Demo.java,org/openstreetmap/gui/jmapviewer/JMapViewerTree.java,org/openstreetmap/gui/jmapviewer/checkBoxTree/**,org/openstreetmap/josm/**,org/tukaani/**" 333 destdir="${build.dir}" target="${java.lang.version}" source="${java.lang.version}" debug="on" includeantruntime="false" createMissingPackageInfoClass="false" encoding="UTF-8"> 334 <compilerarg value="-J-Xbootclasspath/p:${error_prone_javac.jar}" unless:set="isJava9"/> 335 <compilerarg line="-XDcompilePolicy=simple"/> 336 <compilerarg value="-processorpath"/> 337 <compilerarg pathref="processor.path"/> 338 <compilerarg value="-Xlint:cast"/> 339 <compilerarg value="-Xlint:deprecation"/> 340 <compilerarg value="-Xlint:dep-ann"/> 341 <compilerarg value="-Xlint:divzero"/> 342 <compilerarg value="-Xlint:empty"/> 343 <compilerarg value="-Xlint:finally"/> 344 <compilerarg value="-Xlint:overrides"/> 345 <!--<compilerarg value="-Xlint:rawtypes"/>--> 346 <compilerarg value="-Xlint:static"/> 347 <compilerarg value="-Xlint:try"/> 348 <compilerarg value="-Xlint:unchecked"/> 349 <!-- Undocumented argument to ignore "Sun internal proprietary API" warning, see http://stackoverflow.com/a/13862308/2257172 --> 350 <compilerarg value="-XDignore.symbol.file"/> 351 <compilerarg value="-Xplugin:ErrorProne -Xep:CatchAndPrintStackTrace:OFF -Xep:ReferenceEquality:OFF -Xep:StringSplitter:OFF"/> 352 <compilerarg line="-Xmaxwarns 1000"/> 353 </javac> 354 </target> 355 <target name="compile" depends="init,javacc,compile-cots,compile-jmapviewer"> 347 <target name="compile" depends="init,javacc,compile-cots"> 356 348 <!-- JOSM --> 357 349 <javac sourcepath="" srcdir="${src.dir}" fork="yes" 358 350 excludes="com/**,javax/**,oauth/**,org/apache/commons/**,org/glassfish/**,org/openstreetmap/gui/jmapviewer/**,org/tukaani/**" … … Build-Date: ${build.tstamp} 377 369 <compilerarg value="-Xplugin:ErrorProne -Xep:ReferenceEquality:OFF -Xep:ImmutableEnumChecker:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:FloatingPointLiteralPrecision:OFF -Xep:ShortCircuitBoolean:OFF -Xep:StringSplitter:OFF -Xep:JdkObsolete:OFF -Xep:UnnecessaryParentheses:OFF -Xep:EqualsGetClass:OFF -Xep:ThreadPriorityCheck:OFF -Xep:UndefinedEquals:OFF"/> 378 370 <compilerarg line="-Xmaxwarns 1000"/> 379 371 <exclude name="org/openstreetmap/josm/io/audio/fx/*.java" if:set="noJavaFX"/> 372 <classpath> 373 <path refid="runtime.path" /> 374 </classpath> 380 375 </javac> 381 376 382 377 <copy todir="build" failonerror="no" includeemptydirs="no"> … … Build-Date: ${build.tstamp} 394 389 <javadoc destdir="javadoc" 395 390 sourcepath="${src.dir}" 396 391 encoding="UTF-8" 397 packagenames="org.openstreetmap.josm.* ,org.openstreetmap.gui.jmapviewer.*"392 packagenames="org.openstreetmap.josm.*" 398 393 excludepackagenames="org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.*" 399 394 windowtitle="JOSM" 400 395 use="true" … … Build-Date: ${build.tstamp} 929 924 930 925 <target name="spotbugs" depends="dist"> 931 926 <taskdef name="spotbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${spotbugs.dir}/spotbugs-ant.jar"/> 932 <path id="spotbugs -classpath">927 <path id="spotbugs.classpath"> 933 928 <fileset dir="${spotbugs.dir}"> 934 929 <include name="*.jar"/> 935 930 </fileset> 936 931 </path> 937 <property name="spotbugs-classpath" refid="spotbugs-classpath"/>938 932 <spotbugs output="xml" 939 933 outputFile="spotbugs-josm.xml" 940 classpath="${spotbugs-classpath}"941 934 pluginList="" 942 935 excludeFilter="${spotbugs.dir}/josm-filter.xml" 943 936 effort="max" 944 937 reportLevel="low" 945 938 > 939 <classpath> 940 <path refid="spotbugs.classpath" /> 941 <path refid="compile.path" /> 942 </classpath> 946 943 <sourcePath path="${base.dir}/src" /> 947 944 <class location="${dist.jar}" /> 948 945 </spotbugs> … … Build-Date: ${build.tstamp} 1071 1068 </exec> 1072 1069 <move file="${modules.dir}/dots/summary.dot.png" tofile="${modules.dir}/josm-with-all-dependencies.png"/> 1073 1070 </target> 1071 <target name="resolve" depends="init-ivy"> 1072 <ivy:resolve keep="true"/> 1073 <ivy:report todir="${tools.dir}/ivy-report" graph="false"/> 1074 <ivy:cachepath pathid="compile.path" conf="compile"/> 1075 <ivy:cachepath pathid="runtime.path" conf="runtime"/> 1076 <ivy:cachefileset setid="runtime.fileset" conf="runtime"/> 1077 <ivy:cachepath pathid="test.path" conf="test"/> 1078 <ivy:cachepath pathid="groovy-ant.path" conf="groovy-ant-task"/> 1079 <ivy:cachepath pathid="groovy-scripts.path" conf="groovy-scripts"/> 1080 <ivy:retrieve pattern="${tools.dir}/ivy/[artifact].[ext]" conf="ivy"/> 1081 </target> 1082 <target name="bootstrap-workspace" description="Copy libraries from ivy cache to workspace folders for IDE" depends="resolve"> 1083 <delete dir="${lib.dir}"/> 1084 <ivy:retrieve pattern="${lib.dir}/compile/[artifact].[ext]" conf="compile"/> 1085 <ivy:retrieve pattern="${lib.dir}/runtime/[artifact].[ext]" conf="runtime"/> 1086 </target> 1074 1087 </project> -
new file ivy.xml
diff --git a/ivy.xml b/ivy.xml new file mode 100644 index 000000000..a395cf2f2
- + 1 <?xml version="1.0" encoding="utf-8"?> 2 3 <ivy-module version="2.0"> 4 <info organisation="org.openstreetmap" module="josm"/> 5 <configurations> 6 <conf name="groovy-scripts" description="Dependencies for Groovy scripts" /> 7 <conf name="groovy-ant-task" description="Dependencies for Groovy scripts" /> 8 <conf name="ivy" description="Apache Ivy configration for self-update" /> 9 <!-- configuration that should be used when specifying dependencies --> 10 <conf name="implementation" description="All libs JOSM uses that plugins should not use" /> 11 <conf name="api" description="All libs that JOSM uses and are available for plugins" /> 12 <conf name="runtimeOnly" description="The libs shipped with JOSM that we do not need during compilation" /> 13 <conf name="provided" description="The libs we need during compilation but not on application start" /> 14 <conf name="epsg" description="Everything epsg needs- which is currently all of JOSM." /> 15 <!-- Meta configuration used in build scripts --> 16 <conf name="runtime" description="Libraries only needed at runtime" extends="implementation,api,runtimeOnly"/> 17 <conf name="compile" description="Libraries needed only for compilation" extends="implementation,api,provided" /> 18 <conf name="test" description="Libraries only needed for testing" extends="compile,runtime" /> 19 </configurations> 20 <dependencies> 21 <!-- api --> 22 <!-- https://mvnrepository.com/artifact/org.openstreetmap.jmapviewer/jmapviewer --> 23 <dependency org="org.openstreetmap.jmapviewer" name="jmapviewer" rev="2.8" conf="api->default"/> 24 </dependencies> 25 </ivy-module> -
new file ivysettings.xml
diff --git a/ivysettings.xml b/ivysettings.xml new file mode 100644 index 000000000..586663f66
- + 1 <ivysettings> 2 <settings defaultResolver="chain"/> 3 <resolvers> 4 <chain name="chain"> 5 <ibiblio name="josm-nexus" m2compatible="true" root="https://josm.openstreetmap.de/nexus/content/repositories/public/" /> 6 </chain> 7 </resolvers> 8 </ivysettings>