Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump junit from 4.12 to 4.13.1 #354

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
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
31 changes: 23 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,21 @@ Check out the Website <http://www.graphstream-project.org/> 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 <http://www.graphstream-project.org/>.

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
<dependencies>
<dependency>
<groupId>org.graphstream</groupId>
<artifactId>gs-core</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
```

### Development Versions

Using <https://jitpack.io> one can also use any development version. Simply add the `jitpack` repository to the `pom.xml` of the project:

```xml
<repositories>
Expand All @@ -27,14 +40,16 @@ Simply add the `jitpack` repository to the `pom.xml`:
then, add the `gs-core` to your dependencies:

```xml
<dependency>
<groupId>com.github.graphstream</groupId>
<artifactId>gs-core</artifactId>
<version>2.0-alpha</version>
</dependency>
<dependencies>
<dependency>
<groupId>com.github.graphstream</groupId>
<artifactId>gs-core</artifactId>
<version>dev-SNAPSHOT</version>
</dependency>
</dependencies>
```

You can use any version of `gs-core` you need. Simply specify the desired version in the `<version>` 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 `<version>` 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

Expand Down
68 changes: 63 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
License along with this program. If not, see <http://www.gnu.org/licenses/>.
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. -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.graphstream</groupId>
<artifactId>gs-core</artifactId>
<version>2.0.0-SNAPSHOT</version>

<version>2.0</version>
<packaging>jar</packaging>

<name>gs-core</name>
<description>
The GraphStream library. With GraphStream you deal with
Expand All @@ -49,6 +50,57 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<!-- The GraphStream Team. -->
<developers>
<developer>
<id>hbrahimi</id>
<name>Hicham Brahimi</name>
<email>[email protected]</email>
<organization>LITIS</organization>
<organizationUrl>http://www.litislab.eu</organizationUrl>
</developer>

<developer>
<id>sbalev</id>
<name>Stefan Balev</name>
<email>[email protected]</email>
<organization>LITIS</organization>
<organizationUrl>http://www.litislab.eu</organizationUrl>
</developer>

<developer>
<id>jbaudry</id>
<name>Julien Baudry</name>
<email>[email protected]</email>
<organization>LITIS</organization>
<organizationUrl>http://www.litislab.eu</organizationUrl>
</developer>

<developer>
<id>adutot</id>
<name>Antoine Dutot</name>
<email>[email protected]</email>
<organization>LITIS</organization>
<organizationUrl>http://www.litislab.eu</organizationUrl>
</developer>

<developer>
<id>ypigne</id>
<name>Yoann Pigné</name>
<email>[email protected]</email>
<organization>University of Luxembourg</organization>
<organizationUrl>http://www.uni.lu</organizationUrl>
</developer>

<developer>
<id>gsavin</id>
<name>Guilhelm Savin</name>
<email>[email protected]</email>
<organization>LITIS</organization>
<organizationUrl>http://www.litislab.eu</organizationUrl>
</developer>
</developers>

<licenses>
<license>
<name>LGPL3</name>
Expand All @@ -67,6 +119,12 @@
<!-- This profile has to be enabled when releasing the package. It will
enable the sign phase. -->
<id>release</id>
<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
Expand All @@ -79,7 +137,7 @@
<executions>
<execution>
<id>sign-artifacts</id>
<phase>package</phase>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
Expand Down Expand Up @@ -286,7 +344,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13.1</version>
<optional>false</optional>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down