pmd-bin 1.21.1 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/dist/{pmd-bin-6.37.0/lib/ant-1.10.9.jar → pmd-bin/lib/ant-1.10.11.jar} +0 -0
  2. package/dist/{pmd-bin-6.37.0/lib/ant-launcher-1.10.9.jar → pmd-bin/lib/ant-launcher-1.10.11.jar} +0 -0
  3. package/dist/pmd-bin/lib/{pmd-apex-6.37.0.jar → pmd-apex-6.40.0.jar} +0 -0
  4. package/dist/{pmd-bin-6.37.0/lib/pmd-apex-jorje-6.37.0-lib.jar → pmd-bin/lib/pmd-apex-jorje-6.40.0-lib.jar} +0 -0
  5. package/dist/{pmd-bin-6.37.0/lib/pmd-apex-jorje-6.37.0.pom → pmd-bin/lib/pmd-apex-jorje-6.40.0.pom} +2 -2
  6. package/dist/pmd-bin/lib/{pmd-core-6.37.0.jar → pmd-core-6.40.0.jar} +0 -0
  7. package/dist/pmd-bin/lib/{pmd-cpp-6.37.0.jar → pmd-cpp-6.40.0.jar} +0 -0
  8. package/dist/pmd-bin/lib/{pmd-cs-6.37.0.jar → pmd-cs-6.40.0.jar} +0 -0
  9. package/dist/{pmd-bin-6.37.0/lib/pmd-dart-6.37.0.jar → pmd-bin/lib/pmd-dart-6.40.0.jar} +0 -0
  10. package/dist/pmd-bin/lib/pmd-fortran-6.40.0.jar +0 -0
  11. package/dist/pmd-bin/lib/{pmd-go-6.37.0.jar → pmd-go-6.40.0.jar} +0 -0
  12. package/dist/pmd-bin/lib/pmd-groovy-6.40.0.jar +0 -0
  13. package/dist/pmd-bin/lib/{pmd-java-6.37.0.jar → pmd-java-6.40.0.jar} +0 -0
  14. package/dist/{pmd-bin-6.37.0/lib/pmd-javascript-6.37.0.jar → pmd-bin/lib/pmd-javascript-6.40.0.jar} +0 -0
  15. package/dist/{pmd-bin-6.37.0/lib/pmd-jsp-6.37.0.jar → pmd-bin/lib/pmd-jsp-6.40.0.jar} +0 -0
  16. package/dist/pmd-bin/lib/{pmd-kotlin-6.37.0.jar → pmd-kotlin-6.40.0.jar} +0 -0
  17. package/dist/pmd-bin/lib/{pmd-lua-6.37.0.jar → pmd-lua-6.40.0.jar} +0 -0
  18. package/dist/{pmd-bin-6.37.0/lib/pmd-matlab-6.37.0.jar → pmd-bin/lib/pmd-matlab-6.40.0.jar} +0 -0
  19. package/dist/{pmd-bin-6.37.0/lib/pmd-modelica-6.37.0.jar → pmd-bin/lib/pmd-modelica-6.40.0.jar} +0 -0
  20. package/dist/{pmd-bin-6.37.0/lib/pmd-objectivec-6.37.0.jar → pmd-bin/lib/pmd-objectivec-6.40.0.jar} +0 -0
  21. package/dist/pmd-bin/lib/pmd-perl-6.40.0.jar +0 -0
  22. package/dist/pmd-bin/lib/pmd-php-6.40.0.jar +0 -0
  23. package/dist/pmd-bin/lib/pmd-plsql-6.40.0.jar +0 -0
  24. package/dist/{pmd-bin-6.37.0/lib/pmd-python-6.37.0.jar → pmd-bin/lib/pmd-python-6.40.0.jar} +0 -0
  25. package/dist/pmd-bin/lib/pmd-ruby-6.40.0.jar +0 -0
  26. package/dist/{pmd-bin-6.37.0/lib/pmd-scala_2.13-6.37.0.jar → pmd-bin/lib/pmd-scala_2.13-6.40.0.jar} +0 -0
  27. package/dist/{pmd-bin-6.37.0/lib/pmd-swift-6.37.0.jar → pmd-bin/lib/pmd-swift-6.40.0.jar} +0 -0
  28. package/dist/pmd-bin/lib/{pmd-visualforce-6.37.0.jar → pmd-visualforce-6.40.0.jar} +0 -0
  29. package/dist/pmd-bin/lib/{pmd-vm-6.37.0.jar → pmd-vm-6.40.0.jar} +0 -0
  30. package/dist/pmd-bin/lib/{pmd-xml-6.37.0.jar → pmd-xml-6.40.0.jar} +0 -0
  31. package/download-java.js +20 -0
  32. package/package.json +7 -6
  33. package/dist/pmd-bin/lib/ant-1.10.9.jar +0 -0
  34. package/dist/pmd-bin/lib/ant-launcher-1.10.9.jar +0 -0
  35. package/dist/pmd-bin/lib/pmd-apex-jorje-6.37.0-lib.jar +0 -0
  36. package/dist/pmd-bin/lib/pmd-apex-jorje-6.37.0.pom +0 -139
  37. package/dist/pmd-bin/lib/pmd-dart-6.37.0.jar +0 -0
  38. package/dist/pmd-bin/lib/pmd-fortran-6.37.0.jar +0 -0
  39. package/dist/pmd-bin/lib/pmd-groovy-6.37.0.jar +0 -0
  40. package/dist/pmd-bin/lib/pmd-javascript-6.37.0.jar +0 -0
  41. package/dist/pmd-bin/lib/pmd-jsp-6.37.0.jar +0 -0
  42. package/dist/pmd-bin/lib/pmd-matlab-6.37.0.jar +0 -0
  43. package/dist/pmd-bin/lib/pmd-modelica-6.37.0.jar +0 -0
  44. package/dist/pmd-bin/lib/pmd-objectivec-6.37.0.jar +0 -0
  45. package/dist/pmd-bin/lib/pmd-perl-6.37.0.jar +0 -0
  46. package/dist/pmd-bin/lib/pmd-php-6.37.0.jar +0 -0
  47. package/dist/pmd-bin/lib/pmd-plsql-6.37.0.jar +0 -0
  48. package/dist/pmd-bin/lib/pmd-python-6.37.0.jar +0 -0
  49. package/dist/pmd-bin/lib/pmd-ruby-6.37.0.jar +0 -0
  50. package/dist/pmd-bin/lib/pmd-scala_2.13-6.37.0.jar +0 -0
  51. package/dist/pmd-bin/lib/pmd-swift-6.37.0.jar +0 -0
  52. package/dist/pmd-bin-6.37.0/LICENSE +0 -237
  53. package/dist/pmd-bin-6.37.0/bin/ast-dump.bat +0 -6
  54. package/dist/pmd-bin-6.37.0/bin/bgastviewer.bat +0 -6
  55. package/dist/pmd-bin-6.37.0/bin/cpd.bat +0 -6
  56. package/dist/pmd-bin-6.37.0/bin/cpdgui.bat +0 -6
  57. package/dist/pmd-bin-6.37.0/bin/designer.bat +0 -51
  58. package/dist/pmd-bin-6.37.0/bin/designerold.bat +0 -6
  59. package/dist/pmd-bin-6.37.0/bin/pmd.bat +0 -6
  60. package/dist/pmd-bin-6.37.0/bin/run.sh +0 -221
  61. package/dist/pmd-bin-6.37.0/lib/animal-sniffer-annotations-1.14.jar +0 -0
  62. package/dist/pmd-bin-6.37.0/lib/antlr-2.7.7.jar +0 -0
  63. package/dist/pmd-bin-6.37.0/lib/antlr-runtime-3.5.2.jar +0 -0
  64. package/dist/pmd-bin-6.37.0/lib/antlr4-runtime-4.7.2.jar +0 -0
  65. package/dist/pmd-bin-6.37.0/lib/aopalliance-1.0.jar +0 -0
  66. package/dist/pmd-bin-6.37.0/lib/asm-9.2.jar +0 -0
  67. package/dist/pmd-bin-6.37.0/lib/cglib-3.2.0.jar +0 -0
  68. package/dist/pmd-bin-6.37.0/lib/common_2.13-4.2.0.jar +0 -0
  69. package/dist/pmd-bin-6.37.0/lib/commons-io-2.6.jar +0 -0
  70. package/dist/pmd-bin-6.37.0/lib/commons-lang3-3.8.1.jar +0 -0
  71. package/dist/pmd-bin-6.37.0/lib/error_prone_annotations-2.1.3.jar +0 -0
  72. package/dist/pmd-bin-6.37.0/lib/fastparse-utils_2.13-1.0.1.jar +0 -0
  73. package/dist/pmd-bin-6.37.0/lib/fastparse_2.13-1.0.1.jar +0 -0
  74. package/dist/pmd-bin-6.37.0/lib/fastparse_2.13-2.1.3.jar +0 -0
  75. package/dist/pmd-bin-6.37.0/lib/groovy-2.4.21.jar +0 -0
  76. package/dist/pmd-bin-6.37.0/lib/gson-2.8.5.jar +0 -0
  77. package/dist/pmd-bin-6.37.0/lib/j2objc-annotations-1.1.jar +0 -0
  78. package/dist/pmd-bin-6.37.0/lib/javax.inject-1.jar +0 -0
  79. package/dist/pmd-bin-6.37.0/lib/jcommander-1.48.jar +0 -0
  80. package/dist/pmd-bin-6.37.0/lib/jol-core-0.4.jar +0 -0
  81. package/dist/pmd-bin-6.37.0/lib/jsr305-3.0.2.jar +0 -0
  82. package/dist/pmd-bin-6.37.0/lib/lenses_2.13-0.9.0.jar +0 -0
  83. package/dist/pmd-bin-6.37.0/lib/logback-classic-1.2.3.jar +0 -0
  84. package/dist/pmd-bin-6.37.0/lib/logback-core-1.2.3.jar +0 -0
  85. package/dist/pmd-bin-6.37.0/lib/parsers_2.13-4.2.0.jar +0 -0
  86. package/dist/pmd-bin-6.37.0/lib/pmd-apex-6.37.0.jar +0 -0
  87. package/dist/pmd-bin-6.37.0/lib/pmd-core-6.37.0.jar +0 -0
  88. package/dist/pmd-bin-6.37.0/lib/pmd-cpp-6.37.0.jar +0 -0
  89. package/dist/pmd-bin-6.37.0/lib/pmd-cs-6.37.0.jar +0 -0
  90. package/dist/pmd-bin-6.37.0/lib/pmd-fortran-6.37.0.jar +0 -0
  91. package/dist/pmd-bin-6.37.0/lib/pmd-go-6.37.0.jar +0 -0
  92. package/dist/pmd-bin-6.37.0/lib/pmd-groovy-6.37.0.jar +0 -0
  93. package/dist/pmd-bin-6.37.0/lib/pmd-java-6.37.0.jar +0 -0
  94. package/dist/pmd-bin-6.37.0/lib/pmd-kotlin-6.37.0.jar +0 -0
  95. package/dist/pmd-bin-6.37.0/lib/pmd-lua-6.37.0.jar +0 -0
  96. package/dist/pmd-bin-6.37.0/lib/pmd-perl-6.37.0.jar +0 -0
  97. package/dist/pmd-bin-6.37.0/lib/pmd-php-6.37.0.jar +0 -0
  98. package/dist/pmd-bin-6.37.0/lib/pmd-plsql-6.37.0.jar +0 -0
  99. package/dist/pmd-bin-6.37.0/lib/pmd-ruby-6.37.0.jar +0 -0
  100. package/dist/pmd-bin-6.37.0/lib/pmd-ui-6.37.0.jar +0 -0
  101. package/dist/pmd-bin-6.37.0/lib/pmd-visualforce-6.37.0.jar +0 -0
  102. package/dist/pmd-bin-6.37.0/lib/pmd-vm-6.37.0.jar +0 -0
  103. package/dist/pmd-bin-6.37.0/lib/pmd-xml-6.37.0.jar +0 -0
  104. package/dist/pmd-bin-6.37.0/lib/protobuf-java-3.7.1.jar +0 -0
  105. package/dist/pmd-bin-6.37.0/lib/rhino-1.7.13.jar +0 -0
  106. package/dist/pmd-bin-6.37.0/lib/saxon-9.1.0.8-dom.jar +0 -0
  107. package/dist/pmd-bin-6.37.0/lib/saxon-9.1.0.8.jar +0 -0
  108. package/dist/pmd-bin-6.37.0/lib/scala-library-2.13.3.jar +0 -0
  109. package/dist/pmd-bin-6.37.0/lib/scalapb-runtime_2.13-0.9.0.jar +0 -0
  110. package/dist/pmd-bin-6.37.0/lib/slf4j-api-1.7.25.jar +0 -0
  111. package/dist/pmd-bin-6.37.0/lib/snakeyaml-1.26.jar +0 -0
  112. package/dist/pmd-bin-6.37.0/lib/sourcecode_2.13-0.1.7.jar +0 -0
  113. package/dist/pmd-bin-6.37.0/lib/stringtemplate-3.2.1.jar +0 -0
  114. package/dist/pmd-bin-6.37.0/lib/trees_2.13-4.2.0.jar +0 -0
@@ -8,13 +8,13 @@
8
8
  <parent>
9
9
  <groupId>net.sourceforge.pmd</groupId>
10
10
  <artifactId>pmd</artifactId>
11
- <version>6.37.0</version>
11
+ <version>6.40.0</version>
12
12
  <relativePath>../</relativePath>
13
13
  </parent>
14
14
 
15
15
  <properties>
16
16
  <java.version>8</java.version>
17
- <apex.jorje.version>2020-09-10-5a5192</apex.jorje.version>
17
+ <apex.jorje.version>2021-10-08-631b8c</apex.jorje.version>
18
18
  </properties>
19
19
 
20
20
  <build>
@@ -0,0 +1,20 @@
1
+ async function installJava() {
2
+ const jre = require("node-java-connector");
3
+ return jre
4
+ .install(15, { type: "jre", allow_system_java: false })
5
+ .then((dir) => {
6
+ if (!dir) {
7
+ console.log("using system-wide java installation");
8
+ }
9
+ })
10
+ .catch((err) => {
11
+ console.log(err);
12
+ throw err;
13
+ });
14
+ }
15
+
16
+ async function main() {
17
+ await installJava();
18
+ }
19
+
20
+ main();
package/package.json CHANGED
@@ -1,27 +1,27 @@
1
1
  {
2
2
  "name": "pmd-bin",
3
- "version": "1.21.1",
3
+ "version": "1.23.0",
4
4
  "description": "Standalone PMD (static code analyzer) with its own JRE",
5
5
  "author": "Matthias Rolke <mr.amtrack@gmail.com>",
6
6
  "bin": {
7
7
  "pmd": "./pmd"
8
8
  },
9
9
  "dependencies": {
10
- "node-java-connector": "^0.2.0"
10
+ "node-java-connector": "^0.2.1"
11
11
  },
12
12
  "devDependencies": {
13
- "adm-zip": "^0.5.5",
13
+ "adm-zip": "^0.5.6",
14
14
  "got": "^11.8.2"
15
15
  },
16
16
  "files": [
17
17
  "/dist",
18
18
  "/pmd",
19
- "/install.js"
19
+ "/download-java.js"
20
20
  ],
21
21
  "license": "BSD",
22
22
  "main": "pmd",
23
23
  "pmd": {
24
- "version": "6.37.0"
24
+ "version": "6.40.0"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",
@@ -30,6 +30,7 @@
30
30
  "scripts": {
31
31
  "install": "node download-java.js",
32
32
  "build": "node download-pmd.js",
33
- "prepare": "npm run build"
33
+ "prepare": "npm run build",
34
+ "test": "PATH=\"${PATH}:${PWD}\" bash test.sh"
34
35
  }
35
36
  }
Binary file
@@ -1,139 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
- <modelVersion>4.0.0</modelVersion>
4
- <artifactId>pmd-apex-jorje</artifactId>
5
- <name>PMD Apex Jorje Parser Library</name>
6
- <packaging>pom</packaging>
7
-
8
- <parent>
9
- <groupId>net.sourceforge.pmd</groupId>
10
- <artifactId>pmd</artifactId>
11
- <version>6.37.0</version>
12
- <relativePath>../</relativePath>
13
- </parent>
14
-
15
- <properties>
16
- <java.version>8</java.version>
17
- <apex.jorje.version>2020-09-10-5a5192</apex.jorje.version>
18
- </properties>
19
-
20
- <build>
21
- <plugins>
22
- <plugin>
23
- <groupId>org.codehaus.mojo</groupId>
24
- <artifactId>build-helper-maven-plugin</artifactId>
25
- <version>3.0.0</version>
26
- <executions>
27
- <execution>
28
- <id>attach-apex-jorje</id>
29
- <phase>package</phase>
30
- <goals>
31
- <goal>attach-artifact</goal>
32
- </goals>
33
- <configuration>
34
- <artifacts>
35
- <artifact>
36
- <file>${basedir}/repo/apex/apex-jorje-lsp-minimized/${apex.jorje.version}/apex-jorje-lsp-minimized-${apex.jorje.version}.jar</file>
37
- <type>jar</type>
38
- <classifier>lib</classifier>
39
- </artifact>
40
- </artifacts>
41
- </configuration>
42
- </execution>
43
- </executions>
44
- </plugin>
45
- </plugins>
46
- </build>
47
- <dependencies>
48
- <!-- transitive dependencies of apex-jorje -->
49
- <dependency>
50
- <groupId>cglib</groupId>
51
- <artifactId>cglib</artifactId>
52
- <version>3.2.0</version>
53
- </dependency>
54
- <dependency>
55
- <groupId>ch.qos.logback</groupId>
56
- <artifactId>logback-classic</artifactId>
57
- <version>1.2.3</version>
58
- </dependency>
59
- <dependency>
60
- <groupId>ch.qos.logback</groupId>
61
- <artifactId>logback-core</artifactId>
62
- <version>1.2.3</version>
63
- </dependency>
64
- <dependency>
65
- <groupId>com.google.code.findbugs</groupId>
66
- <artifactId>jsr305</artifactId>
67
- <version>3.0.2</version>
68
- </dependency>
69
- <dependency>
70
- <groupId>com.google.code.gson</groupId>
71
- <artifactId>gson</artifactId>
72
- <version>2.7</version>
73
- </dependency>
74
- <dependency>
75
- <groupId>com.google.errorprone</groupId>
76
- <artifactId>error_prone_annotations</artifactId>
77
- <version>2.1.3</version>
78
- </dependency>
79
- <dependency>
80
- <groupId>com.google.guava</groupId>
81
- <artifactId>guava</artifactId>
82
- </dependency>
83
- <dependency>
84
- <groupId>com.google.j2objc</groupId>
85
- <artifactId>j2objc-annotations</artifactId>
86
- <version>1.1</version>
87
- </dependency>
88
- <dependency>
89
- <groupId>org.antlr</groupId>
90
- <artifactId>antlr-runtime</artifactId>
91
- </dependency>
92
- <dependency>
93
- <groupId>org.antlr</groupId>
94
- <artifactId>stringtemplate</artifactId>
95
- <version>3.2.1</version>
96
- </dependency>
97
- <dependency>
98
- <groupId>org.apache.commons</groupId>
99
- <artifactId>commons-lang3</artifactId>
100
- <version>3.0</version>
101
- </dependency>
102
- <dependency>
103
- <groupId>org.codehaus.mojo</groupId>
104
- <artifactId>animal-sniffer-annotations</artifactId>
105
- <version>1.14</version>
106
- </dependency>
107
- <dependency>
108
- <groupId>org.openjdk.jol</groupId>
109
- <artifactId>jol-core</artifactId>
110
- <version>0.4</version>
111
- </dependency>
112
- <dependency>
113
- <groupId>org.slf4j</groupId>
114
- <artifactId>slf4j-api</artifactId>
115
- <version>1.7.20</version>
116
- </dependency>
117
- <dependency>
118
- <groupId>org.yaml</groupId>
119
- <artifactId>snakeyaml</artifactId>
120
- <version>1.26</version>
121
- </dependency>
122
- <dependency>
123
- <groupId>aopalliance</groupId>
124
- <artifactId>aopalliance</artifactId>
125
- <version>1.0</version>
126
- </dependency>
127
- <dependency>
128
- <groupId>javax.inject</groupId>
129
- <artifactId>javax.inject</artifactId>
130
- <version>1</version>
131
- </dependency>
132
- <dependency>
133
- <groupId>org.ow2.asm</groupId>
134
- <artifactId>asm</artifactId>
135
- <version>5.0.3</version>
136
- <scope>runtime</scope>
137
- </dependency>
138
- </dependencies>
139
- </project>
Binary file
Binary file
@@ -1,237 +0,0 @@
1
- PMD's BSD-style license:
2
-
3
- Copyright (c) 2003-2009, InfoEther, LLC
4
- All rights reserved.
5
-
6
- Redistribution and use in source and binary forms, with or without
7
- modification, are permitted provided that the following conditions are
8
- met:
9
-
10
- * Redistributions of source code must retain the above copyright
11
- notice, this list of conditions and the following disclaimer.
12
- * Redistributions in binary form must reproduce the above copyright
13
- notice, this list of conditions and the following disclaimer in the
14
- documentation and/or other materials provided with the distribution.
15
- * The end-user documentation included with the redistribution, if
16
- any, must include the following acknowledgement:
17
- "This product includes software developed in part by support from
18
- the Defense Advanced Research Project Agency (DARPA)"
19
- * Neither the name of InfoEther, LLC nor the names of its
20
- contributors may be used to endorse or promote products derived from
21
- this software without specific prior written permission.
22
-
23
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
24
- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25
- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
26
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
27
- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
-
35
- ---------------------------------------------------------------------
36
-
37
- Apache License
38
- Version 2.0, January 2004
39
- http://www.apache.org/licenses/
40
-
41
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
42
-
43
- 1. Definitions.
44
-
45
- "License" shall mean the terms and conditions for use, reproduction,
46
- and distribution as defined by Sections 1 through 9 of this document.
47
-
48
- "Licensor" shall mean the copyright owner or entity authorized by
49
- the copyright owner that is granting the License.
50
-
51
- "Legal Entity" shall mean the union of the acting entity and all
52
- other entities that control, are controlled by, or are under common
53
- control with that entity. For the purposes of this definition,
54
- "control" means (i) the power, direct or indirect, to cause the
55
- direction or management of such entity, whether by contract or
56
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
57
- outstanding shares, or (iii) beneficial ownership of such entity.
58
-
59
- "You" (or "Your") shall mean an individual or Legal Entity
60
- exercising permissions granted by this License.
61
-
62
- "Source" form shall mean the preferred form for making modifications,
63
- including but not limited to software source code, documentation
64
- source, and configuration files.
65
-
66
- "Object" form shall mean any form resulting from mechanical
67
- transformation or translation of a Source form, including but
68
- not limited to compiled object code, generated documentation,
69
- and conversions to other media types.
70
-
71
- "Work" shall mean the work of authorship, whether in Source or
72
- Object form, made available under the License, as indicated by a
73
- copyright notice that is included in or attached to the work
74
- (an example is provided in the Appendix below).
75
-
76
- "Derivative Works" shall mean any work, whether in Source or Object
77
- form, that is based on (or derived from) the Work and for which the
78
- editorial revisions, annotations, elaborations, or other modifications
79
- represent, as a whole, an original work of authorship. For the purposes
80
- of this License, Derivative Works shall not include works that remain
81
- separable from, or merely link (or bind by name) to the interfaces of,
82
- the Work and Derivative Works thereof.
83
-
84
- "Contribution" shall mean any work of authorship, including
85
- the original version of the Work and any modifications or additions
86
- to that Work or Derivative Works thereof, that is intentionally
87
- submitted to Licensor for inclusion in the Work by the copyright owner
88
- or by an individual or Legal Entity authorized to submit on behalf of
89
- the copyright owner. For the purposes of this definition, "submitted"
90
- means any form of electronic, verbal, or written communication sent
91
- to the Licensor or its representatives, including but not limited to
92
- communication on electronic mailing lists, source code control systems,
93
- and issue tracking systems that are managed by, or on behalf of, the
94
- Licensor for the purpose of discussing and improving the Work, but
95
- excluding communication that is conspicuously marked or otherwise
96
- designated in writing by the copyright owner as "Not a Contribution."
97
-
98
- "Contributor" shall mean Licensor and any individual or Legal Entity
99
- on behalf of whom a Contribution has been received by Licensor and
100
- subsequently incorporated within the Work.
101
-
102
- 2. Grant of Copyright License. Subject to the terms and conditions of
103
- this License, each Contributor hereby grants to You a perpetual,
104
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
105
- copyright license to reproduce, prepare Derivative Works of,
106
- publicly display, publicly perform, sublicense, and distribute the
107
- Work and such Derivative Works in Source or Object form.
108
-
109
- 3. Grant of Patent License. Subject to the terms and conditions of
110
- this License, each Contributor hereby grants to You a perpetual,
111
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
112
- (except as stated in this section) patent license to make, have made,
113
- use, offer to sell, sell, import, and otherwise transfer the Work,
114
- where such license applies only to those patent claims licensable
115
- by such Contributor that are necessarily infringed by their
116
- Contribution(s) alone or by combination of their Contribution(s)
117
- with the Work to which such Contribution(s) was submitted. If You
118
- institute patent litigation against any entity (including a
119
- cross-claim or counterclaim in a lawsuit) alleging that the Work
120
- or a Contribution incorporated within the Work constitutes direct
121
- or contributory patent infringement, then any patent licenses
122
- granted to You under this License for that Work shall terminate
123
- as of the date such litigation is filed.
124
-
125
- 4. Redistribution. You may reproduce and distribute copies of the
126
- Work or Derivative Works thereof in any medium, with or without
127
- modifications, and in Source or Object form, provided that You
128
- meet the following conditions:
129
-
130
- (a) You must give any other recipients of the Work or
131
- Derivative Works a copy of this License; and
132
-
133
- (b) You must cause any modified files to carry prominent notices
134
- stating that You changed the files; and
135
-
136
- (c) You must retain, in the Source form of any Derivative Works
137
- that You distribute, all copyright, patent, trademark, and
138
- attribution notices from the Source form of the Work,
139
- excluding those notices that do not pertain to any part of
140
- the Derivative Works; and
141
-
142
- (d) If the Work includes a "NOTICE" text file as part of its
143
- distribution, then any Derivative Works that You distribute must
144
- include a readable copy of the attribution notices contained
145
- within such NOTICE file, excluding those notices that do not
146
- pertain to any part of the Derivative Works, in at least one
147
- of the following places: within a NOTICE text file distributed
148
- as part of the Derivative Works; within the Source form or
149
- documentation, if provided along with the Derivative Works; or,
150
- within a display generated by the Derivative Works, if and
151
- wherever such third-party notices normally appear. The contents
152
- of the NOTICE file are for informational purposes only and
153
- do not modify the License. You may add Your own attribution
154
- notices within Derivative Works that You distribute, alongside
155
- or as an addendum to the NOTICE text from the Work, provided
156
- that such additional attribution notices cannot be construed
157
- as modifying the License.
158
-
159
- You may add Your own copyright statement to Your modifications and
160
- may provide additional or different license terms and conditions
161
- for use, reproduction, or distribution of Your modifications, or
162
- for any such Derivative Works as a whole, provided Your use,
163
- reproduction, and distribution of the Work otherwise complies with
164
- the conditions stated in this License.
165
-
166
- 5. Submission of Contributions. Unless You explicitly state otherwise,
167
- any Contribution intentionally submitted for inclusion in the Work
168
- by You to the Licensor shall be under the terms and conditions of
169
- this License, without any additional terms or conditions.
170
- Notwithstanding the above, nothing herein shall supersede or modify
171
- the terms of any separate license agreement you may have executed
172
- with Licensor regarding such Contributions.
173
-
174
- 6. Trademarks. This License does not grant permission to use the trade
175
- names, trademarks, service marks, or product names of the Licensor,
176
- except as required for reasonable and customary use in describing the
177
- origin of the Work and reproducing the content of the NOTICE file.
178
-
179
- 7. Disclaimer of Warranty. Unless required by applicable law or
180
- agreed to in writing, Licensor provides the Work (and each
181
- Contributor provides its Contributions) on an "AS IS" BASIS,
182
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
183
- implied, including, without limitation, any warranties or conditions
184
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
185
- PARTICULAR PURPOSE. You are solely responsible for determining the
186
- appropriateness of using or redistributing the Work and assume any
187
- risks associated with Your exercise of permissions under this License.
188
-
189
- 8. Limitation of Liability. In no event and under no legal theory,
190
- whether in tort (including negligence), contract, or otherwise,
191
- unless required by applicable law (such as deliberate and grossly
192
- negligent acts) or agreed to in writing, shall any Contributor be
193
- liable to You for damages, including any direct, indirect, special,
194
- incidental, or consequential damages of any character arising as a
195
- result of this License or out of the use or inability to use the
196
- Work (including but not limited to damages for loss of goodwill,
197
- work stoppage, computer failure or malfunction, or any and all
198
- other commercial damages or losses), even if such Contributor
199
- has been advised of the possibility of such damages.
200
-
201
- 9. Accepting Warranty or Additional Liability. While redistributing
202
- the Work or Derivative Works thereof, You may choose to offer,
203
- and charge a fee for, acceptance of support, warranty, indemnity,
204
- or other liability obligations and/or rights consistent with this
205
- License. However, in accepting such obligations, You may act only
206
- on Your own behalf and on Your sole responsibility, not on behalf
207
- of any other Contributor, and only if You agree to indemnify,
208
- defend, and hold each Contributor harmless for any liability
209
- incurred by, or claims asserted against, such Contributor by reason
210
- of your accepting any such warranty or additional liability.
211
-
212
- END OF TERMS AND CONDITIONS
213
-
214
- APPENDIX: How to apply the Apache License to your work.
215
-
216
- To apply the Apache License to your work, attach the following
217
- boilerplate notice, with the fields enclosed by brackets "[]"
218
- replaced with your own identifying information. (Don't include
219
- the brackets!) The text should be enclosed in the appropriate
220
- comment syntax for the file format. We also recommend that a
221
- file or class name and description of purpose be included on the
222
- same "printed page" as the copyright notice for easier
223
- identification within third-party archives.
224
-
225
- Copyright [yyyy] [name of copyright owner]
226
-
227
- Licensed under the Apache License, Version 2.0 (the "License");
228
- you may not use this file except in compliance with the License.
229
- You may obtain a copy of the License at
230
-
231
- http://www.apache.org/licenses/LICENSE-2.0
232
-
233
- Unless required by applicable law or agreed to in writing, software
234
- distributed under the License is distributed on an "AS IS" BASIS,
235
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
236
- See the License for the specific language governing permissions and
237
- limitations under the License.
@@ -1,6 +0,0 @@
1
- @echo off
2
- set TOPDIR=%~dp0..
3
- set OPTS=
4
- set MAIN_CLASS=net.sourceforge.pmd.util.treeexport.TreeExportCli
5
-
6
- java %PMD_JAVA_OPTS% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*
@@ -1,6 +0,0 @@
1
- @echo off
2
- set TOPDIR=%~dp0..
3
- set OPTS=
4
- set MAIN_CLASS=net.sourceforge.pmd.util.viewer.Viewer
5
-
6
- java %PMD_JAVA_OPTS% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*
@@ -1,6 +0,0 @@
1
- @echo off
2
- set TOPDIR=%~dp0..
3
- set OPTS=
4
- set MAIN_CLASS=net.sourceforge.pmd.cpd.CPD
5
-
6
- java %PMD_JAVA_OPTS% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*
@@ -1,6 +0,0 @@
1
- @echo off
2
- set TOPDIR=%~dp0..
3
- set OPTS=
4
- set MAIN_CLASS=net.sourceforge.pmd.cpd.GUI
5
-
6
- java %PMD_JAVA_OPTS% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*
@@ -1,51 +0,0 @@
1
- @echo off
2
- set TOPDIR=%~dp0..
3
- set OPTS=
4
- set MAIN_CLASS=net.sourceforge.pmd.util.fxdesigner.DesignerStarter
5
-
6
-
7
- :: sets the jver variable to the java version, eg 901 for 9.0.1+x or 180 for 1.8.0_171-b11
8
- :: sets the jvendor variable to either java (oracle) or openjdk
9
- for /f tokens^=1^,3^,4^,5^ delims^=.-_+^"^ %%j in ('java -version 2^>^&1 ^| find "version"') do (
10
- set jvendor=%%j
11
- if %%l EQU ea (
12
- set /A "jver=%%k00"
13
- ) else (
14
- set /A jver=%%k%%l%%m
15
- )
16
- )
17
-
18
- Set "jreopts="
19
- :: oracle java 9 and 10 has javafx included as a module
20
- if /I "%jvendor%" EQU "java" (
21
- if %jver% GEQ 900 (
22
- if %jver% LSS 1100 (
23
- :: enable reflection
24
- Set jreopts=--add-opens javafx.controls/javafx.scene.control.skin=ALL-UNNAMED
25
- )
26
- )
27
- )
28
-
29
- set "_needjfxlib=0"
30
- if /I "%jvendor%" EQU "openjdk" set _needjfxlib=1
31
- if /I "%jvendor%" EQU "java" (
32
- if %jver% GEQ 1100 set _needjfxlib=1
33
- )
34
- if %_needjfxlib% EQU 1 (
35
- if %jver% LSS 1000 (
36
- echo For openjfx at least java 10 is required.
37
- pause
38
- exit
39
- )
40
- if [%JAVAFX_HOME%] EQU [] (
41
- echo The environment variable JAVAFX_HOME is missing.
42
- pause
43
- exit
44
- )
45
- set "classpath=%TOPDIR%\lib\*;%JAVAFX_HOME%\lib\*"
46
- ) else (
47
- set "classpath=%TOPDIR%\lib\*"
48
- )
49
-
50
-
51
- java %PMD_JAVA_OPTS% %jreopts% -classpath "%classpath%" %OPTS% %MAIN_CLASS% %*
@@ -1,6 +0,0 @@
1
- @echo off
2
- set TOPDIR=%~dp0..
3
- set OPTS=
4
- set MAIN_CLASS=net.sourceforge.pmd.util.designer.Designer
5
-
6
- java %PMD_JAVA_OPTS% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*
@@ -1,6 +0,0 @@
1
- @echo off
2
- set TOPDIR=%~dp0..
3
- set OPTS=
4
- set MAIN_CLASS=net.sourceforge.pmd.PMD
5
-
6
- java %PMD_JAVA_OPTS% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*
@@ -1,221 +0,0 @@
1
- #!/bin/bash
2
-
3
- usage() {
4
- echo "Usage:"
5
- echo " $(basename $0) <application-name> [-h|-v] ..."
6
- echo ""
7
- echo "application-name: valid options are: $(valid_app_options)"
8
- echo "-h print this help"
9
- echo "-v display PMD's version"
10
- }
11
-
12
- valid_app_options () {
13
- echo "pmd, cpd, cpdgui, designer, bgastviewer, designerold, ast-dump"
14
- }
15
-
16
- is_cygwin() {
17
- case "$(uname)" in
18
- CYGWIN*|MINGW*)
19
- readonly cygwin=true
20
- ;;
21
- esac
22
- # OS specific support. $var _must_ be set to either true or false.
23
- if [ -z ${cygwin} ] ; then
24
- readonly cygwin=false
25
- fi
26
- }
27
-
28
- cygwin_paths() {
29
- # For Cygwin, switch paths to Windows format before running java
30
- if ${cygwin} ; then
31
- [ -n "${JAVA_HOME}" ] && JAVA_HOME=$(cygpath --windows "${JAVA_HOME}")
32
- [ -n "${JAVAFX_HOME}" ] && JAVAFX_HOME=$(cygpath --windows "${JAVAFX_HOME}")
33
- [ -n "${DIRECTORY}" ] && DIRECTORY=$(cygpath --windows "${DIRECTORY}")
34
- classpath=$(cygpath --path --windows "${classpath}")
35
- fi
36
- }
37
-
38
- convert_cygwin_vars() {
39
- # If cygwin, convert to Unix form before manipulating
40
- if ${cygwin} ; then
41
- [ -n "${JAVA_HOME}" ] && JAVA_HOME=$(cygpath --unix "${JAVA_HOME}")
42
- [ -n "${JAVAFX_HOME}" ] && JAVAFX_HOME=$(cygpath --unix "${JAVAFX_HOME}")
43
- [ -n "${CLASSPATH}" ] && CLASSPATH=$(cygpath --path --unix "${CLASSPATH}")
44
- fi
45
- }
46
-
47
- java_heapsize_settings() {
48
- local heapsize=${HEAPSIZE}
49
- case "${heapsize}" in
50
- [1-9]*[mgMG])
51
- readonly HEAPSIZE="-Xmx${heapsize}"
52
- ;;
53
- '')
54
- ;;
55
- *)
56
- echo "HEAPSIZE '${HEAPSIZE}' unknown (try: 1024m)"
57
- exit 1
58
- esac
59
- }
60
-
61
-
62
- set_lib_dir() {
63
- if [ -z ${LIB_DIR} ]; then
64
- # Allow for symlinks to this script
65
- if [ -L $0 ]; then
66
- local script_real_loc=$(readlink "$0")
67
- else
68
- local script_real_loc=$0
69
- fi
70
- local script_dir=$(dirname "${script_real_loc}")
71
- local cwd="${PWD}"
72
-
73
- cd "${script_dir}/../lib"
74
- readonly LIB_DIR=$(pwd -P)
75
- cd "${cwd}"
76
- fi
77
- }
78
-
79
- check_lib_dir() {
80
- if [ ! -e "${LIB_DIR}" ]; then
81
- echo "The jar directory [${LIB_DIR}] does not exist"
82
- fi
83
- }
84
-
85
- function script_exit() {
86
- echo $1 >&2
87
- exit 1
88
- }
89
-
90
- determine_java_version() {
91
- local full_ver=$(java -version 2>&1)
92
- # java_ver is eg "18" for java 1.8, "90" for java 9.0, "100" for java 10.0.x
93
- readonly java_ver=$(echo $full_ver | sed -n '{
94
- # replace early access versions, e.g. 11-ea with 11.0.0
95
- s/-ea/.0.0/
96
- # replace versions such as 10 with 10.0.0
97
- s/version "\([0-9]\{1,\}\)"/version "\1.0.0"/
98
- # extract the major and minor parts of the version
99
- s/^.* version "\(.*\)\.\(.*\)\..*".*$/\1\2/p
100
- }')
101
- # java_vendor is either java (oracle) or openjdk
102
- readonly java_vendor=$(echo $full_ver | sed -n -e 's/^\(.*\) version .*$/\1/p')
103
- }
104
-
105
- jre_specific_vm_options() {
106
- if [ "${APPNAME}" = "designer" ]
107
- then
108
- options=""
109
-
110
- if [ "$java_ver" -ge 80 ] && [ "$java_ver" -lt 90 ]
111
- then
112
- # no options needed for java8.
113
- options=""
114
- elif [ "$java_ver" -ge 90 ] && [ "$java_ver" -lt 110 ] && [ "$java_vendor" = "java" ]
115
- then
116
- # java9 and java10 from oracle contain javafx as a module
117
- # open internal module of javafx to reflection (for our TreeViewWrapper)
118
- options="--add-opens javafx.controls/javafx.scene.control.skin=ALL-UNNAMED"
119
- # The rest here is for RichtextFX
120
- options+=" --add-opens javafx.graphics/javafx.scene.text=ALL-UNNAMED"
121
- options+=" --add-opens javafx.graphics/com.sun.javafx.scene.text=ALL-UNNAMED"
122
- options+=" --add-opens javafx.graphics/com.sun.javafx.text=ALL-UNNAMED"
123
- options+=" --add-opens javafx.graphics/com.sun.javafx.geom=ALL-UNNAMED"
124
- # Warn of remaining illegal accesses
125
- options+=" --illegal-access=warn"
126
- elif [ "$java_vendor" = "openjdk" ] || ( [ "$java_vendor" = "java" ] && [ "$java_ver" -ge 110 ] )
127
- then
128
- # openjdk and java11 from oracle onwards do not contain javafx directly
129
- # there are no extra options either - javafx will be added to the classpath without modules
130
- options=""
131
- fi
132
-
133
- echo $options
134
- else
135
- echo ""
136
- fi
137
- }
138
-
139
- function add_pmd_classpath() {
140
- if [ -n "$classpath" ]; then
141
- classpath="$classpath:${LIB_DIR}/*"
142
- else
143
- classpath="${LIB_DIR}/*"
144
- fi
145
- }
146
-
147
- function add_openjfx_classpath() {
148
- if [ "${APPNAME}" = "designer" ]
149
- then
150
- if [ "$java_vendor" = "openjdk" ] && [ "$java_ver" -lt 100 ]
151
- then
152
- script_exit "For openjfx at least java 10 is required"
153
- elif [ "$java_vendor" = "openjdk" ] || ( [ "$java_vendor" = "java" ] && [ "$java_ver" -ge 110 ] )
154
- then
155
- # openjfx is required for openjdk builds and oracle java 11 or later
156
- if [ -z "${JAVAFX_HOME}" ]
157
- then
158
- script_exit "The environment variable JAVAFX_HOME is missing."
159
- else
160
- if [ -n "$classpath" ]; then
161
- classpath="$classpath:${JAVAFX_HOME}/lib/*"
162
- else
163
- classpath="${JAVAFX_HOME}/lib/*"
164
- fi
165
- fi
166
- fi
167
- fi
168
- }
169
-
170
- readonly APPNAME="${1}"
171
- if [ -z "${APPNAME}" ]; then
172
- usage
173
- exit 1
174
- fi
175
- shift
176
-
177
- case "${APPNAME}" in
178
- "pmd")
179
- readonly CLASSNAME="net.sourceforge.pmd.PMD"
180
- ;;
181
- "cpd")
182
- readonly CLASSNAME="net.sourceforge.pmd.cpd.CPD"
183
- ;;
184
- "designer")
185
- readonly CLASSNAME="net.sourceforge.pmd.util.fxdesigner.DesignerStarter"
186
- ;;
187
- "designerold")
188
- readonly CLASSNAME="net.sourceforge.pmd.util.designer.Designer"
189
- ;;
190
- "bgastviewer")
191
- readonly CLASSNAME="net.sourceforge.pmd.util.viewer.Viewer"
192
- ;;
193
- "cpdgui")
194
- readonly CLASSNAME="net.sourceforge.pmd.cpd.GUI"
195
- ;;
196
- "ast-dump")
197
- readonly CLASSNAME="net.sourceforge.pmd.util.treeexport.TreeExportCli"
198
- ;;
199
- *)
200
- echo "${APPNAME} is NOT a valid application name, valid options are:$(valid_app_options)"
201
- ;;
202
- esac
203
-
204
- is_cygwin
205
-
206
- set_lib_dir
207
- check_lib_dir
208
-
209
- convert_cygwin_vars
210
-
211
- classpath=$CLASSPATH
212
-
213
- add_pmd_classpath
214
- determine_java_version
215
- add_openjfx_classpath
216
-
217
- cygwin_paths
218
-
219
- java_heapsize_settings
220
-
221
- java ${HEAPSIZE} ${PMD_JAVA_OPTS} $(jre_specific_vm_options) -cp "${classpath}" "${CLASSNAME}" "$@"
Binary file