diff --git a/.github/workflows/experimental-eclipse-distro-build.yml b/.github/workflows/experimental-eclipse-distro-build.yml index 80a97b82f..aa57730db 100644 --- a/.github/workflows/experimental-eclipse-distro-build.yml +++ b/.github/workflows/experimental-eclipse-distro-build.yml @@ -125,9 +125,11 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }} run: | dist_path=`cat s3-dist-path.txt` - ls spring-tool-suite-4*.zip* - aws s3 sync rm spring-tool-suite-4*.zip* s3://dist.springsource.com/${dist_path} - aws s3 sync cp spring-tool-suite-4*.zip* s3://dist.springsource.com/${dist_path} - ls spring-tool-suite-4*.jar* - aws s3 sync rm spring-tool-suite-4*.jar* s3://dist.springsource.com/${dist_path} - aws s3 sync cp spring-tool-suite-4*.jar* s3://dist.springsource.com/${dist_path} + + ls spring-tool-suite-4*win*.zip* + aws s3 sync rm s3://dist.springsource.com/${dist_path} --exclude "*" --include "spring-tool-suite-4*win*.zip*" + aws s3 sync cp s3://dist.springsource.com/${dist_path} . --exclude "*" --include "spring-tool-suite-4*win*.zip*" + + ls spring-tool-suite-4*win*.jar* + aws s3 sync rm s3://dist.springsource.com/${dist_path} --exclude "*" --include "spring-tool-suite-4*win*.jar*" + aws s3 sync cp s3://dist.springsource.com/${dist_path} . --exclude "*" --include "spring-tool-suite-4*win*.jar*" diff --git a/eclipse-distribution/local-build.sh b/eclipse-distribution/local-build.sh index 6fb3b03d2..787abe5f3 100755 --- a/eclipse-distribution/local-build.sh +++ b/eclipse-distribution/local-build.sh @@ -1,2 +1,2 @@ -./mvnw clean install -Pe428 -Psnapshot -Dsigning.skip=true -Dhttpclient.retry-max=20 -Dmaven.test.skip=true -Declipse.p2.mirrors=false -Dtycho.localArtifacts=ignore -Dorg.eclipse.equinox.p2.transport.ecf.retry=5 -Dskip.osx.signing=true -Dskip.win.signing=true -Dskip.osx.notarizing=true +./mvnw clean package -Pe428 -Psnapshot -Dsigning.skip=true -Dhttpclient.retry-max=20 -Dmaven.test.skip=true -Declipse.p2.mirrors=false -Dtycho.localArtifacts=ignore -Dorg.eclipse.equinox.p2.transport.ecf.retry=5 -Dskip.osx.signing=true -Dskip.win.signing=true -Dskip.osx.notarizing=true diff --git a/eclipse-extensions/org.springframework.ide.eclipse.boot.dash.docker/src/org/springframework/ide/eclipse/boot/dash/docker/runtarget/DockerDeployments.java b/eclipse-extensions/org.springframework.ide.eclipse.boot.dash.docker/src/org/springframework/ide/eclipse/boot/dash/docker/runtarget/DockerDeployments.java index 4723c8763..c5a8021c7 100644 --- a/eclipse-extensions/org.springframework.ide.eclipse.boot.dash.docker/src/org/springframework/ide/eclipse/boot/dash/docker/runtarget/DockerDeployments.java +++ b/eclipse-extensions/org.springframework.ide.eclipse.boot.dash.docker/src/org/springframework/ide/eclipse/boot/dash/docker/runtarget/DockerDeployments.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 Pivotal, Inc. + * Copyright (c) 2020, 2023 Pivotal, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,7 @@ *******************************************************************************/ package org.springframework.ide.eclipse.boot.dash.docker.runtarget; +import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -21,6 +22,7 @@ import org.springsource.ide.eclipse.commons.livexp.core.AbstractDisposable; import org.springsource.ide.eclipse.commons.livexp.core.LiveCounter; import org.springsource.ide.eclipse.commons.livexp.core.OnDispose; import org.springsource.ide.eclipse.commons.livexp.util.Log; +import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor; @@ -73,7 +75,18 @@ public class DockerDeployments extends AbstractDisposable { } private Yaml yaml() { - return new Yaml(new CustomClassLoaderConstructor(DockerDeploymentList.class, DockerDeployments.class.getClassLoader())); + // e429 is based on snakeyaml 2.0 which has a non-backward compatible change in CustomClassLoaderConstructor cosntrcutors + try { + CustomClassLoaderConstructor cclc = CustomClassLoaderConstructor.class.getConstructor(Class.class, ClassLoader.class).newInstance(DockerDeploymentList.class, DockerDeployments.class.getClassLoader()); + return new Yaml(cclc); + } catch (Exception e) { + try { + CustomClassLoaderConstructor cclc = CustomClassLoaderConstructor.class.getConstructor(Class.class, ClassLoader.class, LoaderOptions.class).newInstance(DockerDeploymentList.class, DockerDeployments.class.getClassLoader(), new LoaderOptions()); + return new Yaml(cclc); + } catch (Exception e1) { + throw new IllegalStateException(e1); + } + } } public void createOrUpdate(DockerDeployment deployment) { diff --git a/eclipse-extensions/org.springframework.ide.eclipse.boot.refactoring/src/org/springframework/ide/eclipse/boot/refactoring/PropertiesToYamlConverter.java b/eclipse-extensions/org.springframework.ide.eclipse.boot.refactoring/src/org/springframework/ide/eclipse/boot/refactoring/PropertiesToYamlConverter.java index 539367962..aee77cbc9 100644 --- a/eclipse-extensions/org.springframework.ide.eclipse.boot.refactoring/src/org/springframework/ide/eclipse/boot/refactoring/PropertiesToYamlConverter.java +++ b/eclipse-extensions/org.springframework.ide.eclipse.boot.refactoring/src/org/springframework/ide/eclipse/boot/refactoring/PropertiesToYamlConverter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2017 Spring IDE Developers + * Copyright (c) 2017, 2023 Spring IDE Developers * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -24,6 +24,7 @@ import org.springframework.ide.eclipse.editor.support.yaml.path.YamlPath; import org.springframework.ide.eclipse.editor.support.yaml.path.YamlPathSegment; import org.springframework.ide.eclipse.editor.support.yaml.path.YamlPathSegment.AtIndex; import org.yaml.snakeyaml.DumperOptions; +import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.SafeConstructor; import org.yaml.snakeyaml.representer.Representer; @@ -161,7 +162,7 @@ public class PropertiesToYamlConverter { options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); options.setPrettyFlow(true); - Yaml yaml = new Yaml(new SafeConstructor(), new Representer(options), options); + Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()), new Representer(options), options); this.output = yaml.dump(object); } diff --git a/eclipse-extensions/org.springframework.ide.eclipse.boot.wizard/src/org/springframework/ide/eclipse/boot/wizard/starters/eclipse/ResourceCompareInput.java b/eclipse-extensions/org.springframework.ide.eclipse.boot.wizard/src/org/springframework/ide/eclipse/boot/wizard/starters/eclipse/ResourceCompareInput.java index c5a729122..1315481ab 100644 --- a/eclipse-extensions/org.springframework.ide.eclipse.boot.wizard/src/org/springframework/ide/eclipse/boot/wizard/starters/eclipse/ResourceCompareInput.java +++ b/eclipse-extensions/org.springframework.ide.eclipse.boot.wizard/src/org/springframework/ide/eclipse/boot/wizard/starters/eclipse/ResourceCompareInput.java @@ -21,9 +21,11 @@ *******************************************************************************/ package org.springframework.ide.eclipse.boot.wizard.starters.eclipse; +import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; +import java.io.IOException; import java.io.InputStream; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; @@ -466,7 +468,29 @@ public class ResourceCompareInput extends CompareEditorInput { } byte[] initialContent() throws CoreException { - return Utilities.readBytes(createStream()); + InputStream in = createStream(); + ByteArrayOutputStream bos= new ByteArrayOutputStream(); + try { + while (true) { + int c= in.read(); + if (c == -1) + break; + bos.write(c); + } + + } catch (IOException ex) { + return null; + + } finally { + Utilities.close(in); + try { + bos.close(); + } catch (IOException x) { + // silently ignored + } + } + + return bos.toByteArray(); } @Override