Skip to content
This repository was archived by the owner on Jan 31, 2024. It is now read-only.

Bundle OpenJDK 11 #37

Merged
merged 2 commits into from
Feb 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10.14.1
FROM node:10.15.1

ARG KIBANA_VERSION

Expand Down
2 changes: 0 additions & 2 deletions .ci/script/docker/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ docker rm -v $(docker ps -a -q)
docker volume prune -f

[ -e ./repository ] && rm -rf ./repository
[ -e ./build ] && rm -rf ./build
[ -e ./lib ] && rm -rf ./lib

exit 0
19 changes: 15 additions & 4 deletions .ci/script/docker/deploy_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

if [ $# -eq 0 ]; then
echo "deploy snapshot package.."
KIBANA_VERSION=7.0.0
KIBANA_VERSION=8.0.0
DESTINATION=snapshot/
CMD="./mvnw clean verify -B -e && \\"
elif [ $# -eq 2 ]; then
Expand Down Expand Up @@ -40,6 +40,17 @@ docker run \
/bin/bash -c "set -x && \
$CMD
./mvnw -DskipTests=true clean deploy -DaltDeploymentRepository=dev::default::file:./repository -B -e -Pserver-distro && \
mv org.elastic.jdt.ls.product/distro/jdt-language-server* lib && \
yarn kbn bootstrap && echo $KIBANA_VERSION | yarn build && \
aws s3 cp build/java_languageserver-*.zip s3://download.elasticsearch.org/code/java-langserver/$DESTINATION"
yarn kbn bootstrap && \
jq '.version=\"\\(.version)-linux\"' package.json > package-linux.json && \
jq '.version=\"\\(.version)-darwin\"' package.json > package-darwin.json && \
jq '.version=\"\\(.version)-windows\"' package.json > package-windows.json && \
for PLATFORM in linux darwin windows
do
mv org.elastic.jdt.ls.product/distro/jdt-language-server*\$PLATFORM* lib
mv package-\$PLATFORM.json package.json
echo $KIBANA_VERSION | yarn build
aws s3 cp build/java_languageserver-*.zip s3://download.elasticsearch.org/code/java-langserver/$DESTINATION
[ -e ./build ] && rm -rf ./build
[ -e ./lib ] && rm -rf ./lib
done"

83 changes: 80 additions & 3 deletions org.elastic.jdt.ls.product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,49 @@
</activation>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>install-openJDK-osx</id>
<phase>package</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://download.java.net/java/GA/jdk${jdkMajor}/${jdkBuild}/GPL/openjdk-${jdkVersion}_osx-x64_bin.tar.gz</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}/jdks/openjdk-${jdkVersion}_osx</outputDirectory>
</configuration>
</execution>
<execution>
<id>install-openJDK-linux</id>
<phase>package</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://download.java.net/java/GA/jdk${jdkMajor}/${jdkBuild}/GPL/openjdk-${jdkVersion}_linux-x64_bin.tar.gz</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}/jdks/openjdk-${jdkVersion}_linux</outputDirectory>
</configuration>
</execution>
<execution>
<id>install-openJDK-windows</id>
<phase>package</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://download.java.net/java/GA/jdk${jdkMajor}/${jdkBuild}/GPL/openjdk-${jdkVersion}_windows-x64_bin.zip</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}/jdks/openjdk-${jdkVersion}_windows</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- get major.minor.incremental from this pom, then use ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}
to use the x.y.z version without the -SNAPSHOT suffix -->
<plugin>
Expand Down Expand Up @@ -187,19 +230,53 @@
<version>2.6</version>
<executions>
<execution>
<id>pack-for-distribution</id>
<id>pack-for-distribution-linux</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<outputDirectory>distro</outputDirectory>
<!-- define custom output filename -->
<finalName>jdt-language-server-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-linux-${timestamp}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<tarLongFileMode>posix</tarLongFileMode>
<descriptors>
<descriptor>publish-assembly-linux.xml</descriptor>
</descriptors>
</configuration>
</execution>
<execution>
<id>pack-for-distribution-darwin</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<outputDirectory>distro</outputDirectory>
<!-- define custom output filename -->
<finalName>jdt-language-server-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-darwin-${timestamp}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<tarLongFileMode>posix</tarLongFileMode>
<descriptors>
<descriptor>publish-assembly-darwin.xml</descriptor>
</descriptors>
</configuration>
</execution>
<execution>
<id>pack-for-distribution-windows</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<outputDirectory>distro</outputDirectory>
<!-- define custom output filename -->
<finalName>jdt-language-server-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-${timestamp}</finalName>
<finalName>jdt-language-server-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-windows-${timestamp}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<tarLongFileMode>posix</tarLongFileMode>
<descriptors>
<descriptor>publish-assembly.xml</descriptor>
<descriptor>publish-assembly-windows.xml</descriptor>
</descriptors>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${basedir}/target/repository</directory>
<directory>${basedir}/target</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>config_linux/**</include>
<include>config_mac/**</include>
<include>config_win/**</include>
<include>features/**</include>
<include>plugins/**</include>
<include>repository/config_linux/**</include>
<include>repository/config_mac/**</include>
<include>repository/config_win/**</include>
<include>repository/features/**</include>
<include>repository/plugins/**</include>
<include>jdks/openjdk-*_osx/**</include>
</includes>
<excludes>
<exclude>**/*.pack.gz</exclude>
Expand Down
27 changes: 27 additions & 0 deletions org.elastic.jdt.ls.product/publish-assembly-linux.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>publish</id>
<formats>
<format>dir</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${basedir}/target</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>repository/config_linux/**</include>
<include>repository/config_mac/**</include>
<include>repository/config_win/**</include>
<include>repository/features/**</include>
<include>repository/plugins/**</include>
<include>jdks/openjdk-*_linux/**</include>
</includes>
<excludes>
<exclude>**/*.pack.gz</exclude>
</excludes>
<fileMode>755</fileMode>
</fileSet>
</fileSets>
</assembly>
27 changes: 27 additions & 0 deletions org.elastic.jdt.ls.product/publish-assembly-windows.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>publish</id>
<formats>
<format>dir</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${basedir}/target</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>repository/config_linux/**</include>
<include>repository/config_mac/**</include>
<include>repository/config_win/**</include>
<include>repository/features/**</include>
<include>repository/plugins/**</include>
<include>jdks/openjdk-*_windows/**</include>
</includes>
<excludes>
<exclude>**/*.pack.gz</exclude>
</excludes>
<fileMode>755</fileMode>
</fileSet>
</fileSets>
</assembly>
25 changes: 14 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<properties>
<base.name>JDT Language Server</base.name>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tycho-version>1.2.0</tycho-version>
<tycho-version>1.3.0</tycho-version>
<tycho-extras-version>${tycho-version}</tycho-extras-version>
<tycho.scmUrl>scm:git:https://github.com/elastic/java-langserver.git</tycho.scmUrl>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
Expand All @@ -20,6 +20,9 @@
<!-- skip for local builds, set it to true on elastic.org infrastructure -->
<cbi.jarsigner.skip>true</cbi.jarsigner.skip>
<generateSourceRef>true</generateSourceRef>
<jdkVersion>11.0.2</jdkVersion>
<jdkMajor>11</jdkMajor>
<jdkBuild>9</jdkBuild>
</properties>
<modules>
<module>org.elastic.jdt.ls.target</module>
Expand Down Expand Up @@ -366,15 +369,15 @@
<id>cbi-release</id>
<url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
</pluginRepository>
<pluginRepository>
<id>sonatype-public-repository</id>
<url>https://oss.sonatype.org/content/groups/public</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<!-- <distributionManagement>
<snapshotRepository>
<id>download.elasticsearch.org</id>
<url>s3://download.elasticsearch.org/code/java-langserver/snapshot</url>
</snapshotRepository>
<repository>
<id>download.elasticsearch.org</id>
<url>s3://download.elasticsearch.org/code/java-langserver/release</url>
</repository>
</distributionManagement> -->
</project>