From dde2d9a4631041b3324dfab2095d9e95cf4a602d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Pigne=CC=81?= Date: Thu, 16 Jul 2020 12:41:41 +0200 Subject: [PATCH 1/5] Version bump --- README.md | 4 ++-- pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2500f482..7cb857f6 100644 --- a/README.md +++ b/README.md @@ -30,11 +30,11 @@ then, add the `gs-core` to your dependencies: com.github.graphstream gs-core - 2.0-alpha + 2.0 ``` -You can use any version of `gs-core` you need. Simply specify the desired version in the `` tag. The version can be a git tag name (e.g. `2.0-alpha`), a commit number, or a branch name followed by `-SNAPSHOT` (e.g. `dev-SNAPSHOT`). More details on the [possible versions on jitpack](https://jitpack.io/#graphstream/gs-core). +You can use any version of `gs-core` you need. Simply specify the desired version in the `` tag. The version can be a git tag name (e.g. `2.0`), a commit number, or a branch name followed by `-SNAPSHOT` (e.g. `dev-SNAPSHOT`). More details on the [possible versions on jitpack](https://jitpack.io/#graphstream/gs-core). ## User interface diff --git a/pom.xml b/pom.xml index 7d2806db..9dfc5501 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ org.graphstream gs-core - 2.0.0-SNAPSHOT + 2.0 gs-core From 32e14cf4fbb5a365e14ac7538144b29ad517b5c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Pigne=CC=81?= Date: Fri, 11 Sep 2020 15:59:21 +0200 Subject: [PATCH 2/5] fix http->https redirection --- .../stream/file/test/TestFileSourceBase.java | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src-test/org/graphstream/stream/file/test/TestFileSourceBase.java b/src-test/org/graphstream/stream/file/test/TestFileSourceBase.java index 1dd7d933..69916497 100644 --- a/src-test/org/graphstream/stream/file/test/TestFileSourceBase.java +++ b/src-test/org/graphstream/stream/file/test/TestFileSourceBase.java @@ -41,6 +41,7 @@ import java.io.StringReader; import java.net.URL; import java.net.URLConnection; +import java.net.HttpURLConnection; import org.graphstream.graph.Edge; import org.graphstream.graph.Graph; @@ -159,8 +160,40 @@ public void test_Access_ReadAll_URL() { try { URL url = new URL(anUndirectedTriangleHttpURL()); - URLConnection c = url.openConnection(); + HttpURLConnection c = (HttpURLConnection)url.openConnection(); c.setDefaultUseCaches(false); + c.setReadTimeout(5000); + c.addRequestProperty("Accept-Language", "en-US,en;q=0.8"); + c.addRequestProperty("User-Agent", "Mozilla"); + c.addRequestProperty("Referer", "google.com"); + boolean redirect = false; + int status = c.getResponseCode(); + if (status != HttpURLConnection.HTTP_OK) { + if (status == HttpURLConnection.HTTP_MOVED_TEMP + || status == HttpURLConnection.HTTP_MOVED_PERM + || status == HttpURLConnection.HTTP_SEE_OTHER) + redirect = true; + if (redirect) { + + // get redirect url from "location" header field + String newUrl = c.getHeaderField("Location"); + + // get the cookie if need, for login + String cookies = c.getHeaderField("Set-Cookie"); + + // open the new connection again + url = new URL(newUrl); + c = (HttpURLConnection) url.openConnection(); + c.setRequestProperty("Cookie", cookies); + c.addRequestProperty("Accept-Language", "en-US,en;q=0.8"); + c.addRequestProperty("User-Agent", "Mozilla"); + c.addRequestProperty("Referer", "google.com"); + + System.out.println("Redirect to URL : " + newUrl); + + } + + } input.addSink(graph); input.readAll(url); From 978ab0dcb5e8c027567d1257357ebd184ba39cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Pigne=CC=81?= Date: Fri, 11 Sep 2020 16:07:26 +0200 Subject: [PATCH 3/5] update pom.xml for sonatype and maven central publication --- pom.xml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 9dfc5501..78fa35f2 100644 --- a/pom.xml +++ b/pom.xml @@ -15,14 +15,15 @@ License along with this program. If not, see . The fact that you are presently reading this means that you have had knowledge of the CeCILL-C and LGPL licenses and that you accept their terms. --> - 4.0.0 org.graphstream gs-core 2.0 - + jar + gs-core The GraphStream library. With GraphStream you deal with @@ -49,6 +50,57 @@ UTF-8 + + + + hbrahimi + Hicham Brahimi + hicham.brahimi@graphstream-project.org + LITIS + http://www.litislab.eu + + + + sbalev + Stefan Balev + stefan.balev@graphstream-project.org + LITIS + http://www.litislab.eu + + + + jbaudry + Julien Baudry + julien.baudry@graphstream-project.org + LITIS + http://www.litislab.eu + + + + adutot + Antoine Dutot + antoine.dutot@graphstream-project.org + LITIS + http://www.litislab.eu + + + + ypigne + Yoann Pigné + yoann.pigne@graphstream-project.org + University of Luxembourg + http://www.uni.lu + + + + gsavin + Guilhelm Savin + guilhelm.savin@graphstream-project.org + LITIS + http://www.litislab.eu + + + LGPL3 @@ -67,6 +119,12 @@ release + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + @@ -79,7 +137,7 @@ sign-artifacts - package + verify sign From 18d5f00ca9984f9279c38bb70177fae5ab2a4319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Pigne=CC=81?= Date: Tue, 15 Sep 2020 11:56:51 +0200 Subject: [PATCH 4/5] update doc for MavenCentral --- README.md | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7cb857f6..1e04cf10 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,21 @@ Check out the Website for more information The release comes with a pre-packaged jar file named gs-core.jar that contains the GraphStream classes. To start using GraphStream, simply put it in your class path. You can download GraphStream on the [github releases pages](https://github.com/graphstream/gs-core/releases), or on the website . -Maven users, you may include gs-core as a dependency to your project using (https://jitpack.io). -Simply add the `jitpack` repository to the `pom.xml`: +Maven users may include major releases of `gs-core` as a dependency: + +```xml + + + org.graphstream + gs-core + 2.0 + + +``` + +### Development Versions + +Using one can also use any development version. Simply add the `jitpack` repository to the `pom.xml` of the project: ```xml @@ -27,11 +40,13 @@ Simply add the `jitpack` repository to the `pom.xml`: then, add the `gs-core` to your dependencies: ```xml - - com.github.graphstream - gs-core - 2.0 - + + + com.github.graphstream + gs-core + dev-SNAPSHOT + + ``` You can use any version of `gs-core` you need. Simply specify the desired version in the `` tag. The version can be a git tag name (e.g. `2.0`), a commit number, or a branch name followed by `-SNAPSHOT` (e.g. `dev-SNAPSHOT`). More details on the [possible versions on jitpack](https://jitpack.io/#graphstream/gs-core). From 2752817386cd8c988912c101cb87c81d90aee370 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2020 09:44:34 +0000 Subject: [PATCH 5/5] Bump junit from 4.12 to 4.13.1 Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1. - [Release notes](https://github.com/junit-team/junit4/releases) - [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md) - [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1) Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 78fa35f2..ab76b559 100644 --- a/pom.xml +++ b/pom.xml @@ -344,7 +344,7 @@ junit junit - 4.12 + 4.13.1 false test