Changeset 35779 in osm for applications/editors/josm/plugins
- Timestamp:
- 2021-07-15T01:07:58+02:00 (3 years ago)
- Location:
- applications/editors/josm/plugins/MicrosoftStreetside
- Files:
-
- 6 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/MicrosoftStreetside/build.gradle
r34419 r35779 1 import com.github.spotbugs.snom.SpotBugsTask 2 import net.ltgt.gradle.errorprone.CheckSeverity 3 1 4 plugins { 2 id "org.sonarqube" version "2.6.2" 3 id "org.kordamp.markdown.convert" version "1.1.0" 4 id 'org.openstreetmap.josm' version "0.4.4" 5 id "com.github.ben-manes.versions" version "0.17.0" 6 id 'com.github.spotbugs' version '1.6.1' 7 id "net.ltgt.errorprone" version "0.0.14" 8 5 id 'java' 9 6 id 'eclipse' 10 7 id 'jacoco' 11 id 'java'12 8 id 'pmd' 9 id("com.github.ben-manes.versions").version("0.39.0") 10 id("net.ltgt.errorprone").version("2.0.2") 11 id("org.kordamp.markdown.convert").version("1.2.0") 12 id("org.sonarqube").version("3.3") 13 id('com.github.spotbugs').version('4.7.2') 14 id('org.openstreetmap.josm').version("0.7.1") 15 id("com.diffplug.spotless").version("5.14.1") 13 16 } 14 17 … … 33 36 jcenter() 34 37 mavenCentral() 38 maven { 39 url "https://josm.openstreetmap.de/nexus/content/repositories/releases/" 40 } 35 41 } 36 42 43 def versions = [ 44 awaitility: "4.1.0", 45 jackson: "2.12.4", 46 jmockit: "1.49.a", 47 junit: "5.7.1", 48 wiremock: "2.27.2" 49 ] 50 37 51 dependencies { 38 compile 'com.fasterxml.jackson.core:jackson-core:2.2.4' 39 compile 'com.fasterxml.jackson.core:jackson-databind:2.2.4' 40 compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.4' 41 compile 'us.monoid.web:resty:0.3.2' 42 compile 'log4j:log4j:1.2.17' 43 testImplementation ('org.openstreetmap.josm:josm-unittest'){changing=true} 44 testImplementation 'com.github.tomakehurst:wiremock:2.17.0' 45 testImplementation 'junit:junit:4.12' 52 if (!JavaVersion.current().isJava9Compatible()) { 53 errorproneJavac("com.google.errorprone:javac:9+181-r4173-1") 54 } 55 implementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" 56 implementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" 57 implementation "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" 58 implementation "us.monoid.web:resty:0.3.2" 59 implementation "log4j:log4j:1.2.17" 60 testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${versions.junit}") 61 testImplementation("org.junit.jupiter:junit-jupiter-params:${versions.junit}") 62 testImplementation("org.junit.jupiter:junit-jupiter-api:${versions.junit}") 63 testImplementation("org.junit.vintage:junit-vintage-engine:${versions.junit}") 64 testImplementation ("org.openstreetmap.josm:josm-unittest"){changing=true} 65 testImplementation "com.github.tomakehurst:wiremock:${versions.wiremock}" 66 testImplementation("org.jmockit:jmockit:${versions.jmockit}") 67 testImplementation("org.awaitility:awaitility:${versions.awaitility}") 46 68 } 47 69 … … 69 91 } 70 92 93 spotless { 94 enforceCheck = false 95 format("misc") { 96 target("**/*.gradle", "**.*.md", "**/.gitignore") 97 98 trimTrailingWhitespace() 99 indentWithSpaces(2) 100 endWithNewline() 101 } 102 java { 103 trimTrailingWhitespace() 104 indentWithSpaces(2) 105 endWithNewline() 106 removeUnusedImports() 107 } 108 } 109 71 110 josm { 72 111 debugPort = 7051 73 manifest {74 //oldVersionDownloadLink 10824, 'v1.5.3', new URL('https://github.com/JOSM/Mapillary/releases/download/v1.5.3/Mapillary.jar')75 }76 i18n {77 pathTransformer = getGithubPathTransformer('spatialdev/MicrosoftStreetside')78 }79 112 } 80 113 … … 100 133 failOnError false 101 134 } 102 tasks.withType( com.github.spotbugs.SpotBugsTask) {135 tasks.withType(SpotBugsTask) { 103 136 reports { 104 137 xml.enabled = false … … 110 143 111 144 test { 145 project.afterEvaluate { 146 jvmArgs("-javaagent:${classpath.find { it.name.contains("jmockit") }.absolutePath}") 147 } 148 useJUnitPlatform() 112 149 testLogging { 113 150 exceptionFormat "full" -
applications/editors/josm/plugins/MicrosoftStreetside/config/pmd/ruleset.xml
r34329 r35779 7 7 This ruleset checks some rules that you should normally follow for the ms-streetside-josm-plugin. 8 8 </description> 9 <rule ref="rulesets/java/basic.xml"/>10 <rule ref="rulesets/java/braces.xml">11 <exclude name="IfStmtsMustUseBraces"/>12 </rule>13 <rule ref="rulesets/java/clone.xml"/>14 9 15 <rule ref="rulesets/java/controversial.xml/UnnecessaryConstructor"/> 16 <rule ref="rulesets/java/controversial.xml/AssignmentInOperand"/> 17 <rule ref="rulesets/java/controversial.xml/DontImportSun"/> 18 <rule ref="rulesets/java/controversial.xml/SuspiciousOctalEscape"/> 19 <rule ref="rulesets/java/controversial.xml/UnnecessaryParentheses"/> 20 21 <rule ref="rulesets/java/coupling.xml"> 10 <rule ref="category/java/design.xml"> 22 11 <exclude name="LoosePackageCoupling" /> 23 12 <exclude name="LawOfDemeter" /> 24 13 </rule> 25 <rule ref="rulesets/java/design.xml"> 26 <exclude name="AvoidSynchronizedAtMethodLevel" /> 14 <rule ref="category/java/codestyle.xml"> 27 15 <exclude name="ConfusingTernary" /> 28 </rule>29 <rule ref="rulesets/java/empty.xml"/>30 <rule ref="rulesets/java/finalizers.xml"/>31 <rule ref="rulesets/java/imports.xml"/>32 <rule ref="rulesets/java/naming.xml">33 <exclude name="ShortVariable"/>34 <exclude name="LongVariable"/>35 <exclude name="AbstractNaming"/>36 </rule>37 <rule ref="rulesets/java/optimizations.xml">38 16 <exclude name="LocalVariableCouldBeFinal" /> 39 17 <exclude name="MethodArgumentCouldBeFinal" /> 18 <exclude name="UselessParentheses" /> 19 <exclude name="IfStmtsMustUseBraces"/> 20 </rule> 21 <rule ref="category/java/multithreading.xml"> 22 <exclude name="AvoidSynchronizedAtMethodLevel" /> 23 </rule> 24 <rule ref="category/java/bestpractices.xml"/> 25 <rule ref="category/java/errorprone.xml"/> 26 <rule ref="category/java/performance.xml"> 40 27 <exclude name="AvoidInstantiatingObjectsInLoops" /> 41 28 </rule> 42 <rule ref="rulesets/java/strictexception.xml"/>43 <rule ref="rulesets/java/strings.xml"/>44 <rule ref="rulesets/java/sunsecure.xml"/>45 <rule ref="rulesets/java/typeresolution.xml"/>46 <rule ref="rulesets/java/unnecessary.xml">47 <exclude name="UselessParentheses" />48 </rule>49 <rule ref="rulesets/java/unusedcode.xml"/>50 29 </ruleset> -
applications/editors/josm/plugins/MicrosoftStreetside/gradle.properties
r35601 r35779 7 7 8 8 # Minimum required JOSM version to run this plugin, choose the lowest version possible that is compatible. 9 # You can check if the plugin compiles against this version by executing `./gradlew minJosmVersionClasses`.10 plugin.main.version=1 65489 # You can check if the plugin compiles against this version by executing `./gradlew compileJava_minJosm`. 10 plugin.main.version=18004 11 11 #plugin.version= 12 12 # Version of JOSM against which the plugin is compiled 13 13 # Please check, if the specified version is available for download from https://josm.openstreetmap.de/download/ . 14 14 # If not, choose the next higher number that is available, or the gradle build will break. 15 plugin.compile.version=1 708415 plugin.compile.version=18004 16 16 plugin.requires=apache-commons;apache-http;utilsplugin2;javafx 17 17 -
applications/editors/josm/plugins/MicrosoftStreetside/gradle/tool-config.gradle
r34329 r35779 1 def pmdVersion = " 5.8.0" // TODO: Update to PMD 62 def spotbugsVersion = " 3.1.3"3 def jacocoVersion = "0.8. 1"4 def errorproneVersion = "2. 3.1"1 def pmdVersion = "6.36.0" 2 def spotbugsVersion = "4.3.0" 3 def jacocoVersion = "0.8.7" 4 def errorproneVersion = "2.7.1" 5 5 6 6 // Set up ErrorProne (currently only for JDK8, until JDK9 is supported) 7 7 dependencies.errorprone "com.google.errorprone:error_prone_core:$errorproneVersion" 8 /* 8 9 tasks.withType(JavaCompile) { 9 10 options.compilerArgs += ['-Xep:DefaultCharset:ERROR', … … 17 18 '-Xep:ConstantField:WARN'] 18 19 } 20 */ 19 21 20 22 // Spotbugs config … … 24 26 effort = "max" 25 27 reportLevel = "low" 26 sourceSets = [sourceSets.main, sourceSets.test]28 //sourceSets = [sourceSets.main, sourceSets.test] 27 29 } 28 30 -
applications/editors/josm/plugins/MicrosoftStreetside/gradle/wrapper/gradle-wrapper.properties
r34329 r35779 1 1 distributionBase=GRADLE_USER_HOME 2 2 distributionPath=wrapper/dists 3 distributionUrl=https\://services.gradle.org/distributions/gradle- 4.7-all.zip3 distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip 4 4 zipStoreBase=GRADLE_USER_HOME 5 5 zipStorePath=wrapper/dists -
applications/editors/josm/plugins/MicrosoftStreetside/gradlew
r34317 r35779 1 1 #!/usr/bin/env sh 2 3 # 4 # Copyright 2015 the original author or authors. 5 # 6 # Licensed under the Apache License, Version 2.0 (the "License"); 7 # you may not use this file except in compliance with the License. 8 # You may obtain a copy of the License at 9 # 10 # https://www.apache.org/licenses/LICENSE-2.0 11 # 12 # Unless required by applicable law or agreed to in writing, software 13 # distributed under the License is distributed on an "AS IS" BASIS, 14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 # See the License for the specific language governing permissions and 16 # limitations under the License. 17 # 2 18 3 19 ############################################################################## … … 29 45 30 46 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 DEFAULT_JVM_OPTS= ""47 DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 32 48 33 49 # Use the maximum available, or set MAX_FD != -1 to use that value. … … 66 82 67 83 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 68 85 69 86 # Determine the Java command to use to start the JVM. … … 110 127 fi 111 128 112 # For Cygwin , switch paths to Windows format before running java113 if $cygwin; then129 # For Cygwin or MSYS, switch paths to Windows format before running java 130 if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 114 131 APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 132 CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 133 116 134 JAVACMD=`cygpath --unix "$JAVACMD"` 117 135 … … 139 157 eval `echo args$i`="\"$arg\"" 140 158 fi 141 i= $((i+1))159 i=`expr $i + 1` 142 160 done 143 161 case $i in 144 (0) set -- ;;145 (1) set -- "$args0" ;;146 (2) set -- "$args0" "$args1" ;;147 (3) set -- "$args0" "$args1" "$args2" ;;148 (4) set -- "$args0" "$args1" "$args2" "$args3" ;;149 (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;150 (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;151 (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;152 (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;153 (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;162 0) set -- ;; 163 1) set -- "$args0" ;; 164 2) set -- "$args0" "$args1" ;; 165 3) set -- "$args0" "$args1" "$args2" ;; 166 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 167 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 168 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 169 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 170 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 171 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 172 esac 155 173 fi … … 160 178 echo " " 161 179 } 162 APP_ARGS= $(save "$@")180 APP_ARGS=`save "$@"` 163 181 164 182 # Collect all arguments for the java command, following the shell quoting and substitution rules 165 183 eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 184 167 # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong168 if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then169 cd "$(dirname "$0")"170 fi171 172 185 exec "$JAVACMD" "$@" -
applications/editors/josm/plugins/MicrosoftStreetside/gradlew.bat
r34317 r35779 1 @rem 2 @rem Copyright 2015 the original author or authors. 3 @rem 4 @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 @rem you may not use this file except in compliance with the License. 6 @rem You may obtain a copy of the License at 7 @rem 8 @rem https://www.apache.org/licenses/LICENSE-2.0 9 @rem 10 @rem Unless required by applicable law or agreed to in writing, software 11 @rem distributed under the License is distributed on an "AS IS" BASIS, 12 @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 @rem See the License for the specific language governing permissions and 14 @rem limitations under the License. 15 @rem 16 1 17 @if "%DEBUG%" == "" @echo off 2 18 @rem ########################################################################## … … 14 30 set APP_HOME=%DIRNAME% 15 31 32 @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 16 35 @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 set DEFAULT_JVM_OPTS= 36 set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 18 37 19 38 @rem Find java.exe … … 22 41 set JAVA_EXE=java.exe 23 42 %JAVA_EXE% -version >NUL 2>&1 24 if "%ERRORLEVEL%" == "0" goto init43 if "%ERRORLEVEL%" == "0" goto execute 25 44 26 45 echo. … … 36 55 set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 56 38 if exist "%JAVA_EXE%" goto init57 if exist "%JAVA_EXE%" goto execute 39 58 40 59 echo. … … 46 65 goto fail 47 66 48 :init49 @rem Get command-line arguments, handling Windows variants50 51 if not "%OS%" == "Windows_NT" goto win9xME_args52 53 :win9xME_args54 @rem Slurp the command line arguments.55 set CMD_LINE_ARGS=56 set _SKIP=257 58 :win9xME_args_slurp59 if "x%~1" == "x" goto execute60 61 set CMD_LINE_ARGS=%*62 63 67 :execute 64 68 @rem Setup the command line … … 66 70 set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 71 72 68 73 @rem Execute Gradle 69 "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain % CMD_LINE_ARGS%74 "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 70 75 71 76 :end -
applications/editors/josm/plugins/MicrosoftStreetside/ivy.xml
r34577 r35779 5 5 </configurations> 6 6 <dependencies> 7 <dependency org="com.fasterxml.jackson.core" name="jackson-core" rev="2. 2.4"/>8 <dependency org="com.fasterxml.jackson.core" name="jackson-databind" rev="2. 2.4"/>9 <dependency org="com.fasterxml.jackson.core" name="jackson-annotations" rev="2. 2.4"/>7 <dependency org="com.fasterxml.jackson.core" name="jackson-core" rev="2.12.4"/> 8 <dependency org="com.fasterxml.jackson.core" name="jackson-databind" rev="2.12.4"/> 9 <dependency org="com.fasterxml.jackson.core" name="jackson-annotations" rev="2.12.4"/> 10 10 <dependency org="us.monoid.web" name="resty" rev="0.3.2"/> 11 11 <dependency org="log4j" name="log4j" rev="1.2.17"/> -
applications/editors/josm/plugins/MicrosoftStreetside/ivy_settings.xml
r34577 r35779 1 1 <ivysettings> 2 < version-matchers usedefaults="true">2 <!--<version-matchers usedefaults="true"> 3 3 <maven-tsnap-vm/> 4 </version-matchers> 4 </version-matchers>--> 5 5 <settings defaultResolver="central"/> 6 6 <resolvers> -
applications/editors/josm/plugins/MicrosoftStreetside/lib
- Property svn:ignore
-
old new 1 *.jar 2 .git 1 3 bin 2 .git
-
- Property svn:ignore
Note:
See TracChangeset
for help on using the changeset viewer.