Skip to content

Commit

Permalink
Merge pull request #8 from Scalified/#7
Browse files Browse the repository at this point in the history
#7 Java EE 8.0 Api Update
  • Loading branch information
vbaidak authored Mar 4, 2020
2 parents a5fb0af + 9226020 commit 2e363d7
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 149 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: java

jdk:
- openjdk8
- openjdk11

before_install:
- chmod +x gradlew
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.0

* [**#7** Java EE 8.0 Api Update](https://github.com/Scalified/rest/issues/7)

# 0.0.5

* [**#5** Multipart Extract Generic Type](https://github.com/Scalified/rest/issues/5)
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,17 @@ The Library consists of several modules, which can be used separately

### jaxrs

```java
```gradle
dependencies {
compile "com.scalified:jaxrs:$version"
implementation "com.scalified:jaxrs:$version"
}
```

### jaxrs-resteasy3

```java
```gradle
dependencies {
compile "com.scalified:jaxrs-resteasy3:$version"

compileOnly "org.jboss.resteasy:resteasy-multipart-provider:3.0.1.Final"
implementation "com.scalified:jaxrs-resteasy3:$version"
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import java.nio.charset.StandardCharsets
allprojects {

group = 'com.scalified'
version = '0.0.5'
version = '1.0.0'

repositories {
mavenCentral()
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
29 changes: 3 additions & 26 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
#
# MIT License
#
# Copyright (c) 2018 Scalified
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

#Mon Mar 02 15:21:09 EET 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
51 changes: 31 additions & 20 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down Expand Up @@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down Expand Up @@ -138,19 +154,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

Expand All @@ -159,14 +175,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
84 changes: 0 additions & 84 deletions gradlew.bat

This file was deleted.

12 changes: 5 additions & 7 deletions jaxrs-resteasy3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@
* SOFTWARE.
*/

ext {
RESTEASY_VERSION = '3.1.0.Final'
plugins {
id 'java-library'
id 'maven-publish'
}

apply plugin: 'java'
apply plugin: 'maven-publish'

dependencies {
compileOnly "org.jboss.resteasy:resteasy-multipart-provider:$RESTEASY_VERSION"
compileOnly "org.jboss.resteasy:resteasy-multipart-provider:3.11.0.Final"

compile project(':jaxrs')
api project(':jaxrs')
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package com.scalified.rest.jaxrs.resteasy.multipart;

import com.scalified.rest.jaxrs.extension.ExtendedMediaType;
import org.apache.commons.lang3.RegExUtils;
import org.apache.commons.lang3.StringUtils;
import org.jboss.resteasy.plugins.providers.multipart.InputPart;
import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput;
Expand Down Expand Up @@ -146,7 +147,7 @@ public static Map<String, byte[]> extractFiles(MultipartFormDataInput input) {
* @throws RuntimeException if parsing was unsuccessful
*/
private static String parseFileName(String input) {
String parsed = StringUtils.removePattern(StringUtils.substringAfter(input, FILENAME), FILENAME_REGEX);
String parsed = RegExUtils.removePattern(StringUtils.substringAfter(input, FILENAME), FILENAME_REGEX);
try {
return URLDecoder.decode(parsed, StandardCharsets.UTF_8.displayName());
} catch (UnsupportedEncodingException e) {
Expand Down
8 changes: 5 additions & 3 deletions jaxrs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
* SOFTWARE.
*/

apply plugin: 'java'
apply plugin: 'maven-publish'
plugins {
id 'java-library'
id 'maven-publish'
}

dependencies {
compileOnly 'javax.ws.rs:javax.ws.rs-api:2.1'

compile 'org.apache.commons:commons-lang3:3.7'
api 'org.apache.commons:commons-lang3:3.9'
}

0 comments on commit 2e363d7

Please sign in to comment.