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

Upgrade java, maven and versions of other dependencies #34

Merged
merged 7 commits into from
Dec 18, 2018
Merged
Show file tree
Hide file tree
Changes from 5 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
16 changes: 16 additions & 0 deletions .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 2 additions & 54 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 30 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<inceptionYear>2014</inceptionYear>

<prerequisites>
<maven>3.0.3</maven>
<maven>3.5.2</maven>
</prerequisites>

<licenses>
Expand Down Expand Up @@ -79,35 +79,35 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<source.version>1.7</source.version>
<target.version>1.7</target.version>
<source.version>1.8</source.version>
<target.version>1.8</target.version>

<!-- plugin versions -->
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
<maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
<maven-release-plugin.version>2.5</maven-release-plugin.version>
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
<nexus-staging-maven-plugin.version>1.6.5</nexus-staging-maven-plugin.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>

<!-- dependency versions -->
<bean-validation.version>1.1.0.Final</bean-validation.version>
<commons-lang3.version>3.3.2</commons-lang3.version>
<commons-cli.version>1.2</commons-cli.version>
<commons-io.version>2.4</commons-io.version>
<guava.version>17.0</guava.version>
<bean-validation.version>2.0.1.Final</bean-validation.version>
<commons-lang3.version>3.7</commons-lang3.version>
<commons-cli.version>1.4</commons-cli.version>
<commons-io.version>2.6</commons-io.version>
<guava.version>23.0</guava.version>
<hamcrest.version>1.3</hamcrest.version>
<hibernate.version>1.0.0.Final</hibernate.version> <!-- JPA 2.1 for tests -->
<hibernate-validator.version>5.1.1.Final</hibernate-validator.version>
<jackson.version>2.4.0</jackson.version>
<junit.version>4.11</junit.version>
<lombok.version>1.14.0</lombok.version>
<mockito.version>1.9.5</mockito.version>
<hibernate.version>1.0.2</hibernate.version> <!-- JPA 2.1 for tests -->
<hibernate-validator.version>6.0.9.Final</hibernate-validator.version>
<jackson.version>2.9.5</jackson.version>
<junit.version>4.12</junit.version>
<lombok.version>1.16.20</lombok.version>
<mockito.version>2.18.3</mockito.version>
<reflections.version>0.9.9</reflections.version>
<servlet-api.version>3.0.1</servlet-api.version>
<slf4j.version>1.7.7</slf4j.version>
<spring.version>4.0.5.RELEASE</spring.version>
<servlet-api.version>4.0.0</servlet-api.version>
<slf4j.version>1.7.9</slf4j.version>
<spring.version>5.0.5.RELEASE</spring.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -190,6 +190,12 @@
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
Expand Down
33 changes: 19 additions & 14 deletions valdr-bean-validation-demo/valdr-bean-validation-demo.iml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
Expand All @@ -23,21 +23,26 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="valdr-bean-validation" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.7" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.9" level="project" />
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.9" level="project" />
<orderEntry type="library" name="Maven: org.javassist:javassist:3.18.2-GA" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:annotations:2.0.1" level="project" />
<orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.4.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.4.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.4.0" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:17.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.3.2" level="project" />
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.2" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
<orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.1.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.1.3.GA" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.7" level="project" />
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.5" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:23.0" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.0.18" level="project" />
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.4" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.0" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.9.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.9" level="project" />
</component>
</module>
2 changes: 1 addition & 1 deletion valdr-bean-validation-parent.iml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
Expand Down
13 changes: 12 additions & 1 deletion valdr-bean-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
<artifactId>hibernate-validator</artifactId>
</dependency>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
netceteragroupadmin marked this conversation as resolved.
Show resolved Hide resolved

<!-- provided -->
<dependency>
<groupId>javax.servlet</groupId>
Expand All @@ -71,6 +77,11 @@
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
Expand Down Expand Up @@ -108,7 +119,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.0.201403182114</version>
<version>0.8.1</version>
<configuration>
<excludes>
<exclude>com/github/valdr/thirdparty/**/*.class</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@
import com.github.valdr.decorator.AbstractConstraintAttributesDecorator;
import com.github.valdr.decorator.NullDecorator;
import com.github.valdr.decorator.PatternDecorator;
import com.google.common.base.Function;
import com.google.common.collect.Iterables;
import lombok.Getter;
import lombok.SneakyThrows;
import org.hibernate.validator.constraints.Email;

import java.lang.annotation.Annotation;
import java.util.Arrays;
import java.util.stream.Collectors;

import javax.validation.constraints.Digits;
import javax.validation.constraints.Email;
import javax.validation.constraints.Future;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.lang.annotation.Annotation;
import java.util.Arrays;

import lombok.Getter;
import lombok.SneakyThrows;

/**
* All constraints currently supported out-of-the-box by valdr Bean Validation. Each value represents a constraint
Expand All @@ -28,23 +29,29 @@
public enum BuiltInConstraint {

// CHECKSTYLE:OFF
REQUIRED("required", NotNull.class), MIN("min", Min.class), MAX("max", Max.class), SIZE("size", Size.class),
DIGITS("digits", Digits.class), PATTERN("pattern", Pattern.class, PatternDecorator.class), FUTURE("future",
Future.class), PAST("past", Past.class), EMAIL("hibernateEmail", Email.class), URL("hibernateUrl",
org.hibernate.validator.constraints.URL.class);
REQUIRED("required", NotNull.class),
MIN("min", Min.class),
MAX("max", Max.class),
SIZE("size", Size.class),
DIGITS("digits", Digits.class),
PATTERN("pattern", Pattern.class, PatternDecorator.class),
FUTURE("future", Future.class),
PAST("past", Past.class),
EMAIL("email", Email.class),
URL("hibernateUrl", org.hibernate.validator.constraints.URL.class);
// CHECKSTYLE:ON

@Getter
private final Class<? extends Annotation> beanValidationAnnotation;
private final Class<? extends AbstractConstraintAttributesDecorator> decorator;
private final String camelCaseName;

private BuiltInConstraint(String camelCaseName, Class<? extends Annotation> beanValidationAnnotation) {
BuiltInConstraint(String camelCaseName, Class<? extends Annotation> beanValidationAnnotation) {
this(camelCaseName, beanValidationAnnotation, NullDecorator.class);
}

private BuiltInConstraint(String camelCaseName, Class<? extends Annotation> beanValidationAnnotation,
Class<? extends AbstractConstraintAttributesDecorator> decorator) {
BuiltInConstraint(String camelCaseName, Class<? extends Annotation> beanValidationAnnotation,
Class<? extends AbstractConstraintAttributesDecorator> decorator) {
this.camelCaseName = camelCaseName;
this.decorator = decorator;
this.beanValidationAnnotation = beanValidationAnnotation;
Expand Down Expand Up @@ -72,16 +79,12 @@ public AbstractConstraintAttributesDecorator createDecoratorFor(ConstraintAttrib
* @return all collected annotation classes
*/
public static Iterable<Class<? extends Annotation>> getAllBeanValidationAnnotations() {
return Iterables.transform(Arrays.asList(values()), new Function<BuiltInConstraint, Class<? extends Annotation>>() {

@Override
public Class<? extends Annotation> apply(BuiltInConstraint input) {
if (input == null) {
throw new NullPointerException("Passed validator must not be null.");
}
return input.getBeanValidationAnnotation();
return Arrays.stream(values()).map(input -> {
if (input == null) {
throw new NullPointerException("Passed validator must not be null.");
}
});
return input.getBeanValidationAnnotation();
}).collect(Collectors.toList());
}

/**
Expand Down
Loading