Skip to content

Commit b69c659

Browse files
author
Phillip Webb
committed
Polish
1 parent d84a77e commit b69c659

File tree

20 files changed

+128
-105
lines changed

20 files changed

+128
-105
lines changed

pom.xml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45
<groupId>org.springframework.boot</groupId>
56
<artifactId>spring-boot-build</artifactId>
@@ -95,15 +96,20 @@
9596
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
9697
<taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask" />
9798
<var name="version-type" value="${project.version}" />
98-
<propertyregex property="version-type" override="true" input="${version-type}" regexp=".*\.(.*)" replace="\1" />
99-
<propertyregex property="version-type" override="true" input="${version-type}" regexp="(M)\d+" replace="MILESTONE" />
100-
<propertyregex property="version-type" override="true" input="${version-type}" regexp="(RC)\d+" replace="MILESTONE" />
101-
<propertyregex property="version-type" override="true" input="${version-type}" regexp="BUILD-(.*)" replace="SNAPSHOT" />
99+
<propertyregex property="version-type" override="true"
100+
input="${version-type}" regexp=".*\.(.*)" replace="\1" />
101+
<propertyregex property="version-type" override="true"
102+
input="${version-type}" regexp="(M)\d+" replace="MILESTONE" />
103+
<propertyregex property="version-type" override="true"
104+
input="${version-type}" regexp="(RC)\d+" replace="MILESTONE" />
105+
<propertyregex property="version-type" override="true"
106+
input="${version-type}" regexp="BUILD-(.*)" replace="SNAPSHOT" />
102107
<stringutil string="${version-type}" property="profile">
103108
<lowercase />
104109
</stringutil>
105110
<echo message="Writing settings for ${profile} profile" />
106-
<copy file=".settings-template.xml" tofile="settings.xml" overwrite="true">
111+
<copy file=".settings-template.xml" tofile="settings.xml"
112+
overwrite="true">
107113
<filterset>
108114
<filter token="profile" value="${profile}" />
109115
</filterset>
@@ -120,7 +126,8 @@
120126
<inherited>false</inherited>
121127
<configuration>
122128
<target>
123-
<property name="sourceFile" value="spring-boot-starters/spring-boot-starter-parent/pom.xml" />
129+
<property name="sourceFile"
130+
value="spring-boot-starters/spring-boot-starter-parent/pom.xml" />
124131
<xslt in="${sourceFile}" out="${sourceFile}.new" force="true">
125132
<style>
126133
<string><![CDATA[

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementServerProperties.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
@ConfigurationProperties(name = "management", ignoreUnknownFields = false)
3636
public class ManagementServerProperties implements SecurityPrequisite {
3737

38+
private static final String SECURITY_CHECK_CLASS = "org.springframework.security.config.http.SessionCreationPolicy";
39+
3840
private Integer port;
3941

4042
private InetAddress address;
@@ -119,9 +121,9 @@ public void setEnabled(boolean enabled) {
119121
}
120122

121123
private static Security maybeCreateSecurity() {
122-
return (ClassUtils.isPresent(
123-
"org.springframework.security.config.http.SessionCreationPolicy", null) ? new Security()
124-
: null);
124+
if (ClassUtils.isPresent(SECURITY_CHECK_CLASS, null)) {
125+
return new Security();
126+
}
127+
return null;
125128
}
126-
127129
}

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/security/AuthenticationAuditListener.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2013 the original author or authors.
2+
* Copyright 2012-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,6 +38,8 @@
3838
public class AuthenticationAuditListener implements
3939
ApplicationListener<AbstractAuthenticationEvent>, ApplicationEventPublisherAware {
4040

41+
private static final String WEB_LISTENER_CHECK_CLASS = "org.springframework.security.web.authentication.switchuser.AuthenticationSwitchUserEvent";
42+
4143
private ApplicationEventPublisher publisher;
4244

4345
private WebAuditListener webListener = maybeCreateWebListener();
@@ -48,10 +50,7 @@ public void setApplicationEventPublisher(ApplicationEventPublisher publisher) {
4850
}
4951

5052
private static WebAuditListener maybeCreateWebListener() {
51-
if (ClassUtils
52-
.isPresent(
53-
"org.springframework.security.web.authentication.switchuser.AuthenticationSwitchUserEvent",
54-
null)) {
53+
if (ClassUtils.isPresent(WEB_LISTENER_CHECK_CLASS, null)) {
5554
return new WebAuditListener();
5655
}
5756
return null;

spring-boot-dependencies/pom.xml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45
<groupId>org.springframework.boot</groupId>
56
<artifactId>spring-boot-dependencies</artifactId>
@@ -215,11 +216,11 @@
215216
<artifactId>groovy-xml</artifactId>
216217
<version>${groovy.version}</version>
217218
</dependency>
218-
<dependency>
219-
<groupId>org.codehaus.groovy</groupId>
220-
<artifactId>groovy-templates</artifactId>
221-
<version>${groovy.version}</version>
222-
</dependency>
219+
<dependency>
220+
<groupId>org.codehaus.groovy</groupId>
221+
<artifactId>groovy-templates</artifactId>
222+
<version>${groovy.version}</version>
223+
</dependency>
223224
<dependency>
224225
<groupId>org.eclipse.jetty</groupId>
225226
<artifactId>jetty-webapp</artifactId>
@@ -286,11 +287,11 @@
286287
<artifactId>mongo-java-driver</artifactId>
287288
<version>${mongodb.version}</version>
288289
</dependency>
289-
<dependency>
290-
<groupId>org.projectreactor</groupId>
291-
<artifactId>reactor-core</artifactId>
292-
<version>${reactor.version}</version>
293-
</dependency>
290+
<dependency>
291+
<groupId>org.projectreactor</groupId>
292+
<artifactId>reactor-core</artifactId>
293+
<version>${reactor.version}</version>
294+
</dependency>
294295
<dependency>
295296
<groupId>org.projectreactor</groupId>
296297
<artifactId>reactor-spring</artifactId>

spring-boot-parent/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45
<parent>
56
<groupId>org.springframework.boot</groupId>

spring-boot-samples/pom.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45
<parent>
56
<groupId>org.springframework.boot</groupId>
@@ -38,7 +39,8 @@
3839
<module>spring-boot-sample-websocket</module>
3940
<module>spring-boot-sample-xml</module>
4041
</modules>
41-
<!-- No dependencies - otherwise the samples won't work if you change the parent -->
42+
<!-- No dependencies - otherwise the samples won't work if you change the
43+
parent -->
4244
<build>
4345
<plugins>
4446
<plugin>

spring-boot-samples/spring-boot-sample-web-ui/build.gradle

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ buildscript {
33
springBootVersion = '1.0.0.BUILD-SNAPSHOT'
44
springLoadedVersion = '1.1.5.RELEASE'
55
}
6-
repositories {
7-
mavenLocal()
8-
maven { url "http://repo.springsource.org/libs-snapshot" }
9-
}
10-
dependencies {
11-
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
12-
classpath("org.springsource.loaded:springloaded:${springLoadedVersion}")
13-
}
6+
repositories {
7+
mavenLocal()
8+
maven { url "http://repo.springsource.org/libs-snapshot" }
9+
}
10+
dependencies {
11+
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
12+
classpath("org.springsource.loaded:springloaded:${springLoadedVersion}")
13+
}
1414
}
1515

1616

@@ -22,21 +22,19 @@ apply plugin: 'spring-boot'
2222
mainClassName = "sample.ui.SampleWebUiApplication"
2323

2424
jar {
25-
baseName = 'spring-boot-sample-simple'
26-
version = '0.5.0'
25+
baseName = 'spring-boot-sample-simple'
26+
version = '0.5.0'
2727
}
2828

2929
repositories {
30-
mavenCentral()
31-
maven { url "http://repo.springsource.org/libs-snapshot" }
30+
mavenCentral()
31+
maven { url "http://repo.springsource.org/libs-snapshot" }
3232
}
3333

3434
dependencies {
35-
compile("org.springframework.boot:spring-boot-starter-thymeleaf")
36-
compile("org.hibernate:hibernate-validator")
37-
testCompile("org.springframework.boot:spring-boot-starter-test")
35+
compile("org.springframework.boot:spring-boot-starter-thymeleaf")
36+
compile("org.hibernate:hibernate-validator")
37+
testCompile("org.springframework.boot:spring-boot-starter-test")
3838
}
3939

40-
task wrapper(type: Wrapper) {
41-
gradleVersion = '1.6'
42-
}
40+
task wrapper(type: Wrapper) { gradleVersion = '1.6' }

spring-boot-samples/spring-boot-sample-web-ui/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45
<parent>
56
<!-- Your own application should inherit from spring-boot-starter-parent -->

spring-boot-starters/spring-boot-starter/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45
<parent>
56
<groupId>org.springframework.boot</groupId>

spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/SpringBootPluginExtension.groovy

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package org.springframework.boot.gradle
1919
import org.springframework.boot.loader.tools.Layout
2020
import org.springframework.boot.loader.tools.Layouts
2121

22-
2322
/**
2423
* Gradle DSL Extension for 'Spring Boot'. Most of the time Spring Boot can guess the
2524
* settings in this extension, but occasionally you might need to explicitly set one
@@ -98,7 +97,7 @@ public class SpringBootPluginExtension {
9897
Layout convertLayout() {
9998
(layout == null ? null : layout.layout)
10099
}
101-
100+
102101
/**
103102
* Location of an agent jar to attach to the VM when running the application with runJar task.
104103
*/
@@ -108,5 +107,4 @@ public class SpringBootPluginExtension {
108107
* Flag to indicate that the agent requires -noverify (and the plugin will refuse to start if it is not set)
109108
*/
110109
Boolean noverify;
111-
112110
}

0 commit comments

Comments
 (0)