Skip to content
This repository has been archived by the owner on May 31, 2022. It is now read-only.

Commit

Permalink
Add nohttp to build
Browse files Browse the repository at this point in the history
Fixes: gh-1758
  • Loading branch information
jzheaux committed Oct 15, 2019
1 parent 00498c9 commit 9da3eb0
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -15,4 +15,5 @@ script:
- jdk_switcher use openjdk7
- ./mvnw clean test -P bootstrap
- jdk_switcher use openjdk8
- ./mvnw -U clean checkstyle:check -P spring5
- ./mvnw -f spring-security-oauth2 -U clean test -P spring5
26 changes: 26 additions & 0 deletions etc/nohttp/checkstyle.xml
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<!--
~ Copyright 2002-2019 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.
-->

<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"https://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="fileExtensions" value=""/>
<module name="io.spring.nohttp.checkstyle.check.NoHttpCheck">
<property name="whitelistFileName" value="etc/nohttp/whitelist.lines"/>
</module>
</module>
1 change: 1 addition & 0 deletions etc/nohttp/whitelist.lines
@@ -0,0 +1 @@
http://junit.sourceforge.net/javadoc/
35 changes: 35 additions & 0 deletions pom.xml
Expand Up @@ -187,6 +187,41 @@
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.18</version>
</dependency>
<dependency>
<groupId>io.spring.nohttp</groupId>
<artifactId>nohttp-checkstyle</artifactId>
<version>0.0.3.RELEASE</version>
</dependency>
</dependencies>
<configuration>
<configLocation>${maven.multiModuleProjectDirectory}/etc/nohttp/checkstyle.xml</configLocation>
<includes>src/**/*,*</includes>
<sourceDirectories>
<sourceDirectory>./</sourceDirectory>
</sourceDirectories>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>default</id>
Expand Down
40 changes: 40 additions & 0 deletions tests/annotation/pom.xml
Expand Up @@ -136,4 +136,44 @@
</pluginRepository>
</pluginRepositories>

<profiles>
<profile>
<id>spring5</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.18</version>
</dependency>
<dependency>
<groupId>io.spring.nohttp</groupId>
<artifactId>nohttp-checkstyle</artifactId>
<version>0.0.3.RELEASE</version>
</dependency>
</dependencies>
<configuration>
<configLocation>${maven.multiModuleProjectDirectory}/etc/nohttp/checkstyle.xml</configLocation>
<includes>src/**/*,*</includes>
<sourceDirectories>
<sourceDirectory>./</sourceDirectory>
</sourceDirectories>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
40 changes: 40 additions & 0 deletions tests/xml/pom.xml
Expand Up @@ -85,4 +85,44 @@
</pluginManagement>
</build>

<profiles>
<profile>
<id>spring5</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.18</version>
</dependency>
<dependency>
<groupId>io.spring.nohttp</groupId>
<artifactId>nohttp-checkstyle</artifactId>
<version>0.0.3.RELEASE</version>
</dependency>
</dependencies>
<configuration>
<configLocation>${maven.multiModuleProjectDirectory}/etc/nohttp/checkstyle.xml</configLocation>
<includes>src/**/*,*</includes>
<sourceDirectories>
<sourceDirectory>./</sourceDirectory>
</sourceDirectories>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 9da3eb0

Please sign in to comment.