forked from eclipse-jdtls/eclipse.jdt.ls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
90 lines (85 loc) · 2.97 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http:https://maven.apache.org/POM/4.0.0" xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:https://maven.apache.org/POM/4.0.0 http:https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.jdt.ls</groupId>
<artifactId>parent</artifactId>
<version>1.16.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jdt.ls.core</artifactId>
<packaging>eclipse-plugin</packaging>
<name>${base.name} :: Core</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.kotcrab.remark</groupId>
<artifactId>remark</artifactId>
<version>1.2.0</version>
</artifactItem>
<artifactItem>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.14.2</version>
</artifactItem>
</artifactItems>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<?m2e ignore?>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
import groovy.json.JsonSlurper
import groovy.json.JsonOutput
def checksumsFile = new File(project.basedir.absolutePath, "gradle/checksums/checksums.json")
if (System.getProperty("eclipse.jdt.ls.skipGradleChecksums") != null && checksumsFile.exists()) {
println "Skipping gradle wrapper validation checksums ..."
return
}
def versionUrl = new URL("https://services.gradle.org/versions/all")
def versionStr = versionUrl.text;
def versionsFile = new File(project.basedir.absolutePath, "gradle/checksums/versions.json")
versionsFile.parentFile.mkdirs() //just in case
versionsFile.write(versionStr)
println "Wrote to ${versionsFile}"
def versions = new JsonSlurper().parseText(versionStr);
class Checksum { String wrapperChecksumUrl; String sha256 }
def checksums = []
versions.each {
if (it.wrapperChecksumUrl) {
def sha256url = new URL(it.wrapperChecksumUrl)
try {
println "Fetching ${it.wrapperChecksumUrl}"
def sha256 = sha256url.text
def checksum = new Checksum(wrapperChecksumUrl: it.wrapperChecksumUrl, sha256: sha256);
checksums.add(checksum)
} catch(Exception e) {
println e.message
}
}
}
def json = JsonOutput.toJson(checksums)
checksumsFile.write(JsonOutput.prettyPrint(json))
println "Wrote to ${checksumsFile}"
</source>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>