Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Commit c887dec

Browse files
tholuFagnerMartinsBrack
authored andcommitted
Fix dependencies, Travis build, and Integration test (#19)
1 parent e16402c commit c887dec

File tree

10 files changed

+96
-79
lines changed

10 files changed

+96
-79
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
/node_modules
44
/bower_components
55
/release.properties
6-
/pom.xml.releaseBackup
6+
/pom.xml.releaseBackup
7+
*.iml
8+
.idea

.travis.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
language: java
22

33
jdk:
4-
- oraclejdk7
5-
- openjdk6
4+
- oraclejdk8
5+
- oraclejdk9
6+
- oraclejdk11
7+
- openjdk8
8+
- openjdk10
9+
- openjdk11

CONTRIBUTING.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@
44
- If reporting a bug, please add a [simplified example](http://sscce.org/).
55

66
## Pull requests
7+
78
- Create a new topic branch for every separate change you make.
89
- Create a test case if you are fixing a bug or implementing an important feature.
910
- Make sure the build runs successfully [(see below)](#development).
1011

1112
## Development
1213

1314
### Tools
15+
1416
We use the following tools for development:
1517

1618
- [Maven](https://maven.apache.org/) for Java Build.
17-
- [NodeJS](http://nodejs.org/download/) required to run grunt.
18-
- [Grunt](http://gruntjs.com/getting-started) for JavaScript task management.
19+
- [NodeJS](https://nodejs.org/en/download/) used for NPM (installed by Maven automatically).
20+
- [NPM](https://www.npmjs.com) used to install Bower (installed by Maven automatically).
21+
- [Bower](https://bower.io) used to get [js-cookie](https://github.com/js-cookie/js-cookie/) for Integration tests (installed by NPM automatically).
22+
1923

2024
### Getting started
2125

22-
Install [NodeJS](http://nodejs.org/).
2326
Install [Maven](https://maven.apache.org/download.cgi) and add `mvn` as a global alias to run the `/bin/mvn` command inside Maven folder.
2427

2528
Browse to the project root directory and run the build:
@@ -33,6 +36,7 @@ After the build completes, you should see the following message in the console:
3336
----------------------------------------------------------------------------
3437

3538
### Unit tests
39+
3640
To run the unit tests, execute the following command:
3741

3842
$ mvn test
@@ -41,7 +45,7 @@ To run the unit tests, execute the following command:
4145

4246
If you want to debug the integration tests in the browser, switch `Debug.FALSE` to `Debug.TRUE` in `CookiesEncodingIT.java` and run the build:
4347

44-
$ mvn install
48+
$ mvn verify
4549

4650
[Arquillian](http://arquillian.org/) will start the server, [Selenium](http://www.seleniumhq.org/) will run the tests in Firefox, but the build will hang to allow debugging in the browser.
4751

Gruntfile.js

-18
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A simple Java API for handling cookies
44

5-
* Supports Java 6+, Servlet 2.2+
5+
* Supports Java 8+, Servlet 2.2+
66
* [Unobtrusive](#json-data-binding) JSON Data Binding support
77
* [RFC 6265](http://www.rfc-editor.org/rfc/rfc6265.txt) compliant
88
* Enable [custom decoding](#converter)

package-lock.json

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "java-cookie",
33
"version": "1.0.0",
4+
"license": "MIT",
45
"repository": {
56
"type": "git",
67
"url": "https://github.com/js-cookie/java-cookie.git"
78
},
89
"devDependencies": {
9-
"bower": "1.4.1",
10-
"grunt": "0.4.5",
11-
"grunt-bower-postinst": "0.2.1",
12-
"grunt-cli": "0.1.13"
10+
"bower": "1.8.8"
11+
},
12+
"scripts": {
13+
"test": "cd bower_components/js-cookie && ../../node/node \"../../node/node_modules/npm/bin/npm-cli.js\" install"
1314
}
1415
}

pom.xml

+53-36
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<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">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23
<modelVersion>4.0.0</modelVersion>
34
<groupId>com.github.js-cookie</groupId>
45
<artifactId>java-cookie</artifactId>
@@ -9,7 +10,8 @@
910
<properties>
1011
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1112
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
12-
<selenium.version>2.45.0</selenium.version>
13+
<selenium.version>3.141.59</selenium.version>
14+
<wildfly.version>15.0.1.Final</wildfly.version>
1315
<project.scm.id>java-cookie-scm</project.scm.id>
1416
</properties>
1517
<licenses>
@@ -35,8 +37,8 @@
3537
</scm>
3638
<repositories>
3739
<repository>
38-
<id>RedHat</id>
39-
<url>https://maven.repository.redhat.com/earlyaccess/all</url>
40+
<id>RedHat GA</id>
41+
<url>https://maven.repository.redhat.com/ga/</url>
4042
</repository>
4143
</repositories>
4244
<build>
@@ -64,13 +66,13 @@
6466
</build>
6567
<dependencyManagement>
6668
<dependencies>
67-
<dependency>
68-
<groupId>org.jboss.arquillian</groupId>
69-
<artifactId>arquillian-bom</artifactId>
70-
<version>1.1.8.Final</version>
71-
<scope>import</scope>
72-
<type>pom</type>
73-
</dependency>
69+
<dependency>
70+
<groupId>org.jboss.arquillian</groupId>
71+
<artifactId>arquillian-bom</artifactId>
72+
<version>1.4.1.Final</version>
73+
<scope>import</scope>
74+
<type>pom</type>
75+
</dependency>
7476
</dependencies>
7577
</dependencyManagement>
7678
<dependencies>
@@ -83,12 +85,12 @@
8385
<dependency>
8486
<groupId>joda-time</groupId>
8587
<artifactId>joda-time</artifactId>
86-
<version>2.7</version>
88+
<version>2.10.1</version>
8789
</dependency>
8890
<dependency>
8991
<groupId>com.fasterxml.jackson.core</groupId>
9092
<artifactId>jackson-databind</artifactId>
91-
<version>2.8.11.1</version>
93+
<version>2.9.8</version>
9294
</dependency>
9395
<dependency>
9496
<groupId>junit</groupId>
@@ -115,33 +117,45 @@
115117
<scope>test</scope>
116118
</dependency>
117119
<dependency>
118-
<groupId>org.jboss.as</groupId>
119-
<artifactId>jboss-as-arquillian-container-managed</artifactId>
120-
<version>7.2.0.Final</version>
120+
<groupId>org.jboss.arquillian.protocol</groupId>
121+
<artifactId>arquillian-protocol-servlet</artifactId>
122+
<version>1.4.1.Final</version>
121123
<scope>test</scope>
122124
</dependency>
123125
<dependency>
124126
<groupId>org.jboss.arquillian.junit</groupId>
125127
<artifactId>arquillian-junit-container</artifactId>
128+
<version>1.4.1.Final</version>
129+
<scope>test</scope>
130+
</dependency>
131+
<dependency>
132+
<groupId>org.wildfly.arquillian</groupId>
133+
<artifactId>wildfly-arquillian-container-managed</artifactId>
134+
<version>2.1.1.Final</version>
126135
<scope>test</scope>
127136
</dependency>
128137
<dependency>
129138
<groupId>org.jboss.shrinkwrap.resolver</groupId>
130-
<artifactId>shrinkwrap-resolver-bom</artifactId>
131-
<version>2.2.0-beta-2</version>
132-
<type>pom</type>
133-
<scope>import</scope>
139+
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
140+
<version>3.1.3</version>
141+
<scope>test</scope>
142+
</dependency>
143+
<dependency>
144+
<groupId>org.jboss.shrinkwrap.resolver</groupId>
145+
<artifactId>shrinkwrap-resolver-spi</artifactId>
146+
<version>3.1.3</version>
147+
<scope>test</scope>
134148
</dependency>
135149
<dependency>
136150
<groupId>org.apache.httpcomponents</groupId>
137151
<artifactId>httpclient</artifactId>
138-
<version>4.3.3</version>
152+
<version>4.5.7</version>
139153
<scope>test</scope>
140154
</dependency>
141155
<dependency>
142156
<groupId>org.apache.httpcomponents</groupId>
143157
<artifactId>fluent-hc</artifactId>
144-
<version>4.3.3</version>
158+
<version>4.5.7</version>
145159
<scope>test</scope>
146160
</dependency>
147161
</dependencies>
@@ -165,9 +179,9 @@
165179
<configuration>
166180
<artifactItems>
167181
<artifactItem>
168-
<groupId>org.jboss.as</groupId>
169-
<artifactId>jboss-as-dist</artifactId>
170-
<version>7.5.0.Final-redhat-15</version>
182+
<groupId>org.wildfly</groupId>
183+
<artifactId>wildfly-dist</artifactId>
184+
<version>${wildfly.version}</version>
171185
<type>zip</type>
172186
<overWrite>false</overWrite>
173187
<outputDirectory>target</outputDirectory>
@@ -193,22 +207,22 @@
193207
<plugin>
194208
<groupId>com.github.eirslett</groupId>
195209
<artifactId>frontend-maven-plugin</artifactId>
196-
<version>0.0.23</version>
210+
<version>1.5</version>
197211
<executions>
198212
<execution>
199213
<id>install node and npm</id>
200214
<goals>
201-
<goal>install-node-and-npm</goal>
215+
<goal>install-node-and-npm</goal>
202216
</goals>
203217
<configuration>
204-
<nodeVersion>v0.10.18</nodeVersion>
205-
<npmVersion>1.3.8</npmVersion>
218+
<nodeVersion>v11.10.0</nodeVersion>
219+
<npmVersion>6.8.0</npmVersion>
206220
</configuration>
207221
</execution>
208222
<execution>
209223
<id>npm install</id>
210224
<goals>
211-
<goal>npm</goal>
225+
<goal>npm</goal>
212226
</goals>
213227
</execution>
214228
<execution>
@@ -218,10 +232,13 @@
218232
</goals>
219233
</execution>
220234
<execution>
221-
<id>grunt build</id>
235+
<id>npm test</id>
222236
<goals>
223-
<goal>grunt</goal>
237+
<goal>npm</goal>
224238
</goals>
239+
<configuration>
240+
<arguments>test</arguments>
241+
</configuration>
225242
</execution>
226243
</executions>
227244
</plugin>
@@ -245,7 +262,7 @@
245262
<plugin>
246263
<groupId>org.apache.maven.plugins</groupId>
247264
<artifactId>maven-javadoc-plugin</artifactId>
248-
<version>2.10.3</version>
265+
<version>3.0.1</version>
249266
<executions>
250267
<execution>
251268
<id>attach-javadocs</id>
@@ -258,7 +275,7 @@
258275
<plugin>
259276
<groupId>org.apache.maven.plugins</groupId>
260277
<artifactId>maven-source-plugin</artifactId>
261-
<version>2.4</version>
278+
<version>3.0.1</version>
262279
<executions>
263280
<execution>
264281
<id>attach-sources</id>
@@ -271,7 +288,7 @@
271288
<plugin>
272289
<groupId>org.sonatype.plugins</groupId>
273290
<artifactId>nexus-staging-maven-plugin</artifactId>
274-
<version>1.6.5</version>
291+
<version>1.6.8</version>
275292
<extensions>true</extensions>
276293
<configuration>
277294
<serverId>ossrh</serverId>
@@ -300,4 +317,4 @@
300317
<id>simple</id>
301318
</profile>
302319
</profiles>
303-
</project>
320+
</project>

src/test/resources/arquillian.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<arquillian xmlns="http://jboss.org/schema/arquillian"
2-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="
44
http://jboss.org/schema/arquillian
55
http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
6-
<container qualifier="jbossas-managed" default="true">
6+
<container qualifier="wildfly-managed" default="true">
77
<configuration>
8-
<property name="jbossHome">target/jboss-eap-6.4</property>
8+
<property name="jbossHome">target/wildfly-15.0.1.Final</property>
99
<property name="javaVmArguments">-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n</property>
1010
</configuration>
1111
</container>

src/test/resources/web.xml

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
2+
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
3+
"http://java.sun.com/dtd/web-app_2_3.dtd">
34
<web-app>
45
<servlet>
56
<servlet-name>encoding</servlet-name>
@@ -9,12 +10,4 @@
910
<servlet-name>encoding</servlet-name>
1011
<url-pattern>/encoding</url-pattern>
1112
</servlet-mapping>
12-
<servlet>
13-
<servlet-name>multiple-set-cookie</servlet-name>
14-
<servlet-class>com.github.jscookie.javacookie.test.integration.write.MultipleSetCookieServlet</servlet-class>
15-
</servlet>
16-
<servlet-mapping>
17-
<servlet-name>multiple-set-cookie</servlet-name>
18-
<url-pattern>/multiple-set-cookie</url-pattern>
19-
</servlet-mapping>
2013
</web-app>

0 commit comments

Comments
 (0)