Merge branch 'main' into jdt-diagnostics-via-symbols

This commit is contained in:
Martin Lippert
2023-08-01 10:13:38 +02:00
12 changed files with 297 additions and 31 deletions

64
.github/scripts/clear-s3-caches.sh vendored Executable file
View File

@@ -0,0 +1,64 @@
set -e
s3_path=$1
echo "Clearing S3 caches for path: ${s3_path}"
#Flush AWS Cloudfront Cache
invalidation_json=`aws cloudfront create-invalidation --distribution-id ECAO9Q8651L8M --output json --paths "/${s3_path}/*"`
echo "Invalidation response: ${invalidation_json}"
invalidation_id=`echo $invalidation_json | jq -r '.Invalidation.Id'`
invalidation_status=`echo $invalidation_json | jq -r '.Invalidation.Status'`
echo "ID=${invalidation_id} Status=${invalidation_status}"
while [ "${invalidation_status}" == "InProgress" ]
do
echo "Invalidation status: ${invalidation_status}"
sleep 3
invalidation_status=`aws cloudfront get-invalidation --distribution-id ECAO9Q8651L8M --id $invalidation_id --output json | jq -r '.Invalidation.Status'`
done
echo "Final invalidation status: ${invalidation_status}"
# Flush CloudFlare Cache
s3_url=s3://dist.springsource.com/${s3_path}
files=`aws s3 cp ${s3_url} . --recursive --include "*" --dryrun`
counter=0
json=""
NL=$'\n'
FILES_BATCH=7
for file in $files
do
if [[ "$counter" -eq 0 ]]; then
json="{\"files\": [${NL}"
fi
if [[ "$file" =~ ^"s3://dist.springsource.com" ]]; then
echo "Processing ${file}"
counter=$((counter+1))
path=${file:26}
json="${json}\"http://dist.springsource.com${path}\",${NL}\"https://dist.springsource.com${path}\",${NL}\"http://download.springsource.com${path}\",${NL}\"https://download.springsource.com${path}\",${NL}"
fi
if [[ "$counter" -eq "$FILES_BATCH" ]]; then
json="${json%,*}${NL}]}"
echo $json
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/purge_cache" \
-H "X-Auth-Email: spring-sysadmin@pivotal.io" \
-H "Authorization: Bearer ${CLOUDFLARE_CACHE_TOKEN}" \
-H "Content-Type: application/json" \
--data "${json}"
json=""
counter=0
fi
done
if ! [[ "$counter" -eq 0 ]]; then
json="${json%,*}${NL}]}"
echo $json
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/purge_cache" \
-H "X-Auth-Email: spring-sysadmin@pivotal.io" \
-H "Authorization: Bearer ${CLOUDFLARE_CACHE_TOKEN}" \
-H "Content-Type: application/json" \
--data "${json}"
fi

29
.github/workflows/clear_s3_cache.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Clear S3 Cache for path
on:
workflow_dispatch:
inputs:
path:
description: Path in the S3 bucket dist.springsource.com without leading slash
required: true
type: string
jobs:
clear-s3-cache:
runs-on: macos-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
ref: ${{ inputs.ref }}
sparse-checkout: |
.github
- name: Invalidate S3 Cloudfront Cache
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TOOLS_S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
run: |
${{ github.workspace }}/.github/scripts/clear-s3-caches.sh ${{ inputs.path }}

View File

@@ -11,6 +11,20 @@ on:
required: true
default: 'snapshot'
type: string
eclipse_profile:
description: Eclipse profile 'e427' etc
required: false
default: 'e427'
type: string
skip_tests:
description: skip ls tests execution
required: false
default: false
type: boolean
sts4-language-servers-version:
description: version of sts4 ls extensions
required: false
type: string
ref:
description: Git branch, tag, commit hash
required: false
@@ -25,6 +39,7 @@ jobs:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
sparse-checkout: |
.github
headless-services
eclipse-language-servers
- name: Set up JDK 17
@@ -34,16 +49,13 @@ jobs:
distribution: 'temurin'
- name: Enforce https instead of http
run: ./nohttp.sh
- name: Timestamp
id: timestamp
run: echo "name=date::$(date +'%Y%m%dT%H%M%S')" >> $GITHUB_OUTPUT
- name: Build Language Servers JARs
run: |
cd headless-services
if command -v xvfb-run ; then
xvfb-run ./mvnw --batch-mode clean install
xvfb-run ./mvnw --batch-mode clean install -DskipTests=${{ inputs.skip_tests }}
else
./mvnw --batch-mode clean install
./mvnw --batch-mode clean install -DskipTests=${{ inputs.skip_tests }}
fi
- name: Install GPG key
run: |
@@ -56,17 +68,34 @@ jobs:
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
gpg_keyname: ${{ secrets.GPG_KEYID }}
run: |
sts4_ls_version=${{ inputs.sts4-language-servers-version }}
sts4_ls_version_param=""
if ! [[ -z ${sts4_ls_version} ]]; then
sts4_ls_version_param="-Ddist.version=${sts4_ls_version}"
fi
cd eclipse-language-servers
if command -v xvfb-run ; then
xvfb-run ./mvnw --batch-mode clean deploy -Pe428 -P${{ inputs.build_type }} -Pgitactions -Pgpg.sign -DbuildNumber=${{ steps.timestamp.outputs.date }} -Dsigning.skip=true -Dhttpclient.retry-max=20 -Declipse.p2.mirrors=false -Ds3service.https-only=true -Dmaven.test.skip=true -Dtycho.localArtifacts=ignore
xvfb-run ./mvnw --batch-mode clean deploy -P${{ inputs.eclipse_profile }} -P${{ inputs.build_type }} $sts4_ls_version_param -Pgitactions -Pgpg.sign -Dmaven.test.skip=true -Dsigning.skip=true -Dhttpclient.retry-max=20 -Declipse.p2.mirrors=false -Ds3service.https-only=true -Dtycho.localArtifacts=ignore
else
./mvnw --batch-mode clean deploy -Pe428 -P${{ inputs.build_type }} -Pgitactions -Pgpg.sign -DbuildNumber=${{ steps.timestamp.outputs.date }} -Dsigning.skip=true -Dhttpclient.retry-max=20 -Declipse.p2.mirrors=false -Ds3service.https-only=true -Dmaven.test.skip=true -Dtycho.localArtifacts=ignore
./mvnw --batch-mode clean deploy -P${{ inputs.eclipse_profile }} -P${{ inputs.build_type }} $sts4_ls_version_param -Pgitactions -Pgpg.sign -Dmaven.test.skip=true -Dsigning.skip=true -Dhttpclient.retry-max=20 -Declipse.p2.mirrors=false -Ds3service.https-only=true -Dtycho.localArtifacts=ignore
fi
- name: Clear S3 Caches
if: ${{ inputs.build_type != 'snapshot' }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TOOLS_S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
run: |
dist_path=`cat ${{ github.workspace }}/eclipse-language-servers/org.springframework.tooling.ls.integration.repository/target/s3-p2-repo-dist-path.txt`
${{ github.workspace }}/.github/scripts/clear-s3-caches.sh $dist_path
- name: Verify Eclipse LS Extensions on e429
if: ${{ inputs.build_type == 'snapshot' }}
run: |
cd eclipse-language-servers
if command -v xvfb-run ; then
xvfb-run ./mvnw --batch-mode clean package -Pe429 -P${{ inputs.build_type }} -DbuildNumber=${{ steps.timestamp.outputs.timestamp }} -Dsigning.skip=true -Dhttpclient.retry-max=20 -Declipse.p2.mirrors=false -Ds3service.https-only=true -Dmaven.test.skip=true -Dtycho.localArtifacts=ignore
xvfb-run ./mvnw --batch-mode clean package -Pe429 -P${{ inputs.build_type }} -Dsigning.skip=true -Dhttpclient.retry-max=20 -Declipse.p2.mirrors=false -Ds3service.https-only=true -Dmaven.test.skip=true -Dtycho.localArtifacts=ignore
else
./mvnw --batch-mode clean package -Pe429 -P${{ inputs.build_type }} -DbuildNumber=${{ steps.timestamp.outputs.timestamp }} -Dsigning.skip=true -Dhttpclient.retry-max=20 -Declipse.p2.mirrors=false -Ds3service.https-only=true -Dmaven.test.skip=true -Dtycho.localArtifacts=ignore
./mvnw --batch-mode clean package -Pe429 -P${{ inputs.build_type }} -Dsigning.skip=true -Dhttpclient.retry-max=20 -Declipse.p2.mirrors=false -Ds3service.https-only=true -Dmaven.test.skip=true -Dtycho.localArtifacts=ignore
fi

View File

@@ -13,6 +13,14 @@ on:
required: true
default: 'snapshot'
type: string
sts4-language-servers-version:
description: version of sts4 ls extensions
required: false
type: string
p2-qualifier:
description: p2 qualifier to override
required: false
type: string
ref:
description: Git branch, tag, commit hash
required: false
@@ -49,8 +57,18 @@ jobs:
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
gpg_keyname: ${{ secrets.GPG_KEYID }}
run: |
sts4_ls_version=${{ inputs.sts4-language-servers-version }}
sts4_ls_version_param=""
if ! [[ -z ${sts4_ls_version} ]]; then
sts4_ls_version_param="-Dsts4-language-servers-version=${sts4_ls_version}"
fi
p2_qualifier=${{ inputs.p2-qualifier }}
p2_qualifier_param=""
if ! [[ -z ${p2_qualifier} ]]; then
p2_qualifier_param="-Dp2.qualifier=${p2_qualifier}"
fi
cd eclipse-distribution
./mvnw --batch-mode -U clean deploy -P${{ inputs.eclipse_profile }} -P${{ inputs.build_type }} -Pgitactions -Pgpg.sign -Dsigning.skip=true -Dmaven.repo.local=~/.m2/repository-signed -Dhttpclient.retry-max=20 -Dmaven.test.skip=true -Declipse.p2.mirrors=false -Dtycho.localArtifacts=ignore -Ds3service.https-only=true -Dp2.replaceQualifier=true -Dorg.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout=1200000 -Dorg.eclipse.equinox.p2.transport.ecf.retry=5 -Dskip.eclipserun.proxies=false -Dskip.osx.signing=true -Dskip.win.signing=true -Dskip.osx.notarizing=true -Dtycho.equinox.resolver.uses=true
./mvnw --batch-mode -U clean deploy -P${{ inputs.eclipse_profile }} -P${{ inputs.build_type }} $sts4_ls_version_param $p2_qualifier_param -Pgitactions -Pgpg.sign -Dsigning.skip=true -Dmaven.repo.local=~/.m2/repository-signed -Dhttpclient.retry-max=20 -Dmaven.test.skip=true -Declipse.p2.mirrors=false -Dtycho.localArtifacts=ignore -Ds3service.https-only=true -Dp2.replaceQualifier=true -Dorg.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout=1200000 -Dorg.eclipse.equinox.p2.transport.ecf.retry=5 -Dskip.eclipserun.proxies=false -Dskip.osx.signing=true -Dskip.win.signing=true -Dskip.osx.notarizing=true -Dtycho.equinox.resolver.uses=true
- name: Upload Linux Distro Build Artifacts
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TOOLS_S3_ACCESS_KEY }}
@@ -72,6 +90,17 @@ jobs:
aws s3 rm s3://dist.springsource.com/${dist_path} --recursive --exclude "*" --include "spring-tool-suite-4*linux*.tar.gz*" --exclude "*/*"
echo "Uploading new Linux .ta.gz files to s3..."
aws s3 cp . s3://dist.springsource.com/${dist_path} --recursive --exclude "*" --include "spring-tool-suite-4*linux*.tar.gz*" --exclude "*/*" --acl public-read --no-progress
- name: Clear S3 Caches for P2 Repo
if: ${{ inputs.build_type != 'snapshot' }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TOOLS_S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
run: |
dist_path=`cat ${{ github.workspace }}/eclipse-distribution/org.springframework.boot.ide.product.${{ inputs.eclipse_profile }}/target/s3-p2-repo-dist-path.txt`
${{ github.workspace }}/.github/scripts/clear-s3-caches.sh $dist_path
- name: Update Nightly Distro Downloads page
if: ${{ inputs.build_type == 'snapshot' && always() }}
env:
@@ -89,16 +118,19 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }}
run: |
echo "Uploading Win Zips and OSX tar.gz to S3 for signing..."
aws s3 cp ${{ github.workspace }}/eclipse-distribution/org.springframework.boot.ide.product.${{ inputs.eclipse_profile }}/target/products s3://dist.springsource.com/sts4-distro-ci-temp/${{ github.run_id }} --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip" --include "spring-tool-suite-4*macosx*.tar.gz" --exclude "*/*" --no-progress
id=${{ inputs.eclipse_profile }}-${{ inputs.build_type }}-${{ github.run_id }}
aws s3 cp ${{ github.workspace }}/eclipse-distribution/org.springframework.boot.ide.product.${{ inputs.eclipse_profile }}/target/products s3://dist.springsource.com/sts4-distro-ci-temp/$id --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip" --include "spring-tool-suite-4*macosx*.tar.gz" --exclude "*/*" --no-progress
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: s3-dist-path-${{ github.run_id }}.${{ github.run_attempt }}
name: s3-dist-path-${{ inputs.eclipse_profile }}-${{ inputs.build_type }}-${{ github.run_id }}
path: ${{ github.workspace }}/eclipse-distribution/org.springframework.boot.ide.product.${{ inputs.eclipse_profile }}/target/s3-dist-path.txt
retention-days: 1
outputs:
id: ${{ inputs.eclipse_profile }}-${{ inputs.build_type }}-${{ github.run_id }}
sign-win-distros:
needs: eclipse-distro-build
needs: [ eclipse-distro-build ]
runs-on: self-hosted
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
@@ -113,7 +145,7 @@ jobs:
rm -f spring-tool-suite-4*win*.zip*
rm -f spring-tool-suite-4*win*.self-extracting.jar*
ls
aws s3 mv s3://dist.springsource.com/sts4-distro-ci-temp/${{ github.run_id }} . --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip*" --exclude "*/*" --no-progress
aws s3 mv s3://dist.springsource.com/sts4-distro-ci-temp/${{ needs.eclipse-distro-build.outputs.id }} . --recursive --exclude "*" --include "spring-tool-suite-4*win*.zip*" --exclude "*/*" --no-progress
- name: Sign EXE within zip files
id: sign
env:
@@ -123,11 +155,11 @@ jobs:
files=`ls spring-tool-suite-4*win*.zip`
for file in $files
do
${{ github.workspace }}/.github/scripts/sign-exe-in-zip-file.sh $file ${{ github.workspace }}/.github/scripts/sign-exe.sh ${{ github.workspace }}/.github/scripts/self-extracting-jar-creator.jar ${{ github.run_id }}
${{ github.workspace }}/.github/scripts/sign-exe-in-zip-file.sh $file ${{ github.workspace }}/.github/scripts/sign-exe.sh ${{ github.workspace }}/.github/scripts/self-extracting-jar-creator.jar ${{ needs.eclipse-distro-build.outputs.id }}
done
- uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281
with:
name: s3-dist-path-${{ github.run_id }}.${{ github.run_attempt }}
name: s3-dist-path-${{ needs.eclipse-distro-build.outputs.id }}
- name: Update Win zip/jar on S3
id: update-s3
env:
@@ -159,11 +191,11 @@ jobs:
SSH_KEY: ~/.ssh/id_rsa
SSH_USER: signer
run: |
ssh -i $SSH_KEY $SSH_USER@vm-tools.spring.vmware.com -- rm -rf /opt/bamboo/${{ github.run_id }}
ssh -i $SSH_KEY $SSH_USER@vm-tools.spring.vmware.com -- rm -rf /opt/bamboo/${{ needs.eclipse-distro-build.outputs.id }}
rm -rf *spring-tool-suite-4*win*
sign-osx-distros:
needs: eclipse-distro-build
needs: [ eclipse-distro-build ]
runs-on: macos-latest-xl
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
@@ -200,7 +232,7 @@ jobs:
run: |
rm -rf *macosx*
ls
aws s3 mv s3://dist.springsource.com/sts4-distro-ci-temp/${{ github.run_id }} . --recursive --exclude "*" --include "spring-tool-suite-4*macosx*.tar.gz" --exclude "*/*" --no-progress
aws s3 mv s3://dist.springsource.com/sts4-distro-ci-temp/${{ needs.eclipse-distro-build.outputs.id }} . --recursive --exclude "*" --include "spring-tool-suite-4*macosx*.tar.gz" --exclude "*/*" --no-progress
- name: Sign .app, Create and Sign DMG
env:
MACOS_CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }}
@@ -227,8 +259,8 @@ jobs:
echo "Done signing and notarization of DMG files"
- uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281
with:
name: s3-dist-path-${{ github.run_id }}.${{ github.run_attempt }}
- name: Update Win zip/jar on S3
name: s3-dist-path-${{ needs.eclipse-distro-build.outputs.id }}
- name: Update GMG files on S3
id: update-s3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TOOLS_S3_ACCESS_KEY }}
@@ -258,10 +290,28 @@ jobs:
rm -rf *spring-tool-suite-4*macosx*
cleanup:
needs: [ sign-win-distros, sign-osx-distros ]
needs: [ eclipse-distro-build, sign-win-distros, sign-osx-distros ]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
sparse-checkout: |
.github
- uses: actions/download-artifact@cbed621e49e4c01b044d60f6c80ea4ed6328b281
with:
name: s3-dist-path-${{ needs.eclipse-distro-build.outputs.id }}
- name: Clear S3 Caches for Distros
if: ${{ inputs.build_type != 'snapshot' }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TOOLS_S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_CACHE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
run: |
dist_path=`cat s3-dist-path.txt`
${{ github.workspace }}/.github/scripts/clear-s3-caches.sh $dist_path
- name: Remove Temp Build Artifacts from S3
id: cleanup-s3-temp-storage
env:
@@ -269,4 +319,4 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
run: |
aws s3 rm s3://dist.springsource.com/sts4-distro-ci-temp --recursive --exclude "*" --include "${{ github.run_id }}/*"
aws s3 rm s3://dist.springsource.com/sts4-distro-ci-temp --recursive --exclude "*" --include "${{ needs.eclipse-distro-build.outputs.id }}/*"

View File

@@ -0,0 +1,42 @@
name: Release - Eclipse Distros Build
concurrency:
group: release-eclipse
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
sts4-language-servers-version:
description: Last segments of an s3 path for p2 Repo for eclipse ls extensions
required: true
type: string
jobs:
e427-distro:
uses: ./.github/workflows/gh-hosted-eclipse-distro-build.yml
with:
eclipse_profile: 'e427'
build_type: 'release'
p2-qualifier: 'RELEASE'
sts4-language-servers-version: ${{ inputs.sts4-language-servers-version }}
secrets: inherit
e428-distro:
uses: ./.github/workflows/gh-hosted-eclipse-distro-build.yml
with:
eclipse_profile: 'e428'
build_type: 'release'
p2-qualifier: 'RELEASE'
sts4-language-servers-version: ${{ inputs.sts4-language-servers-version }}
secrets: inherit
e429-distro:
uses: ./.github/workflows/gh-hosted-eclipse-distro-build.yml
with:
eclipse_profile: 'e429'
build_type: 'release'
p2-qualifier: 'RELEASE'
sts4-language-servers-version: ${{ inputs.sts4-language-servers-version }}
secrets: inherit

View File

@@ -0,0 +1,24 @@
name: Release - Eclipse LS Extensions Build
concurrency:
group: release-eclipse-ls-extensions
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
sts4-language-servers-version:
description: Last segments of an s3 path for p2 Repo for eclipse ls extensions
required: true
type: string
jobs:
eclipse-ls-extension:
uses: ./.github/workflows/eclipse-ls-extensions-build.yml
with:
eclipse_profile: 'e427'
build_type: 'release'
skip_tests: true
sts4-language-servers-version: ${{ inputs.sts4-language-servers-version }}
secrets: inherit

View File

@@ -387,6 +387,9 @@
<echo file="${project.build.directory}/s3-dist-path.txt">
${dist.path.product}
</echo>
<echo file="${project.build.directory}/s3-p2-repo-dist-path.txt">
${dist.path.repo}
</echo>
</target>
</configuration>
<goals>

View File

@@ -375,6 +375,9 @@
<echo file="${project.build.directory}/s3-dist-path.txt">
${dist.path.product}
</echo>
<echo file="${project.build.directory}/s3-p2-repo-dist-path.txt">
${dist.path.repo}
</echo>
</target>
</configuration>
<goals>

View File

@@ -388,6 +388,9 @@
<echo file="${project.build.directory}/s3-dist-path.txt">
${dist.path.product}
</echo>
<echo file="${project.build.directory}/s3-p2-repo-dist-path.txt">
${dist.path.repo}
</echo>
</target>
</configuration>
<goals>

View File

@@ -35,6 +35,20 @@
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>generate-s3-upload-info</id>
<phase>verify</phase>
<configuration>
<target>
<echo file="${project.build.directory}/s3-p2-repo-dist-path.txt">
${dist.path}
</echo>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>upload-repo</id>
<phase>deploy</phase>

View File

@@ -113,9 +113,9 @@
<commons-codec-version>1.13</commons-codec-version>
<!-- Rewrite specific properties -->
<rewrite-version>8.2.0-SNAPSHOT</rewrite-version>
<rewrite-spring-version>5.1.0-SNAPSHOT</rewrite-spring-version>
<rewrite-gradle-tooling-api-version>1.2.0-SNAPSHOT</rewrite-gradle-tooling-api-version>
<rewrite-version>8.1.13</rewrite-version>
<rewrite-spring-version>5.0.6</rewrite-spring-version>
<rewrite-gradle-tooling-api-version>1.1.2</rewrite-gradle-tooling-api-version>
<gradle-tooling.version>7.6</gradle-tooling.version>
<gradle-core.version>6.1.1</gradle-core.version>

View File

@@ -399,14 +399,19 @@ public class SpringSymbolIndex implements InitializingBean, SpringIndex {
return CompletableFuture.completedFuture(null);
} else {
removeSymbolsByProject(project);
springIndex.removeBeans(project.getElementName());
@SuppressWarnings("unchecked")
CompletableFuture<Void>[] futures = new CompletableFuture[this.indexers.length];
CompletableFuture<Void>[] futures = new CompletableFuture[this.indexers.length + 1];
// clean future
futures[0] = CompletableFuture.runAsync(() -> {
removeSymbolsByProject(project);
springIndex.removeBeans(project.getElementName());
}, this.updateQueue);
// index futures
for (int i = 0; i < this.indexers.length; i++) {
InitializeProject initializeItem = new InitializeProject(project, this.indexers[i], clean);
futures[i] = CompletableFuture.runAsync(initializeItem, this.updateQueue);
futures[i + 1] = CompletableFuture.runAsync(initializeItem, this.updateQueue);
}
CompletableFuture<Void> future = CompletableFuture.allOf(futures);