diff --git a/core/pom.xml b/core/pom.xml index db0ddb9ee6..780403b924 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -109,9 +109,9 @@ provided - com.github.mwiede + org.lucee jsch - 0.2.11 + 0.1.55 provided diff --git a/core/src/main/java/META-INF/MANIFEST.MF b/core/src/main/java/META-INF/MANIFEST.MF index 3ef3bffc42..6a937d8741 100644 --- a/core/src/main/java/META-INF/MANIFEST.MF +++ b/core/src/main/java/META-INF/MANIFEST.MF @@ -350,7 +350,7 @@ Require-Bundle: org.apache.commons.commons-codec;bundle-version=1.15.0, tagsoup;bundle-version=1.2.1.0002L, w3c.dom;bundle-version=1.1.0, org.lucee.commons.email;bundle-version=1.2.0, - com.github.mwiede.jsch;bundle-version=0.2.11, + org.lucee.jsch;bundle-version=0.1.55, org.lucee.jzlib;bundle-version=1.1.3, org.lucee.argon2;bundle-version=2.7.0, com.sun.jna;bundle-version=5.13.0, diff --git a/core/src/main/java/lucee/runtime/config/maven/MavenUpdateProvider.java b/core/src/main/java/lucee/runtime/config/maven/MavenUpdateProvider.java index 53d760a63a..0a893f5e48 100644 --- a/core/src/main/java/lucee/runtime/config/maven/MavenUpdateProvider.java +++ b/core/src/main/java/lucee/runtime/config/maven/MavenUpdateProvider.java @@ -1,7 +1,6 @@ package lucee.runtime.config.maven; import java.io.FileNotFoundException; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.SequenceInputStream; @@ -19,7 +18,6 @@ import org.osgi.framework.Version; import org.xml.sax.SAXException; -import lucee.commons.io.IOUtil; import lucee.commons.lang.StringUtil; import lucee.commons.net.http.HTTPResponse; import lucee.commons.net.http.Header; @@ -27,11 +25,10 @@ import lucee.runtime.exp.PageException; import lucee.runtime.op.Caster; import lucee.runtime.op.date.DateCaster; -import lucee.runtime.osgi.OSGiUtil; public class MavenUpdateProvider { - public static final int CONNECTION_TIMEOUT = 1000; + public static final int CONNECTION_TIMEOUT = 10000; public static final String DEFAULT_LIST_PROVIDER = "https://oss.sonatype.org/service/local/lucene/search"; // public static final String DEFAULT_REPOSITORY = "https://repo1.maven.org/maven2"; @@ -54,20 +51,6 @@ public class MavenUpdateProvider { private String repoSnapshots; private String repoReleases; - public static void main(String[] args) throws Exception { - MavenUpdateProvider provider = new MavenUpdateProvider(); - - // print.e(provider.list()); - - // print.e(provider.detail(OSGiUtil.toVersion("5.3.8.100-SNAPSHOT"))); - // print.e(provider.detail(OSGiUtil.toVersion("6.0.0.561-RC"))); - - IOUtil.copy(provider.getLoader(OSGiUtil.toVersion("5.3.8.100-SNAPSHOT")), new FileOutputStream("/Users/mic/tmp8/5.3.8.100-SNAPSHOT.jar.zip"), true, true); - IOUtil.copy(provider.getLoader(OSGiUtil.toVersion("6.0.0.572-RC")), new FileOutputStream("/Users/mic/tmp8/6.0.0.572-RC.jar.zip"), true, true); - IOUtil.copy(provider.getCore(OSGiUtil.toVersion("5.3.8.100-SNAPSHOT")), new FileOutputStream("/Users/mic/tmp8/5.3.8.100-SNAPSHOT.lco.zip"), true, true); - - } - public MavenUpdateProvider() { this.listProvider = DEFAULT_LIST_PROVIDER; this.repoSnapshots = DEFAULT_REPOSITORY_SNAPSHOT; diff --git a/core/src/main/java/lucee/runtime/config/s3/S3UpdateProvider.java b/core/src/main/java/lucee/runtime/config/s3/S3UpdateProvider.java index 86073e7558..b38450bee0 100644 --- a/core/src/main/java/lucee/runtime/config/s3/S3UpdateProvider.java +++ b/core/src/main/java/lucee/runtime/config/s3/S3UpdateProvider.java @@ -49,7 +49,7 @@ public final class S3UpdateProvider extends DefaultHandler { static { try { - DEFAULT_PROVIDER_LIST = new URL("https://s3.us-west-1.wasabisys.com/lucee-downloads/"); + DEFAULT_PROVIDER_LIST = new URL("https://lucee-downloads.s3.amazonaws.com/"); DEFAULT_PROVIDER_DETAILS = new URL[] { new URL("https://cdn.lucee.org/"), DEFAULT_PROVIDER_LIST }; } catch (MalformedURLException e) { @@ -251,7 +251,7 @@ else if (insideContents) { element.addKey(lastKey); - if (last3 == null || !last3.equals(element.getVersion().toString().substring(0, 6))) { + if (element.getVersion() != null && (last3 == null || !last3.equals(element.getVersion().toString().substring(0, 6)))) { last3P = last3; last3PKey = last3Key; last3 = element.getVersion().toString().substring(0, 6); diff --git a/loader/pom.xml b/loader/pom.xml index 5b83a95ac9..fcc35dbde8 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -368,9 +368,9 @@ provided - com.github.mwiede + org.lucee jsch - 0.2.8 + 0.1.55 provided diff --git a/test/general/ListVersion.cfc b/test/general/ListVersion.cfc new file mode 100644 index 0000000000..6942d0a61d --- /dev/null +++ b/test/general/ListVersion.cfc @@ -0,0 +1,30 @@ +component extends="org.lucee.cfml.test.LuceeTestCase" skip="true"{ + function beforeAll(){ + + } + + function run( testResults , testBox ) { + describe( "test listing external versions", function() { + + + it( title='test version listing', body=function( currentSpec ) { + var versions=LuceeVersionsList(); + expect(isArray(versions)).toBeTrue(); + expect(arrayLen(versions)>100).toBeTrue(); + }); + + it( title='test Maven specific version listing', body=function( currentSpec ) { + var versions=LuceeVersionsListMvn(); + expect(isArray(versions)).toBeTrue(); + expect(arrayLen(versions)>100).toBeTrue(); + }); + + it( title='test S3 specific version listing', body=function( currentSpec ) { + var versions=LuceeVersionsListS3(); + expect(isQuery(versions)).toBeTrue(); + expect(versions.recordcount>100).toBeTrue(); + }); + }); + } + +} \ No newline at end of file