Added checkstyle rules

This commit is contained in:
Marcin Grzejszczak
2019-02-15 12:13:54 +01:00
parent 02bbd93a81
commit 591d22ed83
376 changed files with 11007 additions and 5402 deletions

View File

@@ -1,22 +1,40 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-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
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://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.
* 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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
@@ -31,29 +49,37 @@ public class ReleaserApplication implements CommandLineRunner {
private static final Logger log = LoggerFactory.getLogger(ReleaserApplication.class);
@Autowired
SpringReleaser releaser;
@Autowired
Parser parser;
public static void main(String[] args) {
try {
SpringApplication application = new SpringApplication(ReleaserApplication.class);
SpringApplication application = new SpringApplication(
ReleaserApplication.class);
application.setWebApplicationType(WebApplicationType.NONE);
application.run(args);
} catch (Throwable e) {
}
catch (Throwable e) {
log.error("Exception occurred for the releaser", e);
throw e;
}
}
@Autowired SpringReleaser releaser;
@Autowired Parser parser;
@Override public void run(String... strings) {
@Override
public void run(String... strings) {
Options options = this.parser.parse(strings);
try {
this.releaser.release(options);
} catch (Throwable e) {
log.error("Exception occurred for the releaser. Picked options were [" + options + "]");
}
catch (Throwable e) {
log.error("Exception occurred for the releaser. Picked options were ["
+ options + "]");
throw e;
}
System.exit(0);
}
}
}

View File

@@ -1,3 +1,35 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.options;
import java.util.List;
@@ -7,22 +39,44 @@ import java.util.stream.Collectors;
* @author Marcin Grzejszczak
*/
public class Options {
/**
* Is meta release set.
*/
public Boolean metaRelease;
/**
* Is full release set.
*/
public Boolean fullRelease;
/**
* Is interactive mode set.
*/
public Boolean interactive;
/**
* List of task names to release.
*/
public List<String> taskNames;
/**
* Name of the task / projects to start from.
*/
public String startFrom = "";
/**
* Range of task / projects to release.
*/
public String range = "";
Options(Boolean metaRelease, Boolean fullRelease,
Boolean interactive, List<String> taskNames, String startFrom,
String range) {
Options(Boolean metaRelease, Boolean fullRelease, Boolean interactive,
List<String> taskNames, String startFrom, String range) {
this.metaRelease = metaRelease;
this.fullRelease = fullRelease;
this.interactive = interactive;
this.taskNames = taskNames.stream()
.map(this::removeQuotingChars).collect(
Collectors.toList());
this.taskNames = taskNames.stream().map(this::removeQuotingChars)
.collect(Collectors.toList());
this.startFrom = removeQuotingChars(startFrom);
this.range = removeQuotingChars(range);
}
@@ -34,9 +88,12 @@ public class Options {
return string;
}
@Override public String toString() {
return "Options{" + "metaRelease=" + this.metaRelease + ", fullRelease=" + this.fullRelease
+ ", interactive=" + this.interactive + ", taskNames=" + this.taskNames
+ ", startFrom='" + this.startFrom + '\'' + ", range='" + this.range + '\'' + '}';
@Override
public String toString() {
return "Options{" + "metaRelease=" + this.metaRelease + ", fullRelease="
+ this.fullRelease + ", interactive=" + this.interactive + ", taskNames="
+ this.taskNames + ", startFrom='" + this.startFrom + '\'' + ", range='"
+ this.range + '\'' + '}';
}
}

View File

@@ -1,14 +1,52 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.options;
import java.util.ArrayList;
import java.util.List;
public class OptionsBuilder {
private Boolean metaRelease = false;
private Boolean fullRelease = false;
private Boolean interactive = true;
private List<String> taskNames = new ArrayList<>();
private String startFrom = "";
private String range = "";
public OptionsBuilder metaRelease(Boolean metaRelease) {
@@ -42,8 +80,8 @@ public class OptionsBuilder {
}
public Options options() {
return new Options(this.metaRelease, this.fullRelease,
this.interactive, this.taskNames, this.startFrom,
this.range);
return new Options(this.metaRelease, this.fullRelease, this.interactive,
this.taskNames, this.startFrom, this.range);
}
}
}

View File

@@ -1,10 +1,44 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.options;
/**
* Converts input arguments to a {@link Options}
* Converts input arguments to a {@link Options}.
*
* @author Marcin Grzejszczak
*/
public interface Parser {
Options parse(String[] args);
}

View File

@@ -1,3 +1,35 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.sagan;
import org.springframework.boot.web.client.RestTemplateBuilder;
@@ -20,10 +52,12 @@ class SaganConfiguration {
}
private RestTemplate restTemplate(ReleaserProperties properties) {
Assert.hasText(properties.getGit().getOauthToken(), "In order to connect to Sagan you need to pass the Github OAuth token. "
+ "You can do it via the [--releaser.git.oauth-token=...] command line argument or an env variable [export RELEASER_GIT_OAUTH_TOKEN=...].");
Assert.hasText(properties.getGit().getOauthToken(),
"In order to connect to Sagan you need to pass the Github OAuth token. "
+ "You can do it via the [--releaser.git.oauth-token=...] "
+ "command line argument or an env variable [export RELEASER_GIT_OAUTH_TOKEN=...].");
return new RestTemplateBuilder()
.basicAuthorization(properties.getGit().getOauthToken(), "")
.build();
.basicAuthorization(properties.getGit().getOauthToken(), "").build();
}
}

View File

@@ -1,3 +1,35 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.io.File;
@@ -16,21 +48,31 @@ import org.springframework.context.ApplicationEventPublisher;
* @author Marcin Grzejszczak
*/
class Args {
private static final Logger log = LoggerFactory.getLogger(Args.class);
final Releaser releaser;
final File project;
final Projects projects;
final ProjectVersion originalVersion;
final ProjectVersion versionFromScRelease;
final ReleaserProperties properties;
final boolean interactive;
final TaskType taskType;
final ApplicationEventPublisher applicationEventPublisher;
Args(Releaser releaser, File project, Projects projects, ProjectVersion originalVersion,
ProjectVersion versionFromScRelease, ReleaserProperties properties,
boolean interactive, TaskType taskType, ApplicationEventPublisher applicationEventPublisher) {
Args(Releaser releaser, File project, Projects projects,
ProjectVersion originalVersion, ProjectVersion versionFromScRelease,
ReleaserProperties properties, boolean interactive, TaskType taskType,
ApplicationEventPublisher applicationEventPublisher) {
this.releaser = releaser;
this.project = project;
this.projects = projects;
@@ -43,10 +85,9 @@ class Args {
}
// Used by meta-release task
Args(Releaser releaser, Projects projects,
ProjectVersion versionFromScRelease,
ReleaserProperties properties,
boolean interactive, ApplicationEventPublisher applicationEventPublisher) {
Args(Releaser releaser, Projects projects, ProjectVersion versionFromScRelease,
ReleaserProperties properties, boolean interactive,
ApplicationEventPublisher applicationEventPublisher) {
this.releaser = releaser;
this.project = null;
this.projects = projects;
@@ -85,15 +126,12 @@ class Args {
@Override
public String toString() {
return "Args{" +
"releaser=" + this.releaser +
", project=" + this.project +
", projects=" + this.projects +
", originalVersion=" + this.originalVersion +
", versionFromScRelease=" + this.versionFromScRelease +
", properties=" + this.properties +
", interactive=" + this.interactive +
", taskType=" + this.taskType +
'}';
return "Args{" + "releaser=" + this.releaser + ", project=" + this.project
+ ", projects=" + this.projects + ", originalVersion="
+ this.originalVersion + ", versionFromScRelease="
+ this.versionFromScRelease + ", properties=" + this.properties
+ ", interactive=" + this.interactive + ", taskType=" + this.taskType
+ '}';
}
}

View File

@@ -5,7 +5,23 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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,
@@ -25,4 +41,5 @@ class BuildCompleted extends ReleaserTask {
BuildCompleted(Object source) {
super(source);
}
}

View File

@@ -1,3 +1,35 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
/**
@@ -5,7 +37,8 @@ package org.springframework.cloud.release.internal.spring;
*/
class ConsoleInputStepSkipper implements StepSkipper {
@Override public boolean skipStep() {
@Override
public boolean skipStep() {
String input = chosenOption();
switch (input.toLowerCase()) {
case "s":
@@ -21,4 +54,5 @@ class ConsoleInputStepSkipper implements StepSkipper {
String chosenOption() {
return System.console().readLine();
}
}

View File

@@ -1,3 +1,35 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.io.IOException;
@@ -11,6 +43,7 @@ import joptsimple.OptionParser;
import joptsimple.OptionSet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.release.internal.options.Options;
import org.springframework.cloud.release.internal.options.OptionsBuilder;
import org.springframework.cloud.release.internal.options.Parser;
@@ -37,27 +70,30 @@ class OptionsParser implements Parser {
.acceptsAll(Arrays.asList("f", "full-release"),
"Do you want to do the full release of a single project?")
.withOptionalArg().ofType(Boolean.class).defaultsTo(false);
ArgumentAcceptingOptionSpec<Boolean> interactiveOpt = parser
.acceptsAll(Arrays.asList("i", "interactive"),
"Do you want to set the properties from the command line of a single project?")
ArgumentAcceptingOptionSpec<Boolean> interactiveOpt = parser.acceptsAll(
Arrays.asList("i", "interactive"),
"Do you want to set the properties from the command line of a single project?")
.withRequiredArg().ofType(Boolean.class).defaultsTo(true);
Tasks.NON_COMPOSITE_TASKS.forEach(task ->
parser.acceptsAll(Arrays.asList(task.shortName, task.name),
task.description)
.withOptionalArg());
ArgumentAcceptingOptionSpec<String> startFromOpt = parser
.acceptsAll(Arrays.asList("a", "start-from"),
"Starts all release task starting from the given task. Requires passing the task name (either one letter or the full name)")
Tasks.NON_COMPOSITE_TASKS.forEach(
task -> parser.acceptsAll(Arrays.asList(task.shortName, task.name),
task.description).withOptionalArg());
ArgumentAcceptingOptionSpec<String> startFromOpt = parser.acceptsAll(
Arrays.asList("a", "start-from"),
"Starts all release task starting "
+ "from the given task. Requires passing the task name (either one letter or the full name)")
.withRequiredArg().ofType(String.class);
ArgumentAcceptingOptionSpec<String> taskNamesOpt = parser
.acceptsAll(Arrays.asList("tn", "task-names"),
"Starts all release task for the given task names")
.withRequiredArg().ofType(String.class).defaultsTo("");
ArgumentAcceptingOptionSpec<String> rangeOpt = parser.acceptsAll(Arrays.asList("r", "range"),
"Runs release tasks from the given range. Requires passing the task names with a hyphen. The first task is inclusive, the second inclusive. E.g. 's-m' would mean running 'snapshot', 'push' and 'milestone' tasks")
ArgumentAcceptingOptionSpec<String> rangeOpt = parser.acceptsAll(
Arrays.asList("r", "range"),
"Runs release tasks from the given range. Requires passing "
+ "the task names with a hyphen. The first task is inclusive, "
+ "the second inclusive. E.g. 's-m' would mean running 'snapshot', "
+ "'push' and 'milestone' tasks")
.withRequiredArg().ofType(String.class);
parser.acceptsAll(Arrays.asList("h", "help"))
.withOptionalArg();
parser.acceptsAll(Arrays.asList("h", "help")).withOptionalArg();
OptionSet options = parser.parse(args);
if (options.has("h")) {
printHelpMessage(parser);
@@ -66,36 +102,32 @@ class OptionsParser implements Parser {
Boolean metaRelease = options.valueOf(metaReleaseOpt);
Boolean interactive = options.valueOf(interactiveOpt);
Boolean fullRelease = options.has(fullReleaseOpt);
List<String> providedTaskNames = StringUtils.hasText(options.valueOf(taskNamesOpt)) ?
Arrays.asList(removeQuotingChars(options.valueOf(taskNamesOpt)).split(",")) :
new ArrayList<>();
providedTaskNames = providedTaskNames.stream()
.map(this::removeQuotingChars)
List<String> providedTaskNames = StringUtils.hasText(options
.valueOf(taskNamesOpt)) ? Arrays.asList(
removeQuotingChars(options.valueOf(taskNamesOpt)).split(","))
: new ArrayList<>();
providedTaskNames = providedTaskNames.stream().map(this::removeQuotingChars)
.collect(Collectors.toList());
log.info("Passed tasks {} from command line", providedTaskNames);
List<String> allTaskNames = Tasks.NON_COMPOSITE_TASKS.stream()
.map(task -> task.name)
.collect(Collectors.toList());
.map(task -> task.name).collect(Collectors.toList());
List<String> tasksFromOptions = Tasks.NON_COMPOSITE_TASKS.stream()
.filter(task -> options.has(task.name) || options.has(task.shortName))
.map(task -> task.name).collect(Collectors.toList());
if (providedTaskNames.isEmpty()) {
providedTaskNames.addAll(tasksFromOptions.isEmpty() && !metaRelease ?
allTaskNames : tasksFromOptions);
providedTaskNames.addAll(tasksFromOptions.isEmpty() && !metaRelease
? allTaskNames : tasksFromOptions);
}
List<String> taskNames = filterProvidedTaskNames(
providedTaskNames, allTaskNames, metaRelease);
List<String> taskNames = filterProvidedTaskNames(providedTaskNames,
allTaskNames, metaRelease);
String startFrom = options.valueOf(startFromOpt);
String range = options.valueOf(rangeOpt);
Options buildOptions = new OptionsBuilder()
.metaRelease(metaRelease)
.fullRelease(fullRelease)
.interactive(interactive)
.taskNames(taskNames)
.startFrom(startFrom)
.range(range)
.options();
log.info("\n\nWill use the following options to process the project\n\n{}\n\n", buildOptions);
Options buildOptions = new OptionsBuilder().metaRelease(metaRelease)
.fullRelease(fullRelease).interactive(interactive)
.taskNames(taskNames).startFrom(startFrom).range(range).options();
log.info(
"\n\nWill use the following options to process the project\n\n{}\n\n",
buildOptions);
return buildOptions;
}
catch (Exception e) {
@@ -109,8 +141,7 @@ class OptionsParser implements Parser {
if (metaRelease) {
return providedTaskNames;
}
return allTaskNames.stream()
.filter(providedTaskNames::contains)
return allTaskNames.stream().filter(providedTaskNames::contains)
.collect(Collectors.toList());
}
@@ -130,7 +161,8 @@ class OptionsParser implements Parser {
"java -jar spring-cloud-release-tools-spring-1.0.0.BUILD-SNAPSHOT.jar [options...] ");
try {
parser.printHelpOn(System.err);
} catch (IOException e1) {
}
catch (IOException e1) {
throw new IllegalStateException(e1);
}
System.err.println(examples());
@@ -141,23 +173,22 @@ class OptionsParser implements Parser {
System.out.println(intro());
parser.printHelpOn(System.out);
System.out.println(examples());
} catch (IOException e1) {
}
catch (IOException e1) {
throw new IllegalStateException(e1);
}
}
private String intro() {
return "\nHere you can find the list of tasks in order\n\n[" + Tasks.allTasksInOrder() + "]\n\n";
return "\nHere you can find the list of tasks in order\n\n["
+ Tasks.allTasksInOrder() + "]\n\n";
}
private String examples() {
return "\nExamples of usage:\n\n"
+ "Run 'build' & 'commit' & 'deploy'\n"
+ "java -jar jar.jar -b -c -d\n\n"
+ "Start from 'push'\n"
+ "java -jar releaser.jar -a push\n\n"
+ "Range 'docs' -> 'push'\n"
+ "java -jar releaser.jar -r o-p\n\n"
+ "\n\n";
return "\nExamples of usage:\n\n" + "Run 'build' & 'commit' & 'deploy'\n"
+ "java -jar jar.jar -b -c -d\n\n" + "Start from 'push'\n"
+ "java -jar releaser.jar -a push\n\n" + "Range 'docs' -> 'push'\n"
+ "java -jar releaser.jar -r o-p\n\n" + "\n\n";
}
}

View File

@@ -1,3 +1,35 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.util.ArrayList;
@@ -6,6 +38,7 @@ import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.release.internal.Releaser;
import org.springframework.cloud.release.internal.ReleaserProperties;
import org.springframework.cloud.release.internal.options.Options;
@@ -16,25 +49,33 @@ import org.springframework.util.StringUtils;
* @author Marcin Grzejszczak
*/
class OptionsProcessor {
private static final Logger log = LoggerFactory.getLogger(OptionsProcessor.class);
private final Releaser releaser;
private final ReleaserProperties properties;
private final List<Task> allTasks;
private final ApplicationEventPublisher applicationEventPublisher;
OptionsProcessor(Releaser releaser, ReleaserProperties properties, ApplicationEventPublisher applicationEventPublisher) {
this(releaser, properties, applicationEventPublisher, Tasks.ALL_TASKS_PER_PROJECT);
OptionsProcessor(Releaser releaser, ReleaserProperties properties,
ApplicationEventPublisher applicationEventPublisher) {
this(releaser, properties, applicationEventPublisher,
Tasks.ALL_TASKS_PER_PROJECT);
}
OptionsProcessor(Releaser releaser, ReleaserProperties properties, ApplicationEventPublisher applicationEventPublisher, List<Task> allTasks) {
OptionsProcessor(Releaser releaser, ReleaserProperties properties,
ApplicationEventPublisher applicationEventPublisher, List<Task> allTasks) {
this.releaser = releaser;
this.properties = properties;
this.allTasks = allTasks;
this.applicationEventPublisher = applicationEventPublisher;
}
OptionsProcessor(Releaser releaser, ReleaserProperties properties, List<Task> allTasks) {
OptionsProcessor(Releaser releaser, ReleaserProperties properties,
List<Task> allTasks) {
this.releaser = releaser;
this.properties = properties;
this.allTasks = allTasks;
@@ -53,27 +94,32 @@ class OptionsProcessor {
return;
}
String chosenOption = chosenOption();
int pickedInteger = StringUtils.hasText(chosenOption) ?
Integer.parseInt(chosenOption) : -1;
int pickedInteger = StringUtils.hasText(chosenOption)
? Integer.parseInt(chosenOption) : -1;
boolean pickedOptionIsComposite = pickedInteger <= 1 && pickedInteger >= 0;
boolean pickedOptionIsFromPostRelease = pickedInteger >= Tasks.ALL_TASKS_PER_PROJECT.size()
- Tasks.DEFAULT_TASKS_PER_RELEASE.size();
boolean pickedOptionIsFromPostRelease = pickedInteger >= Tasks.ALL_TASKS_PER_PROJECT
.size() - Tasks.DEFAULT_TASKS_PER_RELEASE.size();
if (options.metaRelease || options.fullRelease || pickedOptionIsComposite) {
postReleaseTask().execute(args);
} else if (pickedOptionIsFromPostRelease) {
}
else if (pickedOptionIsFromPostRelease) {
processNonComposite(options, tasks, args);
} else {
log.info("Picked option [{}] doesn't allow post release steps", pickedInteger);
}
else {
log.info("Picked option [{}] doesn't allow post release steps",
pickedInteger);
}
return;
}
if (options.fullRelease && !options.interactive) {
log.info("Executing a full release in non-interactive mode");
releaseTask().execute(args);
} else if (options.fullRelease && options.interactive) {
}
else if (options.fullRelease && options.interactive) {
log.info("Executing a full release in interactive mode");
releaseVerboseTask().execute(args);
} else {
}
else {
processNonComposite(options, tasks, args);
}
}
@@ -81,13 +127,17 @@ class OptionsProcessor {
private void processNonComposite(Options options, List<Task> tasks, Args args) {
if (StringUtils.hasText(options.startFrom)) {
startFrom(tasks, options, args);
} else if (StringUtils.hasText(options.range)) {
}
else if (StringUtils.hasText(options.range)) {
range(tasks, options.range, args);
} else if (!options.taskNames.isEmpty()) {
}
else if (!options.taskNames.isEmpty()) {
tasks(tasks, options.taskNames, args);
} else if (options.interactive) {
}
else if (options.interactive) {
interactiveOnly(tasks, args);
} else {
}
else {
throw new IllegalStateException("You haven't picked any recognizable option");
}
}
@@ -136,10 +186,12 @@ class OptionsProcessor {
if (sameRange) {
break;
}
} else if (started && (stop.equals(task.name) || stop.equals(task.shortName))) {
}
else if (started && (stop.equals(task.name) || stop.equals(task.shortName))) {
task.execute(defaultArgs);
break;
} else if (started) {
}
else if (started) {
task.execute(defaultArgs);
}
}
@@ -148,10 +200,12 @@ class OptionsProcessor {
private void startFrom(List<Task> tasks, Options options, Args defaultArgs) {
boolean started = false;
for (Task task : tasks) {
if (options.startFrom.equals(task.name) || options.startFrom.equals(task.shortName)) {
if (options.startFrom.equals(task.name)
|| options.startFrom.equals(task.shortName)) {
started = true;
task.execute(defaultArgs);
} else if (started) {
}
else if (started) {
task.execute(defaultArgs);
}
}
@@ -161,11 +215,17 @@ class OptionsProcessor {
StringBuilder msg = new StringBuilder();
msg.append("\n\n\n=== WHAT DO YOU WANT TO DO? ===\n\n");
for (int i = 0; i < this.allTasks.size(); i++) {
msg.append(i).append(") ").append(this.allTasks.get(i).description).append("\n");
msg.append(i).append(") ").append(this.allTasks.get(i).description)
.append("\n");
}
msg.append("\n").append("You can pick a range of options by using the hyphen - e.g. '2-4' will execute jobs [2,3,4]\n");
msg.append("You can execute all tasks starting from a job by using a hyphen and providing only one number - e.g. '8-' will execute jobs [8,9,10]\n");
msg.append("You can execute given tasks by providing a comma separated list of tasks - e.g. '3,7,8' will execute jobs [3,7,8]\n");
msg.append("\n").append(
"You can pick a range of options by using the hyphen - e.g. '2-4' will execute jobs [2,3,4]\n");
msg.append("You can execute all tasks starting from a job "
+ "by using a hyphen and providing only one "
+ "number - e.g. '8-' will execute jobs [8,9,10]\n");
msg.append("You can execute given tasks by providing a "
+ "comma separated list of tasks - e.g. "
+ "'3,7,8' will execute jobs [3,7,8]\n");
msg.append("\n").append("You can press 'q' to quit\n\n");
return msg;
}
@@ -178,9 +238,11 @@ class OptionsProcessor {
default:
if (input.contains("-")) {
rangeInteractive(tasks, defaultArgs, input);
} else if (input.contains(",")) {
}
else if (input.contains(",")) {
tasksInteractive(tasks, defaultArgs, input);
} else {
}
else {
singleTask(tasks, defaultArgs, input);
}
}
@@ -222,10 +284,12 @@ class OptionsProcessor {
private Args args(Args defaultArgs, boolean interactive) {
return new Args(this.releaser, defaultArgs.project, defaultArgs.projects,
defaultArgs.originalVersion, defaultArgs.versionFromScRelease,
this.properties, interactive, defaultArgs.taskType, this.applicationEventPublisher);
this.properties, interactive, defaultArgs.taskType,
this.applicationEventPublisher);
}
String chosenOption() {
return System.console() == null ? "-1" : System.console().readLine();
}
}

View File

@@ -1,18 +1,35 @@
/*
* Copyright 2013-2019 the original author or authors.
* Copyright 2013-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
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://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.
* 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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import org.springframework.beans.factory.annotation.Autowired;
@@ -47,10 +64,10 @@ class ReleaserConfiguration {
}
@Bean
SpringReleaser springReleaser(Releaser releaser,
ReleaserPropertiesUpdater updater,
SpringReleaser springReleaser(Releaser releaser, ReleaserPropertiesUpdater updater,
ApplicationEventPublisher applicationEventPublisher) {
return new SpringReleaser(releaser, this.properties, updater, applicationEventPublisher);
return new SpringReleaser(releaser, this.properties, updater,
applicationEventPublisher);
}
@Bean
@@ -79,14 +96,17 @@ class ReleaserConfiguration {
}
@Bean
SaganUpdater saganUpdater(SaganClient saganClient, ReleaserProperties releaserProperties) {
SaganUpdater saganUpdater(SaganClient saganClient,
ReleaserProperties releaserProperties) {
return new SaganUpdater(saganClient, releaserProperties);
}
@Bean
PostReleaseActions postReleaseActions(ProjectGitHandler handler, ProjectPomUpdater pomUpdater,
GradleUpdater gradleUpdater, ProjectBuilder projectBuilder, ReleaserProperties releaserProperties) {
return new PostReleaseActions(handler, pomUpdater, gradleUpdater, projectBuilder, releaserProperties);
PostReleaseActions postReleaseActions(ProjectGitHandler handler,
ProjectPomUpdater pomUpdater, GradleUpdater gradleUpdater,
ProjectBuilder projectBuilder, ReleaserProperties releaserProperties) {
return new PostReleaseActions(handler, pomUpdater, gradleUpdater, projectBuilder,
releaserProperties);
}
@Bean
@@ -99,9 +119,11 @@ class ReleaserConfiguration {
Releaser releaser(ProjectPomUpdater projectPomUpdater, ProjectBuilder projectBuilder,
ProjectGitHandler projectGitHandler, TemplateGenerator templateGenerator,
GradleUpdater gradleUpdater, SaganUpdater saganUpdater,
DocumentationUpdater documentationUpdater, PostReleaseActions postReleaseActions) {
DocumentationUpdater documentationUpdater,
PostReleaseActions postReleaseActions) {
return new Releaser(projectPomUpdater, projectBuilder, projectGitHandler,
templateGenerator, gradleUpdater, saganUpdater, documentationUpdater, postReleaseActions);
templateGenerator, gradleUpdater, saganUpdater, documentationUpdater,
postReleaseActions);
}
@Bean
@@ -113,4 +135,5 @@ class ReleaserConfiguration {
Parser optionsParser() {
return new OptionsParser();
}
}

View File

@@ -1,3 +1,35 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.io.File;
@@ -7,6 +39,7 @@ import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.context.properties.source.MapConfigurationPropertySource;
@@ -20,16 +53,19 @@ import org.springframework.core.io.FileSystemResource;
*/
class ReleaserPropertiesUpdater {
private static final Logger log = LoggerFactory.getLogger(ReleaserPropertiesUpdater.class);
private static final Logger log = LoggerFactory
.getLogger(ReleaserPropertiesUpdater.class);
private final ApplicationContext context;
public ReleaserPropertiesUpdater(ApplicationContext context) {
ReleaserPropertiesUpdater(ApplicationContext context) {
this.context = context;
}
ReleaserProperties updateProperties(ReleaserProperties properties, File clonedProjectFromOrg) {
ReleaserProperties props = updatePropertiesFromFile(properties, clonedProjectFromOrg);
ReleaserProperties updateProperties(ReleaserProperties properties,
File clonedProjectFromOrg) {
ReleaserProperties props = updatePropertiesFromFile(properties,
clonedProjectFromOrg);
log.info("Updated properties [\n\n{}\n\n]", props);
updateProperties(props);
return props;
@@ -50,25 +86,32 @@ class ReleaserPropertiesUpdater {
yamlProcessor.setResources(new FileSystemResource(releaserConfig));
Properties properties = yamlProcessor.getObject();
ReleaserProperties releaserProperties = new Binder(
new MapConfigurationPropertySource(properties.entrySet().stream().collect(
Collectors.toMap(
e -> e.getKey().toString(),
e -> e.getValue().toString()
)
))).bind("releaser", ReleaserProperties.class).get();
new MapConfigurationPropertySource(properties.entrySet().stream()
.collect(Collectors.toMap(e -> e.getKey().toString(),
e -> e.getValue().toString()))))
.bind("releaser",
ReleaserProperties.class)
.get();
log.info("config/releaser.yml found. Will update the current properties");
copy.getMaven().setBuildCommand(releaserProperties.getMaven().getBuildCommand());
copy.getMaven().setDeployCommand(releaserProperties.getMaven().getDeployCommand());
copy.getGradle().setGradlePropsSubstitution(releaserProperties.getGradle().getGradlePropsSubstitution());
copy.getGradle().setIgnoredGradleRegex(releaserProperties.getGradle().getIgnoredGradleRegex());
copy.getMaven()
.setBuildCommand(releaserProperties.getMaven().getBuildCommand());
copy.getMaven().setDeployCommand(
releaserProperties.getMaven().getDeployCommand());
copy.getGradle().setGradlePropsSubstitution(
releaserProperties.getGradle().getGradlePropsSubstitution());
copy.getGradle().setIgnoredGradleRegex(
releaserProperties.getGradle().getIgnoredGradleRegex());
}
catch (Exception e) {
throw new IllegalStateException(e);
}
} else {
log.info("No config/releaser.yml found. Will NOT update the current properties");
}
log.info("Updating working directory to [{}]", clonedProjectFromOrg.getAbsolutePath());
else {
log.info(
"No config/releaser.yml found. Will NOT update the current properties");
}
log.info("Updating working directory to [{}]",
clonedProjectFromOrg.getAbsolutePath());
copy.setWorkingDir(clonedProjectFromOrg.getAbsolutePath());
return copy;
}
@@ -76,4 +119,5 @@ class ReleaserPropertiesUpdater {
File releaserConfig(File clonedProjectFromOrg) {
return new File(clonedProjectFromOrg, "config/releaser.yml");
}
}
}

View File

@@ -5,7 +5,23 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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,
@@ -19,7 +35,9 @@ package org.springframework.cloud.release.internal.spring;
import org.springframework.context.ApplicationEvent;
class ReleaserTask extends ApplicationEvent {
ReleaserTask(Object source) {
super(source);
}
}

View File

@@ -1,3 +1,35 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.io.File;
@@ -18,26 +50,33 @@ import org.springframework.context.ApplicationEventPublisher;
import org.springframework.util.StringUtils;
/**
* Releaser that gets input from console
* Releaser that gets input from console.
*
* @author Marcin Grzejszczak
*/
public class SpringReleaser {
private static final Logger log = LoggerFactory.getLogger(SpringReleaser.class);
private final Releaser releaser;
private final ReleaserProperties properties;
private final OptionsProcessor optionsProcessor;
private final ReleaserPropertiesUpdater updater;
private final ApplicationEventPublisher applicationEventPublisher;
public SpringReleaser(Releaser releaser, ReleaserProperties properties,
ReleaserPropertiesUpdater updater, ApplicationEventPublisher applicationEventPublisher) {
ReleaserPropertiesUpdater updater,
ApplicationEventPublisher applicationEventPublisher) {
this.releaser = releaser;
this.properties = properties;
this.updater = updater;
this.applicationEventPublisher = applicationEventPublisher;
this.optionsProcessor = new OptionsProcessor(releaser, properties, applicationEventPublisher);
this.optionsProcessor = new OptionsProcessor(releaser, properties,
applicationEventPublisher);
}
SpringReleaser(Releaser releaser, ReleaserProperties properties,
@@ -51,7 +90,7 @@ public class SpringReleaser {
}
/**
* Default behaviour - interactive mode
* Default behaviour - interactive mode.
*/
public void release() {
release(new OptionsBuilder().options());
@@ -64,7 +103,8 @@ public class SpringReleaser {
}
if (this.properties.isPostReleaseTasksOnly()) {
log.info("Skipping release process and moving only to post release");
this.optionsProcessor.postReleaseOptions(options, postReleaseOptionsAgs(options, projectsAndVersion));
this.optionsProcessor.postReleaseOptions(options,
postReleaseOptionsAgs(options, projectsAndVersion));
buildCompleted();
return;
}
@@ -76,64 +116,81 @@ public class SpringReleaser {
this.applicationEventPublisher.publishEvent(new BuildCompleted(this));
}
private void performReleaseAndPostRelease(Options options, ProjectsAndVersion projectsAndVersion) {
private void performReleaseAndPostRelease(Options options,
ProjectsAndVersion projectsAndVersion) {
if (options.metaRelease) {
ReleaserProperties original = this.properties.copy();
log.debug("The following properties were found [{}]", original);
metaReleaseProjects(options)
.forEach(project ->
processProjectForMetaRelease(original.copy(), options, project));
} else {
log.info("Single project release picked. Will release only the current project");
.forEach(project -> processProjectForMetaRelease(original.copy(),
options, project));
}
else {
log.info(
"Single project release picked. Will release only the current project");
File projectFolder = projectFolder();
projectsAndVersion = processProject(options, projectFolder, TaskType.RELEASE);
}
this.optionsProcessor.postReleaseOptions(options, postReleaseOptionsAgs(options, projectsAndVersion));
this.optionsProcessor.postReleaseOptions(options,
postReleaseOptionsAgs(options, projectsAndVersion));
}
private void prepareForMetaRelease(Options options) {
log.info("Meta Release picked. Will iterate over all projects and perform release of each one");
log.info(
"Meta Release picked. Will iterate over all projects and perform release of each one");
this.properties.getGit().setFetchVersionsFromGit(false);
this.properties.getMetaRelease().setEnabled(options.metaRelease);
}
void processProjectForMetaRelease(ReleaserProperties copy, Options options, String project) {
void processProjectForMetaRelease(ReleaserProperties copy, Options options,
String project) {
log.info("Original properties [\n\n{}\n\n]", copy);
File clonedProjectFromOrg = this.releaser.clonedProjectFromOrg(project);
updatePropertiesIfCustomConfigPresent(copy, clonedProjectFromOrg);
log.info("Successfully cloned the project [{}] to [{}]", project, clonedProjectFromOrg);
log.info("Successfully cloned the project [{}] to [{}]", project,
clonedProjectFromOrg);
try {
processProject(options, clonedProjectFromOrg, TaskType.RELEASE);
} catch (Exception e) {
log.error("\n\n\nBUILD FAILED!!!\n\nException occurred for project <" +
project + "> \n\n", e);
}
catch (Exception e) {
log.error("\n\n\nBUILD FAILED!!!\n\nException occurred for project <"
+ project + "> \n\n", e);
throw e;
}
}
private ReleaserProperties updatePropertiesIfCustomConfigPresent(ReleaserProperties copy,
File clonedProjectFromOrg) {
private ReleaserProperties updatePropertiesIfCustomConfigPresent(
ReleaserProperties copy, File clonedProjectFromOrg) {
return this.updater.updateProperties(copy, clonedProjectFromOrg);
}
List<String> metaReleaseProjects(Options options) {
List<String> projects = new ArrayList<>(this.properties.getFixedVersions().keySet());
log.info("List of projects that should not be cloned {}", this.properties.getMetaRelease().getProjectsToSkip());
List<String> filteredProjects = projects.stream()
.filter(project -> !this.properties.getMetaRelease().getProjectsToSkip().contains(project))
List<String> projects = new ArrayList<>(
this.properties.getFixedVersions().keySet());
log.info("List of projects that should not be cloned {}",
this.properties.getMetaRelease().getProjectsToSkip());
List<String> filteredProjects = projects
.stream().filter(project -> !this.properties.getMetaRelease()
.getProjectsToSkip().contains(project))
.collect(Collectors.toList());
log.info("List of all projects to clone before filtering {}", filteredProjects);
if (StringUtils.hasText(options.startFrom)) {
log.info("Start from option provided [{}]", options.startFrom);
int projectIndex = filteredProjects.indexOf(options.startFrom);
if (projectIndex < 0) throw new IllegalStateException("Project [" + options.startFrom + "] not found");
if (log.isDebugEnabled()) {
log.debug("Index of project [{}] is [{}]", options.startFrom, projectIndex);
if (projectIndex < 0) {
throw new IllegalStateException(
"Project [" + options.startFrom + "] not found");
}
filteredProjects = filteredProjects.subList(projectIndex, filteredProjects.size());
if (log.isDebugEnabled()) {
log.debug("Index of project [{}] is [{}]", options.startFrom,
projectIndex);
}
filteredProjects = filteredProjects.subList(projectIndex,
filteredProjects.size());
options.startFrom = "";
enforceFullRelease(options);
} else if (!options.taskNames.isEmpty()) {
}
else if (!options.taskNames.isEmpty()) {
log.info("Task names provided {}", options.taskNames);
filteredProjects = filteredProjects.stream()
.filter(project -> options.taskNames.contains(project))
@@ -141,7 +198,8 @@ public class SpringReleaser {
options.taskNames = new ArrayList<>();
enforceFullRelease(options);
}
log.info("\n\n\nFor meta-release, will release the projects {}\n\n\n", filteredProjects);
log.info("\n\n\nFor meta-release, will release the projects {}\n\n\n",
filteredProjects);
return filteredProjects;
}
@@ -155,39 +213,46 @@ public class SpringReleaser {
}
Args postReleaseOptionsAgs(Options options, ProjectsAndVersion projectsAndVersion) {
Projects projects = projectsAndVersion == null ?
projectsToUpdateForFixedVersions() : projectsAndVersion.projectVersions;
ProjectVersion version = projects.containsProject(this.properties.getMetaRelease().getReleaseTrainProjectName()) ?
projects.releaseTrain(this.properties) : versionFromBranch();
Projects projects = projectsAndVersion == null
? projectsToUpdateForFixedVersions() : projectsAndVersion.projectVersions;
ProjectVersion version = projects.containsProject(
this.properties.getMetaRelease().getReleaseTrainProjectName())
? projects.releaseTrain(this.properties) : versionFromBranch();
if (options.metaRelease) {
this.properties.getPom().setBranch(version.version);
}
return new Args(this.releaser, projects, version,
this.properties, options.interactive, this.applicationEventPublisher);
return new Args(this.releaser, projects, version, this.properties,
options.interactive, this.applicationEventPublisher);
}
private ProjectVersion versionFromBranch() {
String branch = this.properties.getPom().getBranch();
return new ProjectVersion(projectFolder().getName(), branch.startsWith("v") ? branch.substring(1) : branch);
return new ProjectVersion(projectFolder().getName(),
branch.startsWith("v") ? branch.substring(1) : branch);
}
private ProjectsAndVersion projects(File project) {
ProjectVersion versionFromScRelease;
Projects projectsToUpdate;
log.info("Fetch from git [{}], meta release [{}]", this.properties.getGit().isFetchVersionsFromGit(),
log.info("Fetch from git [{}], meta release [{}]",
this.properties.getGit().isFetchVersionsFromGit(),
this.properties.getMetaRelease().isEnabled());
if (this.properties.getGit().isFetchVersionsFromGit() && !this.properties.getMetaRelease().isEnabled()) {
if (this.properties.getGit().isFetchVersionsFromGit()
&& !this.properties.getMetaRelease().isEnabled()) {
printVersionRetrieval();
projectsToUpdate = this.releaser.retrieveVersionsFromSCRelease();
versionFromScRelease = projectsToUpdate.forFile(project);
assertNoSnapshotsForANonSnapshotProject(projectsToUpdate, versionFromScRelease);
} else {
assertNoSnapshotsForANonSnapshotProject(projectsToUpdate,
versionFromScRelease);
}
else {
ProjectVersion originalVersion = new ProjectVersion(project);
String fixedVersionForProject = this.properties.getFixedVersions()
.get(project.getName());
versionFromScRelease = StringUtils.hasText(fixedVersionForProject) ?
new ProjectVersion(originalVersion.projectName, fixedVersionForProject) :
new ProjectVersion(project);
versionFromScRelease = StringUtils.hasText(fixedVersionForProject)
? new ProjectVersion(originalVersion.projectName,
fixedVersionForProject)
: new ProjectVersion(project);
projectsToUpdate = this.properties.getFixedVersions().entrySet().stream()
.map(entry -> new ProjectVersion(entry.getKey(), entry.getValue()))
.collect(Collectors.toCollection(Projects::new));
@@ -197,21 +262,12 @@ public class SpringReleaser {
return new ProjectsAndVersion(projectsToUpdate, versionFromScRelease);
}
class ProjectsAndVersion {
final Projects projectVersions;
final ProjectVersion versionFromScRelease;
ProjectsAndVersion(Projects projectVersions, ProjectVersion versionFromScRelease) {
this.projectVersions = projectVersions;
this.versionFromScRelease = versionFromScRelease;
}
}
ProjectsAndVersion processProject(Options options, File project, TaskType taskType) {
ProjectsAndVersion projectsAndVersion = projects(project);
ProjectVersion originalVersion = new ProjectVersion(project);
final Args defaultArgs = new Args(this.releaser, project, projectsAndVersion.projectVersions,
originalVersion, projectsAndVersion.versionFromScRelease, this.properties,
final Args defaultArgs = new Args(this.releaser, project,
projectsAndVersion.projectVersions, originalVersion,
projectsAndVersion.versionFromScRelease, this.properties,
options.interactive, taskType, this.applicationEventPublisher);
log.debug("Processing project [{}] with args [{}]", project, defaultArgs);
this.optionsProcessor.processOptions(options, defaultArgs);
@@ -225,24 +281,42 @@ public class SpringReleaser {
}
private void printVersionRetrieval() {
log.info("\n\n\n=== RETRIEVING VERSIONS ===\n\nWill clone Spring Cloud Release"
+ " to retrieve all versions for the branch [{}]", this.properties.getPom().getBranch());
log.info(
"\n\n\n=== RETRIEVING VERSIONS ===\n\nWill clone Spring Cloud Release"
+ " to retrieve all versions for the branch [{}]",
this.properties.getPom().getBranch());
}
private void printSettingVersionFromFixedVersions(Projects projectsToUpdate) {
log.info("\n\n\n=== RETRIEVED VERSIONS ===\n\nWill use the fixed versions"
+ " of projects\n\n{}", projectsToUpdate
.stream().map(p -> p.projectName + " => " + p.version)
.collect(Collectors.joining("\n")));
log.info(
"\n\n\n=== RETRIEVED VERSIONS ===\n\nWill use the fixed versions"
+ " of projects\n\n{}",
projectsToUpdate.stream().map(p -> p.projectName + " => " + p.version)
.collect(Collectors.joining("\n")));
}
private void assertNoSnapshotsForANonSnapshotProject(Projects projects,
ProjectVersion versionFromScRelease) {
if (!versionFromScRelease.isSnapshot() && projects.containsSnapshots()) {
throw new IllegalStateException("You are trying to release a non snapshot "
+ "version [" + versionFromScRelease + "] of the project [" + versionFromScRelease.projectName + "] but "
+ "version [" + versionFromScRelease + "] of the project ["
+ versionFromScRelease.projectName + "] but "
+ "there is at least one SNAPSHOT library version in the Spring Cloud Release project");
}
}
}
class ProjectsAndVersion {
final Projects projectVersions;
final ProjectVersion versionFromScRelease;
ProjectsAndVersion(Projects projectVersions,
ProjectVersion versionFromScRelease) {
this.projectVersions = projectVersions;
this.versionFromScRelease = versionFromScRelease;
}
}
}

View File

@@ -1,3 +1,35 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
/**
@@ -6,5 +38,7 @@ package org.springframework.cloud.release.internal.spring;
* @author Marcin Grzejszczak
*/
interface StepSkipper {
boolean skipStep();
}

View File

@@ -1,3 +1,35 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.util.function.Consumer;
@@ -12,16 +44,21 @@ import org.springframework.cloud.release.internal.tech.MakeBuildUnstableExceptio
*/
class Task {
private static final Logger log = LoggerFactory.getLogger(Task.class);
private static final String MSG = "\nPress 'q' to quit, 's' to skip, any key to continue\n\n";
static StepSkipper stepSkipper = new ConsoleInputStepSkipper();
private static final Logger log = LoggerFactory.getLogger(Task.class);
private static final String MSG = "\nPress 'q' to quit, 's' to skip, any key to continue\n\n";
final String name;
final String shortName;
final String header;
final String description;
final TaskType taskType;
private final Consumer<Args> consumer;
Task(String name, String shortName, String header, String description,
@@ -41,8 +78,7 @@ class Task {
TaskAndException execute(Args args) {
TaskAndException taskAndException = doExecute(args);
args.publishEvent(new TaskCompleted(this,
args.projectName(), taskAndException));
args.publishEvent(new TaskCompleted(this, args.projectName(), taskAndException));
return taskAndException;
}
@@ -61,12 +97,14 @@ class Task {
return runTask(args);
}
return TaskAndException.skipped(this);
} else {
}
else {
return runTask(args);
}
}
catch (MakeBuildUnstableException atTheEnd) {
logError("TASK FAILED - WILL MARK THE BUILD UNSTABLE AT THE END!!!", args, atTheEnd);
logError("TASK FAILED - WILL MARK THE BUILD UNSTABLE AT THE END!!!", args,
atTheEnd);
return TaskAndException.failure(this, atTheEnd);
}
catch (Exception e) {
@@ -79,9 +117,9 @@ class Task {
}
private void logError(String prefix, Args args, Exception e) {
log.error("\n\n\n" + prefix + "\n\nException occurred for project <" +
(args.project != null ? args.project.getName() : "") + "> task <" +
this.name + "> \n\nwith description <" + this.description + ">\n\n", e);
log.error("\n\n\n" + prefix + "\n\nException occurred for project <"
+ (args.project != null ? args.project.getName() : "") + "> task <"
+ this.name + "> \n\nwith description <" + this.description + ">\n\n", e);
}
private TaskAndException runTask(Args args) {
@@ -90,6 +128,8 @@ class Task {
}
private void printLog(boolean interactive) {
log.info("\n\n\n=== {} ===\n\n{} {}\n\n", this.header, this.description, interactive ? MSG : "");
log.info("\n\n\n=== {} ===\n\n{} {}\n\n", this.header, this.description,
interactive ? MSG : "");
}
}

View File

@@ -14,15 +14,33 @@
* limitations under the License.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
/**
* @author Marcin Grzejszczak
*/
class TaskAndException {
final class TaskAndException {
final Task task;
final TaskState taskState;
final Exception exception;
private TaskAndException(Task task, TaskState taskState) {
@@ -50,8 +68,9 @@ class TaskAndException {
}
enum TaskState {
SKIPPED, SUCCESS, FAILURE
}
}

View File

@@ -5,7 +5,23 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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,
@@ -53,20 +69,21 @@ class TaskCollector implements ApplicationListener<ReleaserTask> {
.filter(table1 -> StringUtils.hasText(table1.thrownException))
.collect(Collectors.toList());
if (!brokenTasks.isEmpty()) {
String brokenBuilds = "\n\n[BUILD UNSTABLE] The following release tasks are failing!\n\n" +
brokenTasks.stream()
.map(table1 ->
String.format("***** Project / Task : <%s/%s> ***** \nTask Description <%s>\nException Stacktrace \n\n%s",
table1.projectName, table1.taskCaption,
table1.taskDescription, table1.exception + "\n" + Arrays
.stream(table1.exception.getStackTrace())
.map(StackTraceElement::toString)
.collect(Collectors.joining("\n"))))
String brokenBuilds = "\n\n[BUILD UNSTABLE] The following release tasks are failing!\n\n"
+ brokenTasks.stream().map(table1 -> String.format(
"***** Project / Task : <%s/%s> ***** \nTask Description <%s>\nException Stacktrace \n\n%s",
table1.projectName, table1.taskCaption,
table1.taskDescription,
table1.exception + "\n"
+ Arrays.stream(table1.exception.getStackTrace())
.map(StackTraceElement::toString)
.collect(Collectors.joining("\n"))))
.collect(Collectors.joining("\n\n"));
log.warn(string + brokenBuilds);
this.completedTasks.clear();
throw new IllegalStateException(brokenBuilds);
} else {
}
else {
log.info(string);
this.completedTasks.clear();
}
@@ -76,27 +93,36 @@ class TaskCollector implements ApplicationListener<ReleaserTask> {
public void onApplicationEvent(ReleaserTask event) {
if (event instanceof TaskCompleted) {
handleTaskCompleted((TaskCompleted) event);
} else if (event instanceof BuildCompleted) {
}
else if (event instanceof BuildCompleted) {
handleBuildCompleted((BuildCompleted) event);
}
}
}
class Table {
final String projectName;
final String taskCaption;
final String taskDescription;
final String taskState;
final String thrownException;
Exception exception;
Table(String projectName, TaskAndException tae) {
this.projectName = StringUtils.hasText(projectName) ? projectName : "Post Release";
this.projectName = StringUtils.hasText(projectName) ? projectName
: "Post Release";
this.taskCaption = tae.task.name;
this.taskDescription = tae.task.description;
this.taskState = tae.taskState.name().toLowerCase();
this.thrownException = tae.exception == null ? "" :
NestedExceptionUtils.getMostSpecificCause(tae.exception).toString();
this.thrownException = tae.exception == null ? ""
: NestedExceptionUtils.getMostSpecificCause(tae.exception).toString();
this.exception = tae.exception;
}
@@ -119,4 +145,5 @@ class Table {
public String getThrownException() {
return this.thrownException;
}
}

View File

@@ -5,7 +5,23 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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,
@@ -19,6 +35,7 @@ package org.springframework.cloud.release.internal.spring;
class TaskCompleted extends ReleaserTask {
final String projectName;
final TaskAndException taskAndException;
/**
@@ -33,9 +50,8 @@ class TaskCompleted extends ReleaserTask {
@Override
public String toString() {
return "TaskCompleted{" +
"projectName='" + this.projectName + '\'' +
", taskName=" + this.taskAndException.task.name +
'}';
return "TaskCompleted{" + "projectName='" + this.projectName + '\''
+ ", taskName=" + this.taskAndException.task.name + '}';
}
}

View File

@@ -1,3 +1,35 @@
/*
* Copyright 2013-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
*
* http://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.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.util.ArrayList;
@@ -7,123 +39,98 @@ import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* All tasks that can be executed by the releaser
* All tasks that can be executed by the releaser.
*
* @author Marcin Grzejszczak
*/
class Tasks {
static Task UPDATING_POMS = task("updatePoms", "u",
"UPDATING POMS",
final class Tasks {
private Tasks() {
throw new IllegalStateException("Can't instantiate a utility class");
}
static Task UPDATING_POMS = task("updatePoms", "u", "UPDATING POMS",
"Update poms with versions from Spring Cloud Release",
args -> args.releaser.updateProjectFromBom(args.project, args.projects, args.versionFromScRelease));
static Task BUILD_PROJECT = task("build", "b",
"BUILD PROJECT",
"Build the project",
args -> args.releaser.updateProjectFromBom(args.project, args.projects,
args.versionFromScRelease));
static Task BUILD_PROJECT = task("build", "b", "BUILD PROJECT", "Build the project",
args -> args.releaser.buildProject(args.versionFromScRelease));
static Task COMMIT = task("commit", "c",
"COMMITTING (ALL) AND PUSHING TAGS (NON-SNAPSHOTS)",
"Commit, tag and push the tag",
args -> args.releaser.commitAndPushTags(args.project, args.versionFromScRelease));
static Task DEPLOY = task("deploy", "d",
"ARTIFACT DEPLOYMENT",
"Commit, tag and push the tag", args -> args.releaser
.commitAndPushTags(args.project, args.versionFromScRelease));
static Task DEPLOY = task("deploy", "d", "ARTIFACT DEPLOYMENT",
"Deploy the artifacts",
args -> args.releaser.deploy(args.versionFromScRelease));
static Task PUBLISH_DOCS = task("docs", "o",
"PUBLISHING DOCS",
"Publish the docs",
static Task PUBLISH_DOCS = task("docs", "o", "PUBLISHING DOCS", "Publish the docs",
args -> args.releaser.publishDocs(args.versionFromScRelease));
static Task SNAPSHOTS = task("snapshots", "s",
"REVERTING CHANGES & BUMPING VERSION (RELEASE ONLY)",
"Go back to snapshots and bump originalVersion by patch",
args -> args.releaser.rollbackReleaseVersion(args.project, args.projects, args.versionFromScRelease));
static Task PUSH = task("push", "p",
"PUSHING CHANGES",
"Push the commits",
args -> args.releaser.rollbackReleaseVersion(args.project, args.projects,
args.versionFromScRelease));
static Task PUSH = task("push", "p", "PUSHING CHANGES", "Push the commits",
args -> args.releaser.pushCurrentBranch(args.project));
static Task CLOSE_MILESTONE = task("closeMilestone", "m",
"CLOSING MILESTONE",
static Task CLOSE_MILESTONE = task("closeMilestone", "m", "CLOSING MILESTONE",
"Close the milestone at Github",
args -> args.releaser.closeMilestone(args.versionFromScRelease));
static Task CREATE_TEMPLATES = task("createTemplates", "t",
"CREATING TEMPLATES",
"Create email / blog / tweet etc. templates",
args -> {
static Task CREATE_TEMPLATES = task("createTemplates", "t", "CREATING TEMPLATES",
"Create email / blog / tweet etc. templates", args -> {
args.releaser.createEmail(args.versionFromScRelease, args.projects);
args.releaser.createBlog(args.versionFromScRelease, args.projects);
args.releaser.createTweet(args.versionFromScRelease, args.projects);
args.releaser.createReleaseNotes(args.versionFromScRelease, args.projects);
},TaskType.POST_RELEASE);
static Task UPDATE_GUIDES = task("updateGuides", "ug",
"UPDATE GUIDES",
"Updating Spring Guides",
args -> {
args.releaser.updateSpringGuides(args.versionFromScRelease, args.projects);
},TaskType.POST_RELEASE);
static Task UPDATE_SAGAN = task("updateSagan", "g",
"UPDATE SAGAN",
"Updating Sagan with release info",
args -> {
args.releaser.createReleaseNotes(args.versionFromScRelease,
args.projects);
}, TaskType.POST_RELEASE);
static Task UPDATE_GUIDES = task("updateGuides", "ug", "UPDATE GUIDES",
"Updating Spring Guides", args -> {
args.releaser.updateSpringGuides(args.versionFromScRelease,
args.projects);
}, TaskType.POST_RELEASE);
static Task UPDATE_SAGAN = task("updateSagan", "g", "UPDATE SAGAN",
"Updating Sagan with release info", args -> {
args.releaser.updateSagan(args.project, args.versionFromScRelease);
});
});
static Task UPDATE_DOCUMENTATION = task("updateDocumentation", "ud",
"UPDATE DOCUMENTATION",
"Updating documentation repository",
args -> {
args.releaser.updateDocumentationRepository(args.properties, args.versionFromScRelease);
},TaskType.POST_RELEASE);
"UPDATE DOCUMENTATION", "Updating documentation repository", args -> {
args.releaser.updateDocumentationRepository(args.properties,
args.versionFromScRelease);
}, TaskType.POST_RELEASE);
static Task UPDATE_SPRING_PROJECT_PAGE = task("updateSpringProjectPage", "up",
"UPDATE SPRING PROJECT PAGE",
"Updating Spring Project page",
args -> {
"UPDATE SPRING PROJECT PAGE", "Updating Spring Project page", args -> {
args.releaser.updateSpringProjectPage(args.projects);
},TaskType.POST_RELEASE);
}, TaskType.POST_RELEASE);
static Task RUN_UPDATED_SAMPLES = task("runUpdatedSample", "ru",
"UPDATE AND RUN SAMPLES",
"Updates the sample project with versions and runs samples",
args -> {
"Updates the sample project with versions and runs samples", args -> {
args.releaser.runUpdatedSamples(args.projects);
},TaskType.POST_RELEASE);
}, TaskType.POST_RELEASE);
static Task UPDATE_RELEASE_TRAIN_DOCUMENTATION = task("updateReleaseTrainDocs", "ur",
"UPDATE RELEASE TRAIN DOCS",
"Update release train documentation",
args -> {
"UPDATE RELEASE TRAIN DOCS", "Update release train documentation", args -> {
args.releaser.generateReleaseTrainDocumentation(args.projects);
},TaskType.POST_RELEASE);
}, TaskType.POST_RELEASE);
static Task UPDATE_ALL_SAMPLES = task("updateAllSamples", "ua",
"UPDATE ALL SAMPLES WITH RELEASE TRAIN BUMPED VERSIONS",
"Update all samples with release train bumped versions",
args -> {
"Update all samples with release train bumped versions", args -> {
args.releaser.updateAllSamples(args.projects);
},TaskType.POST_RELEASE);
}, TaskType.POST_RELEASE);
static Task UPDATE_RELEASE_TRAIN_WIKI = task("updateReleaseTrainWiki", "uw",
"UPDATE RELEASE TRAIN WIKI",
"Update release train wiki page",
args -> {
"UPDATE RELEASE TRAIN WIKI", "Update release train wiki page", args -> {
args.releaser.updateReleaseTrainWiki(args.projects);
},TaskType.POST_RELEASE);
}, TaskType.POST_RELEASE);
static final List<Task> DEFAULT_TASKS_PER_PROJECT = Stream.of(
Tasks.UPDATING_POMS,
Tasks.BUILD_PROJECT,
Tasks.COMMIT,
Tasks.DEPLOY,
Tasks.PUBLISH_DOCS,
Tasks.SNAPSHOTS,
Tasks.PUSH,
Tasks.CLOSE_MILESTONE,
Tasks.UPDATE_SAGAN
).collect(Collectors.toList());
static final List<Task> DEFAULT_TASKS_PER_PROJECT = Stream
.of(Tasks.UPDATING_POMS, Tasks.BUILD_PROJECT, Tasks.COMMIT, Tasks.DEPLOY,
Tasks.PUBLISH_DOCS, Tasks.SNAPSHOTS, Tasks.PUSH,
Tasks.CLOSE_MILESTONE, Tasks.UPDATE_SAGAN)
.collect(Collectors.toList());
static final List<Task> DEFAULT_TASKS_PER_RELEASE = Stream.of(
Tasks.RUN_UPDATED_SAMPLES,
Tasks.CREATE_TEMPLATES,
Tasks.UPDATE_GUIDES,
Tasks.UPDATE_RELEASE_TRAIN_DOCUMENTATION,
Tasks.UPDATE_DOCUMENTATION,
Tasks.UPDATE_SPRING_PROJECT_PAGE,
Tasks.UPDATE_RELEASE_TRAIN_WIKI,
Tasks.UPDATE_ALL_SAMPLES
).collect(Collectors.toList());
static final List<Task> DEFAULT_TASKS_PER_RELEASE = Stream
.of(Tasks.RUN_UPDATED_SAMPLES, Tasks.CREATE_TEMPLATES, Tasks.UPDATE_GUIDES,
Tasks.UPDATE_RELEASE_TRAIN_DOCUMENTATION, Tasks.UPDATE_DOCUMENTATION,
Tasks.UPDATE_SPRING_PROJECT_PAGE, Tasks.UPDATE_RELEASE_TRAIN_WIKI,
Tasks.UPDATE_ALL_SAMPLES)
.collect(Collectors.toList());
static final List<Task> NON_COMPOSITE_TASKS = new ArrayList<Task>() {
{
@@ -132,12 +139,10 @@ class Tasks {
}
};
static Task RELEASE = Tasks.task("release", "fr",
"FULL RELEASE",
static Task RELEASE = Tasks.task("release", "fr", "FULL RELEASE",
"Perform a full release of this project without interruptions",
args -> new CompositeConsumer(DEFAULT_TASKS_PER_PROJECT).accept(args));
static Task POST_RELEASE = Tasks.task("postRelease", "pr",
"POST RELEASE TASKS",
static Task POST_RELEASE = Tasks.task("postRelease", "pr", "POST RELEASE TASKS",
"Perform post release tasks for this release without interruptions",
args -> new CompositeConsumer(DEFAULT_TASKS_PER_RELEASE).accept(args),
TaskType.POST_RELEASE);
@@ -145,23 +150,19 @@ class Tasks {
"FULL VERBOSE RELEASE",
"Perform a full release of this project in interactive mode (you'll be asked about skipping steps)",
args -> new CompositeConsumer(DEFAULT_TASKS_PER_PROJECT).accept(args));
static Task META_RELEASE = Tasks.task("metaRelease", "x",
"META RELEASE",
static Task META_RELEASE = Tasks.task("metaRelease", "x", "META RELEASE",
"Perform a meta release of projects",
args -> new CompositeConsumer(DEFAULT_TASKS_PER_PROJECT,
(args1 -> args.properties.getMetaRelease().setEnabled(true)))
.accept(args));
.accept(args));
static final List<Task> COMPOSITE_TASKS = Stream.of(
RELEASE,
RELEASE_VERBOSE,
META_RELEASE,
POST_RELEASE
).collect(Collectors.toList());
static final List<Task> COMPOSITE_TASKS = Stream
.of(RELEASE, RELEASE_VERBOSE, META_RELEASE, POST_RELEASE)
.collect(Collectors.toList());
static final List<Task> ALL_TASKS_PER_PROJECT = Stream.of(
COMPOSITE_TASKS, DEFAULT_TASKS_PER_PROJECT, DEFAULT_TASKS_PER_RELEASE
).flatMap(List::stream).collect(Collectors.toList());
static final List<Task> ALL_TASKS_PER_PROJECT = Stream
.of(COMPOSITE_TASKS, DEFAULT_TASKS_PER_PROJECT, DEFAULT_TASKS_PER_RELEASE)
.flatMap(List::stream).collect(Collectors.toList());
static Task task(String name, String shortName, String header, String description,
Consumer<Args> function) {
@@ -174,28 +175,34 @@ class Tasks {
}
static List<Task> forNames(List<Task> tasks, List<String> names) {
return tasks.stream()
.filter(task -> names.contains(task.name) || names.contains(task.shortName))
return tasks.stream().filter(
task -> names.contains(task.name) || names.contains(task.shortName))
.collect(Collectors.toList());
}
static String allTasksInOrder() {
return ALL_TASKS_PER_PROJECT.stream().map(task -> task.name).collect(Collectors.joining(","));
return ALL_TASKS_PER_PROJECT.stream().map(task -> task.name)
.collect(Collectors.joining(","));
}
}
enum TaskType {
RELEASE, POST_RELEASE
}
class CompositeConsumer implements Consumer<Args> {
private final List<Task> tasks;
private final Consumer<Args> setup;
CompositeConsumer(List<Task> tasks) {
this.tasks = tasks;
this.setup = args -> {};
this.setup = args -> {
};
}
CompositeConsumer(List<Task> tasks, Consumer<Args> setup) {
@@ -209,4 +216,4 @@ class CompositeConsumer implements Consumer<Args> {
this.tasks.forEach(task -> task.execute(args));
}
}
}

View File

@@ -1,3 +1,3 @@
spring:
main:
web-application-type: none
web-application-type: none

View File

@@ -1,7 +1,22 @@
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.docs;
import java.io.File;
import java.io.IOException;
import org.springframework.cloud.release.internal.ReleaserProperties;
import org.springframework.cloud.release.internal.git.ProjectGitHandler;
@@ -14,13 +29,15 @@ import org.springframework.cloud.release.internal.template.TemplateGenerator;
public class TestDocumentationUpdater extends DocumentationUpdater {
public TestDocumentationUpdater(ReleaserProperties properties,
TestProjectDocumentationUpdater updater, TestReleaseContentsUpdater testRelease) {
TestProjectDocumentationUpdater updater,
TestReleaseContentsUpdater testRelease) {
super(properties, updater, testRelease);
}
public static class TestReleaseContentsUpdater extends ReleaseTrainContentsUpdater {
public TestReleaseContentsUpdater(ReleaserProperties properties, ProjectGitHandler handler, TemplateGenerator templateGenerator) {
public TestReleaseContentsUpdater(ReleaserProperties properties,
ProjectGitHandler handler, TemplateGenerator templateGenerator) {
super(properties, handler, templateGenerator);
}
@@ -28,13 +45,16 @@ public class TestDocumentationUpdater extends DocumentationUpdater {
public File updateProjectRepo(Projects projects) {
return super.updateProjectRepo(projects);
}
}
public static class TestProjectDocumentationUpdater extends ProjectDocumentationUpdater {
public static class TestProjectDocumentationUpdater
extends ProjectDocumentationUpdater {
private final String version;
public TestProjectDocumentationUpdater(ReleaserProperties properties, ProjectGitHandler gitHandler, String version) {
public TestProjectDocumentationUpdater(ReleaserProperties properties,
ProjectGitHandler gitHandler, String version) {
super(properties, gitHandler);
this.version = version;
}
@@ -45,21 +65,17 @@ public class TestDocumentationUpdater extends DocumentationUpdater {
}
private String response() {
return "<!DOCTYPE HTML>\n"
+ "\n"
+ "<meta charset=\"UTF-8\">\n"
+ "<meta http-equiv=\"refresh\" content=\"1; url=http://cloud.spring.io/spring-cloud-static/" + this.version + "/\">\n"
+ "\n"
+ "<script>\n"
+ " window.location.href = \"http://cloud.spring.io/spring-cloud-static/" + this.version + "/\"\n"
+ "</script>\n"
+ "\n"
+ "<title>Page Redirection</title>\n"
+ "\n"
return "<!DOCTYPE HTML>\n" + "\n" + "<meta charset=\"UTF-8\">\n"
+ "<meta http-equiv=\"refresh\" content=\"1; url=http://cloud.spring.io/spring-cloud-static/"
+ this.version + "/\">\n" + "\n" + "<script>\n"
+ " window.location.href = \"http://cloud.spring.io/spring-cloud-static/"
+ this.version + "/\"\n" + "</script>\n" + "\n"
+ "<title>Page Redirection</title>\n" + "\n"
+ "<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->\n"
+ "If you are not redirected automatically, follow the <a href='http://cloud.spring.io/spring-cloud-static/" + this.version + "/'>link to latest release</a>\n";
+ "If you are not redirected automatically, follow the <a href='http://cloud.spring.io/spring-cloud-static/"
+ this.version + "/'>link to latest release</a>\n";
}
}
}

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.git;
import java.io.File;
@@ -17,7 +33,7 @@ public class GitTestUtils {
public static void setOriginOnProjectToTmp(File origin, File project)
throws GitAPIException, MalformedURLException {
try(Git git = openGitProject(project)) {
try (Git git = openGitProject(project)) {
RemoteRemoveCommand remove = git.remoteRemove();
remove.setName("origin");
remove.call();
@@ -33,8 +49,10 @@ public class GitTestUtils {
return new GitRepo.JGitFactory().open(project);
}
public static File clonedProject(File baseDir, File projectToClone) throws IOException {
public static File clonedProject(File baseDir, File projectToClone)
throws IOException {
GitRepo projectRepo = new GitRepo(baseDir);
return projectRepo.cloneProject(new URIish(projectToClone.toURI().toURL()));
}
}

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.pom;
import java.io.File;
@@ -14,4 +30,5 @@ public class TestPomReader {
public Model readPom(File pom) {
return this.pomReader.readPom(pom);
}
}

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.pom;
import java.io.File;
@@ -11,13 +27,15 @@ public class TestUtils {
prepareLocalRepo("target/test-classes/projects/", "spring-cloud");
prepareLocalRepo("target/test-classes/projects/", "spring-cloud-wiki");
prepareLocalRepo("target/test-classes/projects/", "spring-cloud-release");
prepareLocalRepo("target/test-classes/projects/", "spring-cloud-release-with-snapshot");
prepareLocalRepo("target/test-classes/projects/",
"spring-cloud-release-with-snapshot");
prepareLocalRepo("target/test-classes/projects/", "spring-cloud-consul");
prepareLocalRepo("target/test-classes/projects/", "spring-cloud-build");
prepareLocalRepo("target/test-classes/projects/", "spring-cloud-static-angel");
}
private static void prepareLocalRepo(String buildDir, String repoPath) throws IOException {
private static void prepareLocalRepo(String buildDir, String repoPath)
throws IOException {
File dotGit = new File(buildDir + repoPath + "/.git");
File git = new File(buildDir + repoPath + "/git");
if (git.exists()) {
@@ -28,4 +46,4 @@ public class TestUtils {
git.renameTo(dotGit);
}
}
}

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.io.File;
@@ -60,29 +76,51 @@ import static org.mockito.ArgumentMatchers.anyString;
*/
public class AcceptanceTests {
@Rule public TemporaryFolder tmp = new TemporaryFolder();
@Rule public OutputCapture capture = new OutputCapture();
@Rule
public TemporaryFolder tmp = new TemporaryFolder();
@Rule
public OutputCapture capture = new OutputCapture();
TestPomReader testPomReader = new TestPomReader();
File springCloudConsulProject;
File temporaryFolder;
File documentationFolder;
File cloudProjectFolder;
TestProjectGitHandler gitHandler;
NonAssertingTestProjectGitHandler nonAssertingGitHandler;
SaganClient saganClient = Mockito.mock(SaganClient.class);
ReleaserProperties releaserProperties;
TemplateGenerator templateGenerator;
SaganUpdater saganUpdater;
DocumentationUpdater documentationUpdater;
ApplicationContext applicationContext = Mockito.mock(ApplicationContext.class);
ReleaserPropertiesUpdater updater = new ReleaserPropertiesUpdater(this.applicationContext);
ReleaserPropertiesUpdater updater = new ReleaserPropertiesUpdater(
this.applicationContext);
PostReleaseActions postReleaseActions = Mockito.mock(PostReleaseActions.class);
ApplicationEventPublisher applicationEventPublisher = Mockito.mock(ApplicationEventPublisher.class);
ApplicationEventPublisher applicationEventPublisher = Mockito
.mock(ApplicationEventPublisher.class);
@Before
public void setup() throws Exception {
this.temporaryFolder = this.tmp.newFolder();
this.springCloudConsulProject = new File(AcceptanceTests.class.getResource("/projects/spring-cloud-consul").toURI());
this.springCloudConsulProject = new File(AcceptanceTests.class
.getResource("/projects/spring-cloud-consul").toURI());
TestUtils.prepareLocalRepo();
FileSystemUtils.copyRecursively(file("/projects/"), this.temporaryFolder);
BDDMockito.given(this.saganClient.getProject(anyString()))
@@ -97,12 +135,8 @@ public class AcceptanceTests {
private Project newProject() {
Project project = new Project();
project.projectReleases.addAll(Arrays.asList(
release("1.0.0.M8"),
release("1.1.0.M8"),
release("1.2.0.M8"),
release("2.0.0.M8"))
);
project.projectReleases.addAll(Arrays.asList(release("1.0.0.M8"),
release("1.1.0.M8"), release("1.2.0.M8"), release("2.0.0.M8")));
return project;
}
@@ -114,33 +148,42 @@ public class AcceptanceTests {
}
@Test
public void should_fail_to_perform_a_release_of_consul_when_sc_release_contains_snapshots() throws Exception {
File origin = GitTestUtils.clonedProject(this.tmp.newFolder(), this.springCloudConsulProject);
public void should_fail_to_perform_a_release_of_consul_when_sc_release_contains_snapshots()
throws Exception {
File origin = GitTestUtils.clonedProject(this.tmp.newFolder(),
this.springCloudConsulProject);
pomVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
consulPomParentVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
File project = GitTestUtils.clonedProject(this.tmp.newFolder(), tmpFile("spring-cloud-consul"));
File project = GitTestUtils.clonedProject(this.tmp.newFolder(),
tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
SpringReleaser releaser = releaserWithSnapshotScRelease(project, "spring-cloud-consul",
"vCamden.SR5.BROKEN", "1.1.2.RELEASE");
SpringReleaser releaser = releaserWithSnapshotScRelease(project,
"spring-cloud-consul", "vCamden.SR5.BROKEN", "1.1.2.RELEASE");
BDDAssertions.thenThrownBy(releaser::release)
.hasMessageContaining("there is at least one SNAPSHOT library version in the Spring Cloud Release project");
BDDAssertions.thenThrownBy(releaser::release).hasMessageContaining(
"there is at least one SNAPSHOT library version in the Spring Cloud Release project");
}
@Test
public void should_not_clone_when_option_not_to_clone_was_switched_on() throws Exception {
File origin = GitTestUtils.clonedProject(this.tmp.newFolder(), this.springCloudConsulProject);
public void should_not_clone_when_option_not_to_clone_was_switched_on()
throws Exception {
File origin = GitTestUtils.clonedProject(this.tmp.newFolder(),
this.springCloudConsulProject);
pomVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
consulPomParentVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
File project = GitTestUtils.clonedProject(this.tmp.newFolder(), tmpFile("spring-cloud-consul"));
File project = GitTestUtils.clonedProject(this.tmp.newFolder(),
tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
SpringReleaser releaser = templateOnlyReleaser(project, "spring-cloud-consul",
"vCamden.SR5", "1.1.2.RELEASE");
this.releaserProperties.getGit().setFetchVersionsFromGit(false);
this.releaserProperties.getFixedVersions().put("spring-cloud-release", "Finchley.RELEASE");
this.releaserProperties.getFixedVersions().put("spring-cloud-consul", "2.3.4.RELEASE");
this.releaserProperties.getFixedVersions().put("spring-cloud-release",
"Finchley.RELEASE");
this.releaserProperties.getFixedVersions().put("spring-cloud-consul",
"2.3.4.RELEASE");
File temporaryDestination = this.tmp.newFolder();
this.releaserProperties.getGit().setCloneDestinationDir(temporaryDestination.getAbsolutePath());
this.releaserProperties.getGit()
.setCloneDestinationDir(temporaryDestination.getAbsolutePath());
releaser.release();
@@ -149,40 +192,43 @@ public class AcceptanceTests {
@Test
public void should_perform_a_release_of_consul() throws Exception {
File origin = GitTestUtils.clonedProject(this.tmp.newFolder(), this.springCloudConsulProject);
File origin = GitTestUtils.clonedProject(this.tmp.newFolder(),
this.springCloudConsulProject);
pomVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
consulPomParentVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
File project = GitTestUtils.clonedProject(this.tmp.newFolder(), tmpFile("spring-cloud-consul"));
File project = GitTestUtils.clonedProject(this.tmp.newFolder(),
tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
SpringReleaser releaser = releaser(project, "spring-cloud-consul","vCamden.SR5", "1.1.2.RELEASE");
SpringReleaser releaser = releaser(project, "spring-cloud-consul", "vCamden.SR5",
"1.1.2.RELEASE");
releaser.release();
Iterable<RevCommit> commits = listOfCommits(project);
Iterator<RevCommit> iterator = commits.iterator();
tagIsPresentInOrigin(origin, "v1.1.2.RELEASE");
commitIsPresent(iterator, "Bumping versions to 1.2.1.BUILD-SNAPSHOT after release");
commitIsPresent(iterator,
"Bumping versions to 1.2.1.BUILD-SNAPSHOT after release");
commitIsPresent(iterator, "Going back to snapshots");
commitIsPresent(iterator, "Update SNAPSHOT to 1.1.2.RELEASE");
pomVersionIsEqualTo(project, "1.2.1.BUILD-SNAPSHOT");
consulPomParentVersionIsEqualTo(project, "1.2.1.BUILD-SNAPSHOT");
then(this.gitHandler.closedMilestones).isTrue();
then(emailTemplate()).exists();
then(emailTemplateContents())
.contains("Spring Cloud Camden.SR5 available")
then(emailTemplateContents()).contains("Spring Cloud Camden.SR5 available")
.contains("Spring Cloud Camden SR5 Train release");
then(blogTemplate()).exists();
then(blogTemplateContents())
.contains("I am pleased to announce that the Service Release 5 (SR5)");
then(releaseNotesTemplate()).exists();
then(releaseNotesTemplateContents())
.contains("Camden.SR5")
.contains("- Spring Cloud Config `1.2.2.RELEASE` ([issues](http://foo.bar.com/1.2.2.RELEASE))")
.contains("- Spring Cloud Aws `1.1.3.RELEASE` ([issues](http://foo.bar.com/1.1.3.RELEASE))");
then(releaseNotesTemplateContents()).contains("Camden.SR5").contains(
"- Spring Cloud Config `1.2.2.RELEASE` ([issues](http://foo.bar.com/1.2.2.RELEASE))")
.contains(
"- Spring Cloud Aws `1.1.3.RELEASE` ([issues](http://foo.bar.com/1.1.3.RELEASE))");
// once for updating GA
// second time to update SNAPSHOT
BDDMockito.then(this.saganClient).should(BDDMockito.times(2)).updateRelease(BDDMockito.eq("spring-cloud-consul"),
BDDMockito.anyList());
BDDMockito.then(this.saganClient).should(BDDMockito.times(2)).updateRelease(
BDDMockito.eq("spring-cloud-consul"), BDDMockito.anyList());
BDDMockito.then(this.saganClient).should().deleteRelease("spring-cloud-consul",
"1.1.2.BUILD-SNAPSHOT");
BDDMockito.then(this.saganClient).should().deleteRelease("spring-cloud-consul",
@@ -193,13 +239,13 @@ public class AcceptanceTests {
.deleteRelease("spring-cloud-build", "2.0.0.M8");
then(this.gitHandler.issueCreatedInSpringGuides).isTrue();
then(text(new File(this.documentationFolder, "current/index.html")))
.doesNotContain("Angel.SR3")
.contains("Camden.SR5");
.doesNotContain("Angel.SR3").contains("Camden.SR5");
thenRunUpdatedTestsWereCalled();
}
@Test
public void should_perform_a_meta_release_of_sc_release_and_consul() throws Exception {
public void should_perform_a_meta_release_of_sc_release_and_consul()
throws Exception {
// simulates an org
SpringReleaser releaser = metaReleaser(edgwareSr10());
@@ -213,7 +259,9 @@ public class AcceptanceTests {
thenDocumentationWasUpdated();
BDDAssertions.then(clonedProject("spring-cloud-consul").tagList().call())
.extracting("name").contains("refs/tags/v1.3.5.RELEASE");
BDDAssertions.then(gitProject(this.cloudProjectFolder).log().call().iterator().next().getShortMessage())
BDDAssertions
.then(gitProject(this.cloudProjectFolder).log().call().iterator().next()
.getShortMessage())
.contains("Updating project page to release train [Edgware.SR10]");
thenRunUpdatedTestsWereCalled();
thenUpdateReleaseTrainDocsWasCalled();
@@ -254,45 +302,48 @@ public class AcceptanceTests {
}
private Git clonedProject(String name) {
return GitTestUtils
.openGitProject(this.nonAssertingGitHandler.clonedProjects.stream()
.filter(file -> file.getName().equals(name))
.findFirst().get());
return GitTestUtils.openGitProject(this.nonAssertingGitHandler.clonedProjects
.stream().filter(file -> file.getName().equals(name)).findFirst().get());
}
private Git gitProject(File file) {
return GitTestUtils
.openGitProject(file);
return GitTestUtils.openGitProject(file);
}
private void thenSaganWasCalled() {
BDDMockito.then(this.saganUpdater).should(BDDMockito.atLeastOnce())
.updateSagan(BDDMockito.anyString(),
BDDMockito.any(ProjectVersion.class), BDDMockito
.any(ProjectVersion.class));
BDDMockito.then(this.saganUpdater).should(BDDMockito.atLeastOnce()).updateSagan(
BDDMockito.anyString(), BDDMockito.any(ProjectVersion.class),
BDDMockito.any(ProjectVersion.class));
}
private void thenAllStepsWereExecutedForEachProject() {
this.nonAssertingGitHandler.clonedProjects
.stream().filter(f -> !f.getName().contains("angel") && !f.getName().equals("spring-cloud"))
this.nonAssertingGitHandler.clonedProjects.stream()
.filter(f -> !f.getName().contains("angel")
&& !f.getName().equals("spring-cloud"))
.forEach(project -> {
then(Arrays.asList("spring-cloud-starter-build",
"spring-cloud-consul")).contains(pom(project).getArtifactId());
then(this.capture.toString()).contains("executed_build", "executed_deploy", "executed_docs");
"spring-cloud-consul"))
.contains(pom(project).getArtifactId());
then(this.capture.toString()).contains("executed_build",
"executed_deploy", "executed_docs");
});
}
@Test
public void should_not_clone_any_projects_when_they_are_on_list_of_projects_to_skip() throws Exception {
public void should_not_clone_any_projects_when_they_are_on_list_of_projects_to_skip()
throws Exception {
Map<String, String> versions = new HashMap<>();
versions.put("spring-cloud-release", "Camden.BUILD-SNAPSHOT");
versions.put("spring-cloud-consul", "1.1.2.BUILD-SNAPSHOT");
SpringReleaser releaser = metaReleaser(versions);
this.releaserProperties.getMetaRelease().getProjectsToSkip().add("spring-cloud-release");
this.releaserProperties.getMetaRelease().getProjectsToSkip().add("spring-cloud-consul");
this.releaserProperties.getMetaRelease().getProjectsToSkip()
.add("spring-cloud-release");
this.releaserProperties.getMetaRelease().getProjectsToSkip()
.add("spring-cloud-consul");
this.releaserProperties.getGit().setUpdateReleaseTrainWiki(false);
File temporaryDestination = this.tmp.newFolder();
this.releaserProperties.getGit().setCloneDestinationDir(temporaryDestination.getAbsolutePath());
this.releaserProperties.getGit()
.setCloneDestinationDir(temporaryDestination.getAbsolutePath());
releaser.release(new OptionsBuilder().metaRelease(true).options());
@@ -300,7 +351,8 @@ public class AcceptanceTests {
}
@Test
public void should_perform_a_meta_release_of_consul_only_when_run_from_got_passed() throws Exception {
public void should_perform_a_meta_release_of_consul_only_when_run_from_got_passed()
throws Exception {
// simulates an org
Map<String, String> versions = new HashMap<>();
versions.put("spring-cloud-release", "Camden.BUILD-SNAPSHOT");
@@ -309,16 +361,16 @@ public class AcceptanceTests {
SpringReleaser releaser = metaReleaser(versions);
releaser.release(new OptionsBuilder().metaRelease(true)
.startFrom("spring-cloud-consul")
.options());
.startFrom("spring-cloud-consul").options());
// consul, cloud
then(this.nonAssertingGitHandler.clonedProjects).hasSize(2);
this.nonAssertingGitHandler.clonedProjects
.stream().filter(file -> file.getName().equals("spring-cloud-consul"))
this.nonAssertingGitHandler.clonedProjects.stream()
.filter(file -> file.getName().equals("spring-cloud-consul"))
.forEach(project -> {
then(pom(project).getArtifactId()).isEqualTo("spring-cloud-consul");
then(this.capture.toString()).contains("executed_build", "executed_deploy", "executed_docs");
then(this.capture.toString()).contains("executed_build",
"executed_deploy", "executed_docs");
});
thenSaganWasCalled();
thenDocumentationWasUpdated();
@@ -326,7 +378,8 @@ public class AcceptanceTests {
}
@Test
public void should_perform_a_meta_release_of_consul_only_when_task_names_got_passed() throws Exception {
public void should_perform_a_meta_release_of_consul_only_when_task_names_got_passed()
throws Exception {
// simulates an org
Map<String, String> versions = new HashMap<>();
versions.put("spring-cloud-release", "Camden.BUILD-SNAPSHOT");
@@ -335,18 +388,17 @@ public class AcceptanceTests {
SpringReleaser releaser = metaReleaser(versions);
releaser.release(new OptionsBuilder().metaRelease(true)
.taskNames(Collections.singletonList("spring-cloud-consul"))
.options());
.taskNames(Collections.singletonList("spring-cloud-consul")).options());
// consul, cloud
then(this.nonAssertingGitHandler.clonedProjects).hasSize(2);
this.nonAssertingGitHandler.clonedProjects
.stream().filter(file -> !file.getName().equals("spring-cloud"))
this.nonAssertingGitHandler.clonedProjects.stream()
.filter(file -> !file.getName().equals("spring-cloud"))
.forEach(project -> {
then(Collections.singletonList("spring-cloud-consul"))
.contains(pom(project).getArtifactId());
then(this.capture.toString()).contains("executed_build", "executed_deploy",
"executed_docs");
then(this.capture.toString()).contains("executed_build",
"executed_deploy", "executed_docs");
});
thenSaganWasCalled();
thenDocumentationWasUpdated();
@@ -354,9 +406,8 @@ public class AcceptanceTests {
}
private void thenDocumentationWasUpdated() {
BDDMockito.then(this.documentationUpdater).should()
.updateDocsRepo(BDDMockito.any(ProjectVersion.class), BDDMockito
.anyString());
BDDMockito.then(this.documentationUpdater).should().updateDocsRepo(
BDDMockito.any(ProjectVersion.class), BDDMockito.anyString());
}
private void thenWikiPageWasUpdated() {
@@ -368,13 +419,16 @@ public class AcceptanceTests {
@Test
public void should_perform_a_release_of_sc_build() throws Exception {
File origin = GitTestUtils.clonedProject(this.tmp.newFolder(),
new File(AcceptanceTests.class.getResource("/projects/spring-cloud-build").toURI()));
new File(AcceptanceTests.class.getResource("/projects/spring-cloud-build")
.toURI()));
pomVersionIsEqualTo(origin, "1.3.7.BUILD-SNAPSHOT");
pomParentVersionIsEqualTo(origin, "spring-cloud-build-dependencies", "1.5.9.RELEASE");
File project = GitTestUtils.clonedProject(this.tmp.newFolder(), tmpFile("spring-cloud-build"));
pomParentVersionIsEqualTo(origin, "spring-cloud-build-dependencies",
"1.5.9.RELEASE");
File project = GitTestUtils.clonedProject(this.tmp.newFolder(),
tmpFile("spring-cloud-build"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
SpringReleaser releaser = releaser(project, "spring-cloud-build",
"vCamden.SR5", "1.2.2.RELEASE");
SpringReleaser releaser = releaser(project, "spring-cloud-build", "vCamden.SR5",
"1.2.2.RELEASE");
releaser.release();
@@ -382,47 +436,52 @@ public class AcceptanceTests {
Iterator<RevCommit> iterator = commits.iterator();
tagIsPresentInOrigin(origin, "v1.2.2.RELEASE");
// we're running against camden sc-release
commitIsPresent(iterator, "Bumping versions to 1.3.8.BUILD-SNAPSHOT after release");
commitIsPresent(iterator,
"Bumping versions to 1.3.8.BUILD-SNAPSHOT after release");
commitIsPresent(iterator, "Going back to snapshots");
commitIsPresent(iterator, "Update SNAPSHOT to 1.2.2.RELEASE");
pomVersionIsEqualTo(project, "1.3.8.BUILD-SNAPSHOT");
pomParentVersionIsEqualTo(project, "spring-cloud-build-dependencies", "1.4.4.RELEASE");
pomParentVersionIsEqualTo(project, "spring-cloud-build-dependencies",
"1.4.4.RELEASE");
then(this.gitHandler.closedMilestones).isTrue();
then(emailTemplate()).exists();
then(blogTemplate()).exists();
then(releaseNotesTemplate()).exists();
// once for updating GA
// second time to update SNAPSHOT
BDDMockito.then(this.saganClient).should(BDDMockito.times(2)).updateRelease(BDDMockito.eq("spring-cloud-build"),
BDDMockito.anyList());
BDDMockito.then(this.saganClient).should()
.deleteRelease("spring-cloud-build", "1.2.2.BUILD-SNAPSHOT");
BDDMockito.then(this.saganClient).should()
.deleteRelease("spring-cloud-build", "1.2.0.M8");
BDDMockito.then(this.saganClient).should(BDDMockito.times(2))
.updateRelease(BDDMockito.eq("spring-cloud-build"), BDDMockito.anyList());
BDDMockito.then(this.saganClient).should().deleteRelease("spring-cloud-build",
"1.2.2.BUILD-SNAPSHOT");
BDDMockito.then(this.saganClient).should().deleteRelease("spring-cloud-build",
"1.2.0.M8");
BDDMockito.then(this.saganClient).should(BDDMockito.never())
.deleteRelease("spring-cloud-build", "1.1.0.M8");
BDDMockito.then(this.saganClient).should(BDDMockito.never())
.deleteRelease("spring-cloud-build", "2.0.0.M8");
then(this.gitHandler.issueCreatedInSpringGuides).isTrue();
then(text(new File(this.documentationFolder, "current/index.html")))
.doesNotContain("Angel.SR3")
.contains("Camden.SR5");
.doesNotContain("Angel.SR3").contains("Camden.SR5");
}
@Test
public void should_perform_a_release_of_consul_rc1() throws Exception {
File origin = GitTestUtils.clonedProject(this.tmp.newFolder(), this.springCloudConsulProject);
File origin = GitTestUtils.clonedProject(this.tmp.newFolder(),
this.springCloudConsulProject);
pomVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
consulPomParentVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
File project = GitTestUtils.clonedProject(this.tmp.newFolder(), tmpFile("spring-cloud-consul"));
File project = GitTestUtils.clonedProject(this.tmp.newFolder(),
tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
SpringReleaser releaser = releaser(project, "spring-cloud-consul", "Dalston.RC1", "1.2.0.RC1");
SpringReleaser releaser = releaser(project, "spring-cloud-consul", "Dalston.RC1",
"1.2.0.RC1");
releaser.release();
Iterable<RevCommit> commits = listOfCommits(project);
tagIsPresentInOrigin(origin, "v1.2.0.RC1");
commitIsNotPresent(commits, "Bumping versions to 1.2.1.BUILD-SNAPSHOT after release");
commitIsNotPresent(commits,
"Bumping versions to 1.2.1.BUILD-SNAPSHOT after release");
Iterator<RevCommit> iterator = listOfCommits(project).iterator();
commitIsPresent(iterator, "Going back to snapshots");
commitIsPresent(iterator, "Update SNAPSHOT to 1.2.0.RC1");
@@ -430,8 +489,7 @@ public class AcceptanceTests {
consulPomParentVersionIsEqualTo(project, "1.2.0.BUILD-SNAPSHOT");
then(this.gitHandler.closedMilestones).isTrue();
then(emailTemplate()).exists();
then(emailTemplateContents())
.contains("Spring Cloud Dalston.RC1 available")
then(emailTemplateContents()).contains("Spring Cloud Dalston.RC1 available")
.contains("Spring Cloud Dalston RC1 Train release");
then(blogTemplate()).exists();
then(blogTemplateContents())
@@ -440,38 +498,39 @@ public class AcceptanceTests {
then(tweetTemplateContents())
.contains("The Dalston.RC1 version of @springcloud has been released!");
then(releaseNotesTemplate()).exists();
then(releaseNotesTemplateContents())
.contains("Dalston.RC1")
.contains("- Spring Cloud Build `1.3.1.RELEASE` ([issues](http://foo.bar.com/1.3.1.RELEASE))")
.contains("- Spring Cloud Bus `1.3.0.M1` ([issues](http://foo.bar.com/1.3.0.M1))");
BDDMockito.then(this.saganClient).should().updateRelease(BDDMockito.eq("spring-cloud-consul"),
BDDMockito.anyList());
BDDMockito.then(this.saganClient).should()
.deleteRelease("spring-cloud-consul","1.2.0.M8");
BDDMockito.then(this.saganClient).should()
.deleteRelease("spring-cloud-consul","1.2.0.RC1");
then(releaseNotesTemplateContents()).contains("Dalston.RC1").contains(
"- Spring Cloud Build `1.3.1.RELEASE` ([issues](http://foo.bar.com/1.3.1.RELEASE))")
.contains(
"- Spring Cloud Bus `1.3.0.M1` ([issues](http://foo.bar.com/1.3.0.M1))");
BDDMockito.then(this.saganClient).should().updateRelease(
BDDMockito.eq("spring-cloud-consul"), BDDMockito.anyList());
BDDMockito.then(this.saganClient).should().deleteRelease("spring-cloud-consul",
"1.2.0.M8");
BDDMockito.then(this.saganClient).should().deleteRelease("spring-cloud-consul",
"1.2.0.RC1");
// we update guides only for SR / RELEASE
then(this.gitHandler.issueCreatedInSpringGuides).isFalse();
// haven't even checked out the branch
then(new File(this.documentationFolder, "current/index.html"))
.doesNotExist();
then(new File(this.documentationFolder, "current/index.html")).doesNotExist();
}
@Test
public void should_generate_templates_only() throws Exception {
File origin = GitTestUtils.clonedProject(this.tmp.newFolder(), this.springCloudConsulProject);
File origin = GitTestUtils.clonedProject(this.tmp.newFolder(),
this.springCloudConsulProject);
pomVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
consulPomParentVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
File project = GitTestUtils.clonedProject(this.tmp.newFolder(), tmpFile("spring-cloud-consul"));
File project = GitTestUtils.clonedProject(this.tmp.newFolder(),
tmpFile("spring-cloud-consul"));
GitTestUtils.setOriginOnProjectToTmp(origin, project);
SpringReleaser releaser = templateOnlyReleaser(project, "spring-cloud-consul","Dalston.RC1", "1.2.0.RC1");
SpringReleaser releaser = templateOnlyReleaser(project, "spring-cloud-consul",
"Dalston.RC1", "1.2.0.RC1");
releaser.release();
then(this.gitHandler.closedMilestones).isFalse();
then(emailTemplate()).exists();
then(emailTemplateContents())
.contains("Spring Cloud Dalston.RC1 available")
then(emailTemplateContents()).contains("Spring Cloud Dalston.RC1 available")
.contains("Spring Cloud Dalston RC1 Train release");
then(blogTemplate()).exists();
then(blogTemplateContents())
@@ -480,12 +539,12 @@ public class AcceptanceTests {
then(tweetTemplateContents())
.contains("The Dalston.RC1 version of @springcloud has been released!");
then(releaseNotesTemplate()).exists();
then(releaseNotesTemplateContents())
.contains("Dalston.RC1")
.contains("- Spring Cloud Build `1.3.1.RELEASE` ([issues](http://foo.bar.com/1.3.1.RELEASE))")
.contains("- Spring Cloud Bus `1.3.0.M1` ([issues](http://foo.bar.com/1.3.0.M1)");
BDDMockito.then(this.saganClient).should(BDDMockito.never()).updateRelease(
BDDMockito.anyString(), BDDMockito.anyList());
then(releaseNotesTemplateContents()).contains("Dalston.RC1").contains(
"- Spring Cloud Build `1.3.1.RELEASE` ([issues](http://foo.bar.com/1.3.1.RELEASE))")
.contains(
"- Spring Cloud Bus `1.3.0.M1` ([issues](http://foo.bar.com/1.3.0.M1)");
BDDMockito.then(this.saganClient).should(BDDMockito.never())
.updateRelease(BDDMockito.anyString(), BDDMockito.anyList());
then(this.gitHandler.issueCreatedInSpringGuides).isFalse();
}
@@ -494,8 +553,7 @@ public class AcceptanceTests {
}
private void pomParentVersionIsEqualTo(File project, String child, String expected) {
then(pom(new File(project, child)).getParent()
.getVersion()).isEqualTo(expected);
then(pom(new File(project, child)).getParent().getVersion()).isEqualTo(expected);
}
private void consulPomParentVersionIsEqualTo(File project, String expected) {
@@ -506,22 +564,21 @@ public class AcceptanceTests {
then(pom(project).getVersion()).isEqualTo(expected);
}
private void commitIsPresent(Iterator<RevCommit> iterator,
String expected) {
private void commitIsPresent(Iterator<RevCommit> iterator, String expected) {
RevCommit commit = iterator.next();
then(commit.getShortMessage()).isEqualTo(expected);
}
private void commitIsNotPresent(Iterable<RevCommit> commits,
String expected) {
private void commitIsNotPresent(Iterable<RevCommit> commits, String expected) {
for (RevCommit commit : commits) {
then(commit.getShortMessage()).isNotEqualTo(expected);
}
}
private void tagIsPresentInOrigin(File origin, String expectedTag) throws GitAPIException {
then(GitTestUtils.openGitProject(origin).tagList()
.call().iterator().next().getName()).endsWith(expectedTag);
private void tagIsPresentInOrigin(File origin, String expectedTag)
throws GitAPIException {
then(GitTestUtils.openGitProject(origin).tagList().call().iterator().next()
.getName()).endsWith(expectedTag);
}
private Model pom(File dir) {
@@ -560,8 +617,8 @@ public class AcceptanceTests {
return new String(Files.readAllBytes(releaseNotesTemplate().toPath()));
}
private SpringReleaser releaser(File projectFile, String projectName,
String branch, String expectedVersion) throws Exception {
private SpringReleaser releaser(File projectFile, String projectName, String branch,
String expectedVersion) throws Exception {
ReleaserProperties properties = releaserProperties(projectFile, branch);
return releaserWithFullDeployment(expectedVersion, projectName, properties);
}
@@ -574,47 +631,59 @@ public class AcceptanceTests {
private SpringReleaser releaserWithFullDeployment(String expectedVersion,
String projectName, ReleaserProperties properties) throws Exception {
Releaser releaser = defaultReleaser(expectedVersion, projectName, properties);
return new SpringReleaser(releaser, properties, new OptionsProcessor(releaser, properties, this.applicationEventPublisher) {
@Override String chosenOption() {
return new SpringReleaser(releaser, properties, new OptionsProcessor(releaser,
properties, this.applicationEventPublisher) {
@Override
String chosenOption() {
return "0";
}
@Override void postReleaseOptions(Options options, Args defaultArgs) {
@Override
void postReleaseOptions(Options options, Args defaultArgs) {
options.interactive = false;
super.postReleaseOptions(options, defaultArgs);
}
}, this.updater, this.applicationEventPublisher);
}
private SpringReleaser metaReleaserWithFullDeployment(ReleaserProperties properties) throws Exception {
private SpringReleaser metaReleaserWithFullDeployment(ReleaserProperties properties)
throws Exception {
Releaser releaser = defaultMetaReleaser(properties);
return new SpringReleaser(releaser, properties, new OptionsProcessor(releaser, properties, this.applicationEventPublisher) {
@Override String chosenOption() {
return new SpringReleaser(releaser, properties, new OptionsProcessor(releaser,
properties, this.applicationEventPublisher) {
@Override
String chosenOption() {
return "0";
}
@Override void postReleaseOptions(Options options, Args defaultArgs) {
@Override
void postReleaseOptions(Options options, Args defaultArgs) {
options.interactive = false;
super.postReleaseOptions(options, defaultArgs);
}
}, this.updater, this.applicationEventPublisher);
}
private SpringReleaser releaserWithSnapshotScRelease(File projectFile, String projectName,
String branch, String expectedVersion) throws Exception {
ReleaserProperties properties = snapshotScReleaseReleaserProperties(projectFile, branch);
private SpringReleaser releaserWithSnapshotScRelease(File projectFile,
String projectName, String branch, String expectedVersion) throws Exception {
ReleaserProperties properties = snapshotScReleaseReleaserProperties(projectFile,
branch);
return releaserWithFullDeployment(expectedVersion, projectName, properties);
}
private SpringReleaser templateOnlyReleaser(File projectFile, String projectName, String branch, String expectedVersion) throws Exception {
private SpringReleaser templateOnlyReleaser(File projectFile, String projectName,
String branch, String expectedVersion) throws Exception {
ReleaserProperties properties = releaserProperties(projectFile, branch);
Releaser releaser = defaultReleaser(expectedVersion, projectName, properties);
return new SpringReleaser(releaser, properties, new OptionsProcessor(releaser, properties, this.applicationEventPublisher) {
@Override String chosenOption() {
return new SpringReleaser(releaser, properties, new OptionsProcessor(releaser,
properties, this.applicationEventPublisher) {
@Override
String chosenOption() {
return "13";
}
@Override void postReleaseOptions(Options options, Args defaultArgs) {
@Override
void postReleaseOptions(Options options, Args defaultArgs) {
options.interactive = true;
super.postReleaseOptions(options, defaultArgs);
}
@@ -629,19 +698,25 @@ public class AcceptanceTests {
expectedVersion, projectName);
TemplateGenerator templateGenerator = new TemplateGenerator(properties, handler);
GradleUpdater gradleUpdater = new GradleUpdater(properties);
SaganUpdater saganUpdater = new SaganUpdater(this.saganClient, this.releaserProperties);
DocumentationUpdater documentationUpdater = new TestDocumentationUpdater(properties,
new TestDocumentationUpdater.TestProjectDocumentationUpdater(properties, handler, "Brixton.SR1"),
new TestDocumentationUpdater.TestReleaseContentsUpdater(properties, handler, templateGenerator)) {
@Override public File updateDocsRepo(ProjectVersion currentProject,
String springCloudReleaseBranch) {
File file = super.updateDocsRepo(currentProject, springCloudReleaseBranch);
SaganUpdater saganUpdater = new SaganUpdater(this.saganClient,
this.releaserProperties);
DocumentationUpdater documentationUpdater = new TestDocumentationUpdater(
properties,
new TestDocumentationUpdater.TestProjectDocumentationUpdater(properties,
handler, "Brixton.SR1"),
new TestDocumentationUpdater.TestReleaseContentsUpdater(properties,
handler, templateGenerator)) {
@Override
public File updateDocsRepo(ProjectVersion currentProject,
String bomReleaseBranch) {
File file = super.updateDocsRepo(currentProject, bomReleaseBranch);
AcceptanceTests.this.documentationFolder = file;
return file;
}
};
Releaser releaser = new Releaser(pomUpdater, projectBuilder, handler,
templateGenerator, gradleUpdater, saganUpdater, documentationUpdater, this.postReleaseActions);
templateGenerator, gradleUpdater, saganUpdater, documentationUpdater,
this.postReleaseActions);
this.gitHandler = handler;
return releaser;
}
@@ -649,29 +724,38 @@ public class AcceptanceTests {
private Releaser defaultMetaReleaser(ReleaserProperties properties) {
ProjectPomUpdater pomUpdater = new ProjectPomUpdater(properties);
ProjectBuilder projectBuilder = new ProjectBuilder(properties);
NonAssertingTestProjectGitHandler handler = new NonAssertingTestProjectGitHandler(properties);
TemplateGenerator templateGenerator = Mockito.spy(new TemplateGenerator(properties, handler));
NonAssertingTestProjectGitHandler handler = new NonAssertingTestProjectGitHandler(
properties);
TemplateGenerator templateGenerator = Mockito
.spy(new TemplateGenerator(properties, handler));
GradleUpdater gradleUpdater = new GradleUpdater(properties);
SaganUpdater saganUpdater = Mockito.spy(new SaganUpdater(this.saganClient, this.releaserProperties));
DocumentationUpdater documentationUpdater = Mockito.spy(new TestDocumentationUpdater(properties,
new TestDocumentationUpdater.TestProjectDocumentationUpdater(properties, handler, "Brixton.SR1"),
new TestDocumentationUpdater.TestReleaseContentsUpdater(properties, handler, templateGenerator) {
SaganUpdater saganUpdater = Mockito
.spy(new SaganUpdater(this.saganClient, this.releaserProperties));
DocumentationUpdater documentationUpdater = Mockito
.spy(new TestDocumentationUpdater(properties,
new TestDocumentationUpdater.TestProjectDocumentationUpdater(
properties, handler, "Brixton.SR1"),
new TestDocumentationUpdater.TestReleaseContentsUpdater(
properties, handler, templateGenerator) {
@Override
public File updateProjectRepo(Projects projects) {
File file = super.updateProjectRepo(projects);
AcceptanceTests.this.cloudProjectFolder = file;
return file;
}
}) {
@Override
public File updateProjectRepo(Projects projects) {
File file = super.updateProjectRepo(projects);
AcceptanceTests.this.cloudProjectFolder = file;
public File updateDocsRepo(ProjectVersion currentProject,
String bomReleaseBranch) {
File file = super.updateDocsRepo(currentProject,
bomReleaseBranch);
AcceptanceTests.this.documentationFolder = file;
return file;
}
}) {
@Override public File updateDocsRepo(ProjectVersion currentProject,
String springCloudReleaseBranch) {
File file = super.updateDocsRepo(currentProject, springCloudReleaseBranch);
AcceptanceTests.this.documentationFolder = file;
return file;
}
});
});
Releaser releaser = Mockito.spy(new Releaser(pomUpdater, projectBuilder, handler,
templateGenerator, gradleUpdater, saganUpdater, documentationUpdater, this.postReleaseActions));
templateGenerator, gradleUpdater, saganUpdater, documentationUpdater,
this.postReleaseActions));
this.nonAssertingGitHandler = handler;
this.templateGenerator = templateGenerator;
this.saganUpdater = saganUpdater;
@@ -679,7 +763,8 @@ public class AcceptanceTests {
return releaser;
}
private ReleaserProperties releaserProperties(File project, String branch) throws URISyntaxException {
private ReleaserProperties releaserProperties(File project, String branch)
throws URISyntaxException {
ReleaserProperties releaserProperties = new ReleaserProperties();
releaserProperties.getGit().setReleaseTrainBomUrl(
file("/projects/spring-cloud-release/").toURI().toString());
@@ -687,34 +772,40 @@ public class AcceptanceTests {
file("/projects/spring-cloud-static-angel/").toURI().toString());
releaserProperties.getMaven().setBuildCommand("echo build");
releaserProperties.getMaven().setDeployCommand("echo deploy");
releaserProperties.getMaven().setPublishDocsCommands(new String[] { "echo docs"} );
releaserProperties.getMaven()
.setPublishDocsCommands(new String[] { "echo docs" });
releaserProperties.setWorkingDir(project.getPath());
releaserProperties.getPom().setBranch(branch);
releaserProperties.getGit().setSpringProjectUrl(
tmpFile("spring-cloud").getAbsolutePath() + "/");
releaserProperties.getGit()
.setSpringProjectUrl(tmpFile("spring-cloud").getAbsolutePath() + "/");
releaserProperties.getGit().setReleaseTrainWikiUrl(
tmpFile("spring-cloud-wiki").getAbsolutePath() + "/");
this.releaserProperties = releaserProperties;
return releaserProperties;
}
private ReleaserProperties metaReleaserProperties(Map<String, String> versions) throws URISyntaxException {
private ReleaserProperties metaReleaserProperties(Map<String, String> versions)
throws URISyntaxException {
ReleaserProperties releaserProperties = new ReleaserProperties();
Arrays.asList("spring-cloud-build", "spring-cloud-commons", "spring-cloud-stream",
"spring-cloud-task", "spring-cloud-function", "spring-cloud-aws",
"spring-cloud-bus", "spring-cloud-config", "spring-cloud-netflix",
"spring-cloud-cloudfoundry", "spring-cloud-gateway", "spring-cloud-security",
"spring-cloud-zookeeper", "spring-cloud-sleuth",
"spring-cloud-cloudfoundry", "spring-cloud-gateway",
"spring-cloud-security", "spring-cloud-zookeeper", "spring-cloud-sleuth",
"spring-cloud-contract", "spring-cloud-vault")
.forEach(s -> releaserProperties.getMetaRelease().getProjectsToSkip().add(s));
releaserProperties.getGit().setDocumentationUrl(file("/projects/spring-cloud-static-angel/").toURI().toString());
.forEach(s -> releaserProperties.getMetaRelease().getProjectsToSkip()
.add(s));
releaserProperties.getGit().setDocumentationUrl(
file("/projects/spring-cloud-static-angel/").toURI().toString());
releaserProperties.getMaven().setBuildCommand("echo executed_build");
releaserProperties.getMaven().setDeployCommand("echo executed_deploy");
releaserProperties.getMaven().setPublishDocsCommands(new String[] { "echo executed_docs"} );
releaserProperties.getMetaRelease().setGitOrgUrl("file://" + this.temporaryFolder.getAbsolutePath());
releaserProperties.getMaven()
.setPublishDocsCommands(new String[] { "echo executed_docs" });
releaserProperties.getMetaRelease()
.setGitOrgUrl("file://" + this.temporaryFolder.getAbsolutePath());
releaserProperties.getMetaRelease().setEnabled(true);
releaserProperties.getGit().setSpringProjectUrl(
tmpFile("spring-cloud").getAbsolutePath() + "/");
releaserProperties.getGit()
.setSpringProjectUrl(tmpFile("spring-cloud").getAbsolutePath() + "/");
releaserProperties.getGit().setReleaseTrainWikiUrl(
tmpFile("spring-cloud-wiki").getAbsolutePath() + "/");
releaserProperties.setFixedVersions(versions);
@@ -722,74 +813,101 @@ public class AcceptanceTests {
return releaserProperties;
}
private ReleaserProperties snapshotScReleaseReleaserProperties(File project, String branch) throws URISyntaxException {
private ReleaserProperties snapshotScReleaseReleaserProperties(File project,
String branch) throws URISyntaxException {
ReleaserProperties releaserProperties = releaserProperties(project, branch);
releaserProperties.getGit().setReleaseTrainBomUrl(file("/projects/spring-cloud-release-with-snapshot/").toURI().toString());
releaserProperties.getGit().setDocumentationUrl(file("/projects/spring-cloud-static/").toURI().toString());
releaserProperties.getGit().setReleaseTrainBomUrl(
file("/projects/spring-cloud-release-with-snapshot/").toURI().toString());
releaserProperties.getGit().setDocumentationUrl(
file("/projects/spring-cloud-static/").toURI().toString());
this.releaserProperties = releaserProperties;
return releaserProperties;
}
private File tmpFile(String relativePath) {
return new File(this.temporaryFolder, relativePath);
}
private File file(String relativePath) throws URISyntaxException {
return new File(AcceptanceTests.class.getResource(relativePath).toURI());
}
private String text(File file) throws IOException {
return new String(Files.readAllBytes(file.toPath()));
}
class TestProjectGitHandler extends ProjectGitHandler {
boolean closedMilestones = false;
boolean issueCreatedInSpringGuides = false;
final String expectedVersion;
final String projectName;
public TestProjectGitHandler(ReleaserProperties properties,
String expectedVersion, String projectName) {
boolean closedMilestones = false;
boolean issueCreatedInSpringGuides = false;
TestProjectGitHandler(ReleaserProperties properties, String expectedVersion,
String projectName) {
super(properties);
this.expectedVersion = expectedVersion;
this.projectName = projectName;
}
@Override public void closeMilestone(ProjectVersion releaseVersion) {
@Override
public void closeMilestone(ProjectVersion releaseVersion) {
then(releaseVersion.projectName).isEqualTo(this.projectName);
then(releaseVersion.version).isEqualTo(this.expectedVersion);
this.closedMilestones = true;
}
@Override public void createIssueInSpringGuides(Projects projects,
ProjectVersion version) {
@Override
public void createIssueInSpringGuides(Projects projects, ProjectVersion version) {
this.issueCreatedInSpringGuides = true;
}
@Override public String milestoneUrl(ProjectVersion releaseVersion) {
@Override
public String milestoneUrl(ProjectVersion releaseVersion) {
return "http://foo.bar.com/" + releaseVersion.toString();
}
}
class NonAssertingTestProjectGitHandler extends ProjectGitHandler {
boolean closedMilestones = false;
boolean issueCreatedInSpringGuides = false;
List<File> clonedProjects = new ArrayList<>();
public NonAssertingTestProjectGitHandler(ReleaserProperties properties) {
NonAssertingTestProjectGitHandler(ReleaserProperties properties) {
super(properties);
}
@Override public void closeMilestone(ProjectVersion releaseVersion) {
@Override
public void closeMilestone(ProjectVersion releaseVersion) {
this.closedMilestones = true;
}
@Override public void createIssueInSpringGuides(Projects projects,
ProjectVersion version) {
@Override
public void createIssueInSpringGuides(Projects projects, ProjectVersion version) {
this.issueCreatedInSpringGuides = true;
}
@Override public String milestoneUrl(ProjectVersion releaseVersion) {
@Override
public String milestoneUrl(ProjectVersion releaseVersion) {
return "http://foo.bar.com/" + releaseVersion.toString();
}
@Override public File cloneReleaseTrainProject() {
@Override
public File cloneReleaseTrainProject() {
File file = super.cloneReleaseTrainProject();
this.clonedProjects.add(file);
return file;
}
@Override public File cloneDocumentationProject() {
@Override
public File cloneDocumentationProject() {
File file = super.cloneDocumentationProject();
this.clonedProjects.add(file);
return file;
@@ -809,22 +927,13 @@ public class AcceptanceTests {
return file;
}
@Override public File cloneProjectFromOrg(String projectName) {
@Override
public File cloneProjectFromOrg(String projectName) {
File file = super.cloneProjectFromOrg(projectName);
this.clonedProjects.add(file);
return file;
}
}
private File tmpFile(String relativePath) {
return new File(this.temporaryFolder, relativePath);
}
private File file(String relativePath) throws URISyntaxException {
return new File(AcceptanceTests.class.getResource(relativePath).toURI());
}
private String text(File file) throws IOException {
return new String(Files.readAllBytes(file.toPath()));
}
}

View File

@@ -14,6 +14,22 @@
* limitations under the License.
*/
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.util.Arrays;
@@ -28,17 +44,19 @@ public class CompositeConsumerTests {
@Test
public void should_throw_exception_for_a_release_task() {
CompositeConsumer compositeConsumer = new CompositeConsumer(Arrays.asList(
new Task("foo", "foo", "foo", "foo",
(args -> {})),
new Task("bar", "bar", "bar", "bar",
(args -> { throw new MyException(); }))
));
CompositeConsumer compositeConsumer = new CompositeConsumer(
Arrays.asList(new Task("foo", "foo", "foo", "foo", (args -> {
})), new Task("bar", "bar", "bar", "bar", (args -> {
throw new MyException();
}))));
BDDAssertions.thenThrownBy(() ->
compositeConsumer.accept(new Args(TaskType.RELEASE)))
BDDAssertions
.thenThrownBy(() -> compositeConsumer.accept(new Args(TaskType.RELEASE)))
.isInstanceOf(MyException.class);
}
}
class MyException extends RuntimeException {}
class MyException extends RuntimeException {
}

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.util.ArrayList;
@@ -13,32 +29,31 @@ import org.junit.Test;
*/
public class OptionsParserTests {
@Test public void should_filter_provided_task_names() {
@Test
public void should_filter_provided_task_names() {
OptionsParser optionsParser = new OptionsParser();
List<String> taskNames = optionsParser.filterProvidedTaskNames(
providedTaskNames(), allTaskNames(), true
);
List<String> taskNames = optionsParser
.filterProvidedTaskNames(providedTaskNames(), allTaskNames(), true);
BDDAssertions.then(taskNames).isEqualTo(providedTaskNames());
}
private List<String> providedTaskNames() {
return new ArrayList<>(
Arrays.asList("spring-cloud-config", "spring-cloud-netflix",
"spring-cloud-cloudfoundry", "spring-cloud-openfeign",
"spring-cloud-gateway", "spring-cloud-security",
"spring-cloud-sleuth", "spring-cloud-contract",
"spring-cloud-vault", "spring-cloud-release"));
return new ArrayList<>(Arrays.asList("spring-cloud-config",
"spring-cloud-netflix", "spring-cloud-cloudfoundry",
"spring-cloud-openfeign", "spring-cloud-gateway", "spring-cloud-security",
"spring-cloud-sleuth", "spring-cloud-contract", "spring-cloud-vault",
"spring-cloud-release"));
}
private List<String> allTaskNames() {
return new ArrayList<>(
Arrays.asList("spring-cloud-config", "spring-cloud-netflix",
"spring-cloud-cloudfoundry", "spring-cloud-openfeign",
"spring-cloud-gateway", "spring-cloud-security",
"spring-cloud-sleuth", "spring-cloud-contract",
"spring-cloud-vault", "spring-cloud-release",
"spring-cloud-1", "spring-cloud-2", "spring-cloud-3"));
return new ArrayList<>(Arrays.asList("spring-cloud-config",
"spring-cloud-netflix", "spring-cloud-cloudfoundry",
"spring-cloud-openfeign", "spring-cloud-gateway", "spring-cloud-security",
"spring-cloud-sleuth", "spring-cloud-contract", "spring-cloud-vault",
"spring-cloud-release", "spring-cloud-1", "spring-cloud-2",
"spring-cloud-3"));
}
}
}

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.util.Arrays;
@@ -10,6 +26,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.cloud.release.internal.Releaser;
import org.springframework.cloud.release.internal.ReleaserProperties;
import org.springframework.cloud.release.internal.options.Options;
@@ -25,22 +42,32 @@ import static org.assertj.core.api.BDDAssertions.thenThrownBy;
@SuppressWarnings("unchecked")
public class OptionsProcessorTests {
@Mock Releaser releaser;
@Mock
Releaser releaser;
FirstConsumer first = new FirstConsumer();
SecondConsumer second = new SecondConsumer();
ThirdConsumer third = new ThirdConsumer();
Task firstTask = task("first", "1", "", "", this.first);
List<Task> tasks = Arrays.asList(new Task[] {
this.firstTask,
task("second", "2", "", "", this.second),
task("third", "3", "", "", this.third)
});
List<Task> tasks = Arrays
.asList(new Task[] { this.firstTask, task("second", "2", "", "", this.second),
task("third", "3", "", "", this.third) });
OptionsProcessor optionsProcessor;
static Task task(String name, String shortName, String header, String description,
Consumer<Args> function) {
return new Task(name, shortName, header, description, function);
}
@Before
public void setup() {
this.optionsProcessor = new OptionsProcessor(this.releaser, new ReleaserProperties(), this.tasks);
this.optionsProcessor = new OptionsProcessor(this.releaser,
new ReleaserProperties(), this.tasks);
Task.stepSkipper = () -> false;
}
@@ -54,7 +81,7 @@ public class OptionsProcessorTests {
Options options = nonInteractiveOpts().options();
thenThrownBy(() -> this.optionsProcessor.processOptions(options, args()))
.hasMessageContaining("You haven't picked any recognizable option");
.hasMessageContaining("You haven't picked any recognizable option");
}
@Test
@@ -68,7 +95,6 @@ public class OptionsProcessorTests {
then(this.third.executed).isTrue();
}
@Test
public void should_execute_only_tasks_after_the_provided_one_using_short_name() {
Options options = nonInteractiveOpts().startFrom("2").options();
@@ -126,7 +152,8 @@ public class OptionsProcessorTests {
@Test
public void should_execute_only_tasks_from_multi_using_full_name() {
Options options = nonInteractiveOpts().taskNames(list("first", "third")).options();
Options options = nonInteractiveOpts().taskNames(list("first", "third"))
.options();
this.optionsProcessor.processOptions(options, args());
@@ -148,8 +175,10 @@ public class OptionsProcessorTests {
@Test
public void should_execute_interactively_only_single_task() {
this.optionsProcessor = new OptionsProcessor(this.releaser, new ReleaserProperties(), this.tasks) {
@Override String chosenOption() {
this.optionsProcessor = new OptionsProcessor(this.releaser,
new ReleaserProperties(), this.tasks) {
@Override
String chosenOption() {
return "0";
}
};
@@ -164,8 +193,10 @@ public class OptionsProcessorTests {
@Test
public void should_execute_interactively_range_of_tasks() {
this.optionsProcessor = new OptionsProcessor(this.releaser, new ReleaserProperties(), this.tasks) {
@Override String chosenOption() {
this.optionsProcessor = new OptionsProcessor(this.releaser,
new ReleaserProperties(), this.tasks) {
@Override
String chosenOption() {
return "0-1";
}
};
@@ -180,8 +211,10 @@ public class OptionsProcessorTests {
@Test
public void should_execute_interactively_start_from() {
this.optionsProcessor = new OptionsProcessor(this.releaser, new ReleaserProperties(), this.tasks) {
@Override String chosenOption() {
this.optionsProcessor = new OptionsProcessor(this.releaser,
new ReleaserProperties(), this.tasks) {
@Override
String chosenOption() {
return "1-";
}
};
@@ -196,8 +229,10 @@ public class OptionsProcessorTests {
@Test
public void should_execute_interactively_multi() {
this.optionsProcessor = new OptionsProcessor(this.releaser, new ReleaserProperties(), this.tasks) {
@Override String chosenOption() {
this.optionsProcessor = new OptionsProcessor(this.releaser,
new ReleaserProperties(), this.tasks) {
@Override
String chosenOption() {
return "0,2";
}
};
@@ -212,12 +247,15 @@ public class OptionsProcessorTests {
@Test
public void should_execute_full_release() {
this.optionsProcessor = new OptionsProcessor(this.releaser, new ReleaserProperties(), this.tasks) {
@Override Task releaseTask() {
this.optionsProcessor = new OptionsProcessor(this.releaser,
new ReleaserProperties(), this.tasks) {
@Override
Task releaseTask() {
return OptionsProcessorTests.this.firstTask;
}
@Override String chosenOption() {
@Override
String chosenOption() {
return "0";
}
};
@@ -232,12 +270,15 @@ public class OptionsProcessorTests {
@Test
public void should_execute_full_verbose_release() {
this.optionsProcessor = new OptionsProcessor(this.releaser, new ReleaserProperties(), this.tasks) {
@Override Task releaseVerboseTask() {
this.optionsProcessor = new OptionsProcessor(this.releaser,
new ReleaserProperties(), this.tasks) {
@Override
Task releaseVerboseTask() {
return OptionsProcessorTests.this.firstTask;
}
@Override String chosenOption() {
@Override
String chosenOption() {
return "0";
}
};
@@ -252,11 +293,8 @@ public class OptionsProcessorTests {
@Test
public void should_remove_single_quotes() {
Options options = interactiveOpts().fullRelease(true)
.range("'1-2'")
.startFrom("'c'")
.taskNames(Arrays.asList("'a'", "'b'"))
.options();
Options options = interactiveOpts().fullRelease(true).range("'1-2'")
.startFrom("'c'").taskNames(Arrays.asList("'a'", "'b'")).options();
then(options.range).isEqualTo("1-2");
then(options.startFrom).isEqualTo("c");
@@ -272,42 +310,45 @@ public class OptionsProcessorTests {
}
private Args args() {
return new Args(null, null, null, null, null, null, false, TaskType.RELEASE, null);
return new Args(null, null, null, null, null, null, false, TaskType.RELEASE,
null);
}
private List<String> list(String... list) {
return Arrays.asList(list);
}
static Task task(String name, String shortName, String header, String description, Consumer<Args> function) {
return new Task(name, shortName, header, description, function);
}
}
class FirstConsumer implements Consumer<Args> {
boolean executed;
@Override public void accept(Args o) {
@Override
public void accept(Args o) {
this.executed = true;
}
}
class SecondConsumer implements Consumer<Args> {
boolean executed;
@Override public void accept(Args o) {
@Override
public void accept(Args o) {
this.executed = true;
}
}
class ThirdConsumer implements Consumer<Args> {
boolean executed;
@Override public void accept(Args o) {
@Override
public void accept(Args o) {
this.executed = true;
}
}
}

View File

@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://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,
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.release.internal.spring;
import org.assertj.core.api.BDDAssertions;
@@ -28,8 +29,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = ReleaserApplicationEventTests.Config.class,
properties = "releaser.git.oauth-token=some-fake-token")
@SpringBootTest(classes = ReleaserApplicationEventTests.Config.class, properties = "releaser.git.oauth-token=some-fake-token")
public class ReleaserApplicationEventTests {
@Autowired
@@ -37,9 +37,12 @@ public class ReleaserApplicationEventTests {
@Test
public void should_throw_exceptions_when_at_least_one_task_is_failing() {
this.publisher.publishEvent(new TaskCompleted(this, "foo", TaskAndException.skipped(Tasks.PUSH)));
this.publisher.publishEvent(new TaskCompleted(this, "foo", TaskAndException.success(Tasks.CLOSE_MILESTONE)));
this.publisher.publishEvent(new TaskCompleted(this, "foo", TaskAndException.failure(Tasks.DEPLOY, new RuntimeException("boom!"))));
this.publisher.publishEvent(
new TaskCompleted(this, "foo", TaskAndException.skipped(Tasks.PUSH)));
this.publisher.publishEvent(new TaskCompleted(this, "foo",
TaskAndException.success(Tasks.CLOSE_MILESTONE)));
this.publisher.publishEvent(new TaskCompleted(this, "foo",
TaskAndException.failure(Tasks.DEPLOY, new RuntimeException("boom!"))));
BDDAssertions.thenThrownBy(() -> {
this.publisher.publishEvent(new BuildCompleted(this));
@@ -48,20 +51,21 @@ public class ReleaserApplicationEventTests {
@Test
public void should_not_fail_when_all_tasks_not_failing() {
this.publisher.publishEvent(new TaskCompleted(this, "foo", TaskAndException.skipped(Tasks.PUSH)));
this.publisher.publishEvent(new TaskCompleted(this, "foo", TaskAndException.success(Tasks.CLOSE_MILESTONE)));
this.publisher.publishEvent(
new TaskCompleted(this, "foo", TaskAndException.skipped(Tasks.PUSH)));
this.publisher.publishEvent(new TaskCompleted(this, "foo",
TaskAndException.success(Tasks.CLOSE_MILESTONE)));
this.publisher.publishEvent(new BuildCompleted(this));
}
@Configuration
@EnableAutoConfiguration
@ComponentScan({
"org.springframework.cloud.release.internal.options",
@ComponentScan({ "org.springframework.cloud.release.internal.options",
"org.springframework.cloud.release.internal.sagan",
"org.springframework.cloud.release.internal.spring",
})
"org.springframework.cloud.release.internal.spring" })
static class Config {
}
}

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.io.File;
@@ -7,6 +23,7 @@ import java.util.List;
import org.assertj.core.api.BDDAssertions;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.release.internal.ReleaserProperties;
import org.springframework.cloud.release.internal.ReleaserPropertiesAware;
@@ -23,23 +40,28 @@ import org.springframework.test.context.junit4.SpringRunner;
@Import(ReleaserPropertiesIntegrationTests.Config.class)
public class ReleaserPropertiesIntegrationTests {
@Autowired List<ReleaserPropertiesAware> propertiesAware;
@Autowired ApplicationContext context;
@Test public void should_update_properties() {
@Autowired
List<ReleaserPropertiesAware> propertiesAware;
@Autowired
ApplicationContext context;
@Test
public void should_update_properties() {
ReleaserProperties properties = new ReleaserProperties();
properties.getPom().setBranch("fooooo");
new ReleaserPropertiesUpdater(this.context).updateProperties(properties,
new File("."));
BDDAssertions.then(this.propertiesAware).hasSize(2);
this.propertiesAware.forEach(aware ->
BDDAssertions.then(((ReleaserPropertiesHaving) aware)
.properties.getPom().getBranch()).isEqualTo("fooooo"));
this.propertiesAware.forEach(aware -> BDDAssertions
.then(((ReleaserPropertiesHaving) aware).properties.getPom().getBranch())
.isEqualTo("fooooo"));
}
@Test public void should_update_properties_including_existing_releaser_config() {
@Test
public void should_update_properties_including_existing_releaser_config() {
ReleaserProperties properties = new ReleaserProperties();
properties.getPom().setBranch("barrrr");
URL resource = ReleaserPropertiesIntegrationTests.class
@@ -51,12 +73,15 @@ public class ReleaserPropertiesIntegrationTests {
BDDAssertions.then(this.propertiesAware).hasSize(2);
this.propertiesAware.forEach(aware -> {
ReleaserPropertiesHaving having = ((ReleaserPropertiesHaving) aware);
BDDAssertions.then(having.properties.getPom().getBranch()).isEqualTo("barrrr");
BDDAssertions.then(having.properties.getMaven().getBuildCommand()).isEqualTo("./scripts/noIntegration.sh");
BDDAssertions.then(having.properties.getPom().getBranch())
.isEqualTo("barrrr");
BDDAssertions.then(having.properties.getMaven().getBuildCommand())
.isEqualTo("./scripts/noIntegration.sh");
});
}
@Test public void should_update_properties_including_existing_releaser_config_for_netflix() {
@Test
public void should_update_properties_including_existing_releaser_config_for_netflix() {
ReleaserProperties properties = new ReleaserProperties();
properties.getPom().setBranch("bazzzz");
URL resource = ReleaserPropertiesIntegrationTests.class
@@ -68,31 +93,41 @@ public class ReleaserPropertiesIntegrationTests {
BDDAssertions.then(this.propertiesAware).hasSize(2);
this.propertiesAware.forEach(aware -> {
ReleaserPropertiesHaving having = ((ReleaserPropertiesHaving) aware);
BDDAssertions.then(having.properties.getPom().getBranch()).isEqualTo("bazzzz");
BDDAssertions.then(having.properties.getMaven().getBuildCommand()).isEqualTo("./scripts/build.sh {{systemProps}}");
BDDAssertions.then(having.properties.getPom().getBranch())
.isEqualTo("bazzzz");
BDDAssertions.then(having.properties.getMaven().getBuildCommand())
.isEqualTo("./scripts/build.sh {{systemProps}}");
});
}
@Configuration
static class Config {
@Bean ReleaserPropertiesAware aware1() {
@Bean
ReleaserPropertiesAware aware1() {
return new ReleaserPropertiesHaving();
}
@Bean ReleaserPropertiesAware aware2() {
@Bean
ReleaserPropertiesAware aware2() {
return new ReleaserPropertiesHaving();
}
}
static class ReleaserPropertiesHaving implements ReleaserPropertiesAware {
ReleaserProperties properties;
@Override public void setReleaserProperties(ReleaserProperties properties) {
@Override
public void setReleaserProperties(ReleaserProperties properties) {
this.properties = properties;
}
ReleaserProperties getProps() {
return this.properties;
}
}
}
}

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.io.File;
@@ -8,6 +24,7 @@ import java.util.Map;
import org.assertj.core.api.BDDAssertions;
import org.junit.Test;
import org.mockito.BDDMockito;
import org.springframework.cloud.release.internal.ReleaserProperties;
import org.springframework.cloud.release.internal.ReleaserPropertiesAware;
import org.springframework.context.ApplicationContext;
@@ -18,6 +35,7 @@ import org.springframework.context.ApplicationContext;
public class ReleaserPropertiesUpdaterTests {
ApplicationContext context = BDDMockito.mock(ApplicationContext.class);
File relaserUpdater;
public ReleaserPropertiesUpdaterTests() throws URISyntaxException {
@@ -25,15 +43,16 @@ public class ReleaserPropertiesUpdaterTests {
.getResource("/projects/releaser-updater/").toURI());
}
@Test public void should_update_properties() {
@Test
public void should_update_properties() {
ReleaserProperties original = originalReleaserProperties();
Aware aware = new Aware();
BDDMockito.given(this.context.getBeansOfType(BDDMockito.any(Class.class)))
.willReturn(beansOfType(aware));
ReleaserPropertiesUpdater updater = new ReleaserPropertiesUpdater(this.context);
ReleaserProperties props = updater
.updateProperties(original, this.relaserUpdater);
ReleaserProperties props = updater.updateProperties(original,
this.relaserUpdater);
BDDAssertions.then(aware.properties).isNotNull();
BDDAssertions.then(props.getMaven().getSystemProperties()).isEqualTo("-Dfoo=bar");
@@ -55,8 +74,11 @@ public class ReleaserPropertiesUpdaterTests {
ReleaserProperties properties;
@Override public void setReleaserProperties(ReleaserProperties properties) {
@Override
public void setReleaserProperties(ReleaserProperties properties) {
this.properties = properties;
}
}
}
}

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.io.File;
@@ -35,14 +51,26 @@ public class SpringReleaserTests {
private static final Logger log = LoggerFactory.getLogger(SpringReleaserTests.class);
@Mock Releaser releaser;
@Mock
Releaser releaser;
ReleaserProperties properties = properties();
@Mock OptionsProcessor optionsProcessor;
@Mock ApplicationContext context;
@Mock
OptionsProcessor optionsProcessor;
@Mock
ApplicationContext context;
Aware1 aware1 = new Aware1();
Aware2 aware2 = new Aware2();
ReleaserPropertiesUpdater updater;
@Mock ApplicationEventPublisher applicationEventPublisher;
@Mock
ApplicationEventPublisher applicationEventPublisher;
File releaserUpdater = new File(ReleaserPropertiesUpdaterTests.class
.getResource("/projects/releaser-updater/config/releaser.yml").toURI());
@@ -102,8 +130,8 @@ public class SpringReleaserTests {
private void thenOnlyCallsPostRelease() {
BDDMockito.then(this.optionsProcessor).should().postReleaseOptions(
BDDMockito.any(Options.class), BDDMockito.any(Args.class));
BDDMockito.then(this.optionsProcessor).should(BDDMockito.never())
.processOptions(BDDMockito.any(Options.class), BDDMockito.any(Args.class));
BDDMockito.then(this.optionsProcessor).should(BDDMockito.never()).processOptions(
BDDMockito.any(Options.class), BDDMockito.any(Args.class));
}
private void assertBuildCommand(Queue<ReleaserProperties> properties) {
@@ -114,11 +142,12 @@ public class SpringReleaserTests {
}
private SpringReleaser stubbedSpringReleaser() {
return new SpringReleaser(this.releaser, this.properties,
this.optionsProcessor, this.updater, applicationEventPublisher) {
return new SpringReleaser(this.releaser, this.properties, this.optionsProcessor,
this.updater, this.applicationEventPublisher) {
@Override
Args postReleaseOptionsAgs(Options options, ProjectsAndVersion projectsAndVersion) {
Args postReleaseOptionsAgs(Options options,
ProjectsAndVersion projectsAndVersion) {
return new Args(TaskType.RELEASE);
}
@@ -128,7 +157,8 @@ public class SpringReleaserTests {
}
@Override
ProjectsAndVersion processProject(Options options, File project, TaskType taskType) {
ProjectsAndVersion processProject(Options options, File project,
TaskType taskType) {
return null;
}
};
@@ -139,6 +169,7 @@ public class SpringReleaserTests {
properties.getMaven().setBuildCommand("build");
return properties;
}
}
class Aware1 implements ReleaserPropertiesAware {
@@ -149,6 +180,7 @@ class Aware1 implements ReleaserPropertiesAware {
public void setReleaserProperties(ReleaserProperties properties) {
this.properties.add(properties);
}
}
class Aware2 implements ReleaserPropertiesAware {
@@ -159,4 +191,5 @@ class Aware2 implements ReleaserPropertiesAware {
public void setReleaserProperties(ReleaserProperties properties) {
this.properties.add(properties);
}
}
}

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2013-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
*
* http://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.
*/
package org.springframework.cloud.release.internal.spring;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -16,12 +32,15 @@ import static org.assertj.core.api.BDDAssertions.thenThrownBy;
*/
public class TaskTests {
@Rule public OutputCapture capture = new OutputCapture();
@Rule
public OutputCapture capture = new OutputCapture();
@Test public void should_successfully_execute_task() {
@Test
public void should_successfully_execute_task() {
final AtomicBoolean someBool = new AtomicBoolean();
Task task = new Task("foo", "bar", "baz", "descr", new Consumer<Args>() {
@Override public void accept(Args args) {
@Override
public void accept(Args args) {
someBool.set(true);
}
});
@@ -31,7 +50,8 @@ public class TaskTests {
then(someBool.get()).isTrue();
}
@Test public void should_fail_with_nice_text_on_exception() {
@Test
public void should_fail_with_nice_text_on_exception() {
final AtomicBoolean someBool = new AtomicBoolean();
Task task = new Task("foo", "bar", "baz", "descr", args -> {
someBool.set(true);
@@ -41,9 +61,9 @@ public class TaskTests {
thenThrownBy(() -> task.execute(new Args(TaskType.RELEASE)))
.isInstanceOf(RuntimeException.class);
then(someBool.get()).isTrue();
then(this.capture.toString())
.contains("BUILD FAILED!!!")
then(this.capture.toString()).contains("BUILD FAILED!!!")
.contains("Exception occurred for project <> task <foo>")
.contains("with description <descr>");
}
}
}

View File

@@ -1,4 +1,4 @@
releaser.maven.buildCommand: ./scripts/noIntegration.sh
releaser.gradle.gradlePropsSubstitution:
verifierVersion: spring-cloud-contract
bootVersion: spring-boot
bootVersion: spring-boot

View File

@@ -1,3 +1,3 @@
releaser:
maven:
buildCommand: ./scripts/build.sh {{systemProps}}
buildCommand: ./scripts/build.sh {{systemProps}}

View File

@@ -1,4 +1,4 @@
releaser.maven.buildCommand: ./scripts/noIntegration.sh
releaser.gradle.gradlePropsSubstitution:
verifierVersion: spring-cloud-contract
bootVersion: spring-boot
bootVersion: spring-boot

View File

@@ -1,66 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<servers>
<server>
<id>repo.spring.io</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.CI_DEPLOY_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<!--
N.B. this profile is only here to support users and IDEs that do not use Maven 3.3.
It isn't needed on the command line if you use the wrapper script (mvnw) or if you use
a native Maven with the right version. Eclipse users should points their Maven tooling to
this settings file, or copy the profile into their ~/.m2/settings.xml.
-->
<id>spring</id>
<activation><activeByDefault>true</activeByDefault></activation>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>http://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<servers>
<server>
<id>repo.spring.io</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.CI_DEPLOY_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<!--
N.B. this profile is only here to support users and IDEs that do not use Maven 3.3.
It isn't needed on the command line if you use the wrapper script (mvnw) or if you use
a native Maven with the right version. Eclipse users should points their Maven tooling to
this settings file, or copy the profile into their ~/.m2/settings.xml.
-->
<id>spring</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>http://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>

View File

@@ -8,19 +8,19 @@ before_install:
- echo "https://$GH_TOKEN:@github.com" > .git/credentials
- gem install asciidoctor
install:
- ./mvnw install -P docs -q -U -DskipTests=true -Dmaven.test.redirectTestOutputToFile=true
- '[ "${MVN_GOAL}" == "deploy" ] && ./docs/src/main/asciidoc/ghpages.sh || echo "Not updating docs"'
- ./mvnw install -P docs -q -U -DskipTests=true -Dmaven.test.redirectTestOutputToFile=true
- '[ "${MVN_GOAL}" == "deploy" ] && ./docs/src/main/asciidoc/ghpages.sh || echo "Not updating docs"'
script:
- './mvnw -s .settings.xml $MVN_GOAL $MVN_PROFILE -nsu -Dmaven.test.redirectTestOutputToFile=true'
- './mvnw -s .settings.xml $MVN_GOAL $MVN_PROFILE -nsu -Dmaven.test.redirectTestOutputToFile=true'
env:
global:
- GIT_NAME="Dave Syer"
- GIT_EMAIL=dsyer@pivotal.io
- CI_DEPLOY_USERNAME=buildmaster
- FEATURE_BRANCH=$(echo ${TRAVIS_BRANCH} | grep "^.*/.*$" && echo true || echo false)
- SPRING_CLOUD_BUILD=$(echo ${TRAVIS_REPO_SLUG} | grep -q "^spring-cloud/.*$" && echo true || echo false)
- MVN_GOAL=$([ "${TRAVIS_PULL_REQUEST}" == "false" -a "${TRAVIS_TAG}" == "" -a "${FEATURE_BRANCH}" == "false" -a "${SPRING_CLOUD_BUILD}" == "true" ] && echo deploy || echo install)
- VERSION=$(mvn validate | grep Building | head -1 | sed -e 's/.* //')
- MILESTONE=$(echo ${VERSION} | egrep 'M|RC' && echo true || echo false)
- MVN_PROFILE=$([ "${MILESTONE}" == "true" ] && echo -P milestone)
- secure: "KRJQg6soMWudREJ11ocGK8I4OuhIehvy/ehTjBxvyATEwL6rXA9dKPGfb0OAscEgIpNxW1cezH8vUSaSZGFhx6LF5VnJ9Mh39pi9uYm9GMjQ61B4d5GaRjbGj/fXBd8kGubDO8kmjkDGGgkjWXfYZa/WIQ4kVWCIB5dVV9XJ0Lw="
- GIT_NAME="Dave Syer"
- GIT_EMAIL=dsyer@pivotal.io
- CI_DEPLOY_USERNAME=buildmaster
- FEATURE_BRANCH=$(echo ${TRAVIS_BRANCH} | grep "^.*/.*$" && echo true || echo false)
- SPRING_CLOUD_BUILD=$(echo ${TRAVIS_REPO_SLUG} | grep -q "^spring-cloud/.*$" && echo true || echo false)
- MVN_GOAL=$([ "${TRAVIS_PULL_REQUEST}" == "false" -a "${TRAVIS_TAG}" == "" -a "${FEATURE_BRANCH}" == "false" -a "${SPRING_CLOUD_BUILD}" == "true" ] && echo deploy || echo install)
- VERSION=$(mvn validate | grep Building | head -1 | sed -e 's/.* //')
- MILESTONE=$(echo ${VERSION} | egrep 'M|RC' && echo true || echo false)
- MVN_PROFILE=$([ "${MILESTONE}" == "true" ] && echo -P milestone)
- secure: "KRJQg6soMWudREJ11ocGK8I4OuhIehvy/ehTjBxvyATEwL6rXA9dKPGfb0OAscEgIpNxW1cezH8vUSaSZGFhx6LF5VnJ9Mh39pi9uYm9GMjQ61B4d5GaRjbGj/fXBd8kGubDO8kmjkDGGgkjWXfYZa/WIQ4kVWCIB5dVV9XJ0Lw="

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-cloud-build-docs</artifactId>
<name>spring-cloud-build-docs</name>

View File

@@ -4,32 +4,32 @@
*/
.hl-keyword {
color: #7F0055;
font-weight: bold;
color: #7F0055;
font-weight: bold;
}
.hl-comment {
color: #3F5F5F;
font-style: italic;
color: #3F5F5F;
font-style: italic;
}
.hl-multiline-comment {
color: #3F5FBF;
font-style: italic;
color: #3F5FBF;
font-style: italic;
}
.hl-tag {
color: #3F7F7F;
color: #3F7F7F;
}
.hl-attribute {
color: #7F007F;
color: #7F007F;
}
.hl-value {
color: #2A00FF;
color: #2A00FF;
}
.hl-string {
color: #2A00FF;
color: #2A00FF;
}

View File

@@ -1,7 +1,7 @@
@IMPORT url("manual.css");
body.firstpage {
background: url("../images/background.png") no-repeat center top;
background: url("../images/background.png") no-repeat center top;
}
div.part h1 {

View File

@@ -1,6 +1,6 @@
@IMPORT url("manual.css");
body {
background: url("../images/background.png") no-repeat center top;
background: url("../images/background.png") no-repeat center top;
}

View File

@@ -1,344 +1,342 @@
@IMPORT url("highlight.css");
html {
padding: 0pt;
margin: 0pt;
padding: 0pt;
margin: 0pt;
}
body {
color: #333333;
margin: 15px 30px;
font-family: Helvetica, Arial, Freesans, Clean, Sans-serif;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
color: #333333;
margin: 15px 30px;
font-family: Helvetica, Arial, Freesans, Clean, Sans-serif;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
code {
font-size: 16px;
font-family: Consolas, "Liberation Mono", Courier, monospace;
font-size: 16px;
font-family: Consolas, "Liberation Mono", Courier, monospace;
}
:not(a)>code {
color: #6D180B;
:not(a) > code {
color: #6D180B;
}
:not(pre)>code {
background-color: #F2F2F2;
border: 1px solid #CCCCCC;
border-radius: 4px;
padding: 1px 3px 0;
text-shadow: none;
white-space: nowrap;
:not(pre) > code {
background-color: #F2F2F2;
border: 1px solid #CCCCCC;
border-radius: 4px;
padding: 1px 3px 0;
text-shadow: none;
white-space: nowrap;
}
body>*:first-child {
margin-top: 0 !important;
body > *:first-child {
margin-top: 0 !important;
}
div {
margin: 0pt;
margin: 0pt;
}
hr {
border: 1px solid #CCCCCC;
background: #CCCCCC;
border: 1px solid #CCCCCC;
background: #CCCCCC;
}
h1,h2,h3,h4,h5,h6 {
color: #000000;
cursor: text;
font-weight: bold;
margin: 30px 0 10px;
padding: 0;
h1, h2, h3, h4, h5, h6 {
color: #000000;
cursor: text;
font-weight: bold;
margin: 30px 0 10px;
padding: 0;
}
h1,h2,h3 {
margin: 40px 0 10px;
h1, h2, h3 {
margin: 40px 0 10px;
}
h1 {
margin: 70px 0 30px;
padding-top: 20px;
margin: 70px 0 30px;
padding-top: 20px;
}
div.part h1 {
border-top: 1px dotted #CCCCCC;
border-top: 1px dotted #CCCCCC;
}
h1,h1 code {
font-size: 32px;
h1, h1 code {
font-size: 32px;
}
h2,h2 code {
font-size: 24px;
h2, h2 code {
font-size: 24px;
}
h3,h3 code {
font-size: 20px;
h3, h3 code {
font-size: 20px;
}
h4,h1 code,h5,h5 code,h6,h6 code {
font-size: 18px;
h4, h1 code, h5, h5 code, h6, h6 code {
font-size: 18px;
}
div.book,div.chapter,div.appendix,div.part,div.preface {
min-width: 300px;
max-width: 1200px;
margin: 0 auto;
div.book, div.chapter, div.appendix, div.part, div.preface {
min-width: 300px;
max-width: 1200px;
margin: 0 auto;
}
p.releaseinfo {
font-weight: bold;
margin-bottom: 40px;
margin-top: 40px;
font-weight: bold;
margin-bottom: 40px;
margin-top: 40px;
}
div.authorgroup {
line-height: 1;
line-height: 1;
}
p.copyright {
line-height: 1;
margin-bottom: -5px;
line-height: 1;
margin-bottom: -5px;
}
.legalnotice p {
font-style: italic;
font-size: 14px;
line-height: 1;
font-style: italic;
font-size: 14px;
line-height: 1;
}
div.titlepage+p,div.titlepage+p {
margin-top: 0;
div.titlepage + p, div.titlepage + p {
margin-top: 0;
}
pre {
line-height: 1.0;
color: black;
line-height: 1.0;
color: black;
}
a {
color: #4183C4;
text-decoration: none;
color: #4183C4;
text-decoration: none;
}
p {
margin: 15px 0;
text-align: left;
margin: 15px 0;
text-align: left;
}
ul,ol {
padding-left: 30px;
ul, ol {
padding-left: 30px;
}
li p {
margin: 0;
margin: 0;
}
div.table {
margin: 1em;
padding: 0.5em;
text-align: center;
margin: 1em;
padding: 0.5em;
text-align: center;
}
div.table table,div.informaltable table {
display: table;
width: 100%;
div.table table, div.informaltable table {
display: table;
width: 100%;
}
div.table td {
padding-left: 7px;
padding-right: 7px;
padding-left: 7px;
padding-right: 7px;
}
.sidebar {
line-height: 1.4;
padding: 0 20px;
background-color: #F8F8F8;
border: 1px solid #CCCCCC;
border-radius: 3px 3px 3px 3px;
line-height: 1.4;
padding: 0 20px;
background-color: #F8F8F8;
border: 1px solid #CCCCCC;
border-radius: 3px 3px 3px 3px;
}
.sidebar p.title {
color: #6D180B;
color: #6D180B;
}
pre.programlisting,pre.screen {
font-size: 15px;
padding: 6px 10px;
background-color: #F8F8F8;
border: 1px solid #CCCCCC;
border-radius: 3px 3px 3px 3px;
clear: both;
overflow: auto;
line-height: 1.4;
font-family: Consolas, "Liberation Mono", Courier, monospace;
pre.programlisting, pre.screen {
font-size: 15px;
padding: 6px 10px;
background-color: #F8F8F8;
border: 1px solid #CCCCCC;
border-radius: 3px 3px 3px 3px;
clear: both;
overflow: auto;
line-height: 1.4;
font-family: Consolas, "Liberation Mono", Courier, monospace;
}
table {
border-collapse: collapse;
border-spacing: 0;
border: 1px solid #DDDDDD !important;
border-radius: 4px !important;
border-collapse: separate !important;
line-height: 1.6;
border-collapse: collapse;
border-spacing: 0;
border: 1px solid #DDDDDD !important;
border-radius: 4px !important;
border-collapse: separate !important;
line-height: 1.6;
}
table thead {
background: #F5F5F5;
background: #F5F5F5;
}
table tr {
border: none;
border-bottom: none;
border: none;
border-bottom: none;
}
table th {
font-weight: bold;
font-weight: bold;
}
table th,table td {
border: none !important;
padding: 6px 13px;
table th, table td {
border: none !important;
padding: 6px 13px;
}
table tr:nth-child(2n) {
background-color: #F8F8F8;
background-color: #F8F8F8;
}
td p {
margin: 0 0 15px 0;
margin: 0 0 15px 0;
}
div.table-contents td p {
margin: 0;
margin: 0;
}
div.important *,div.note *,div.tip *,div.warning *,div.navheader *,div.navfooter *,div.calloutlist *
{
border: none !important;
background: none !important;
margin: 0;
div.important *, div.note *, div.tip *, div.warning *, div.navheader *, div.navfooter *, div.calloutlist * {
border: none !important;
background: none !important;
margin: 0;
}
div.important p,div.note p,div.tip p,div.warning p {
color: #6F6F6F;
line-height: 1.6;
div.important p, div.note p, div.tip p, div.warning p {
color: #6F6F6F;
line-height: 1.6;
}
div.important code,div.note code,div.tip code,div.warning code {
background-color: #F2F2F2 !important;
border: 1px solid #CCCCCC !important;
border-radius: 4px !important;
padding: 1px 3px 0 !important;
text-shadow: none !important;
white-space: nowrap !important;
div.important code, div.note code, div.tip code, div.warning code {
background-color: #F2F2F2 !important;
border: 1px solid #CCCCCC !important;
border-radius: 4px !important;
padding: 1px 3px 0 !important;
text-shadow: none !important;
white-space: nowrap !important;
}
.note th,.tip th,.warning th {
display: none;
.note th, .tip th, .warning th {
display: none;
}
.note tr:first-child td,.tip tr:first-child td,.warning tr:first-child td
{
border-right: 1px solid #CCCCCC !important;
padding-top: 10px;
.note tr:first-child td, .tip tr:first-child td, .warning tr:first-child td {
border-right: 1px solid #CCCCCC !important;
padding-top: 10px;
}
div.calloutlist p,div.calloutlist td {
padding: 0;
margin: 0;
div.calloutlist p, div.calloutlist td {
padding: 0;
margin: 0;
}
div.calloutlist>table>tbody>tr>td:first-child {
padding-left: 10px;
width: 30px !important;
div.calloutlist > table > tbody > tr > td:first-child {
padding-left: 10px;
width: 30px !important;
}
div.important,div.note,div.tip,div.warning {
margin-left: 0px !important;
margin-right: 20px !important;
margin-top: 20px;
margin-bottom: 20px;
padding-top: 10px;
padding-bottom: 10px;
div.important, div.note, div.tip, div.warning {
margin-left: 0px !important;
margin-right: 20px !important;
margin-top: 20px;
margin-bottom: 20px;
padding-top: 10px;
padding-bottom: 10px;
}
div.toc {
line-height: 1.2;
line-height: 1.2;
}
dl,dt {
margin-top: 1px;
margin-bottom: 0;
dl, dt {
margin-top: 1px;
margin-bottom: 0;
}
div.toc>dl>dt {
font-size: 32px;
font-weight: bold;
margin: 30px 0 10px 0;
display: block;
div.toc > dl > dt {
font-size: 32px;
font-weight: bold;
margin: 30px 0 10px 0;
display: block;
}
div.toc>dl>dd>dl>dt {
font-size: 24px;
font-weight: bold;
margin: 20px 0 10px 0;
display: block;
div.toc > dl > dd > dl > dt {
font-size: 24px;
font-weight: bold;
margin: 20px 0 10px 0;
display: block;
}
div.toc>dl>dd>dl>dd>dl>dt {
font-weight: bold;
font-size: 20px;
margin: 10px 0 0 0;
div.toc > dl > dd > dl > dd > dl > dt {
font-weight: bold;
font-size: 20px;
margin: 10px 0 0 0;
}
tbody.footnotes * {
border: none !important;
border: none !important;
}
div.footnote p {
margin: 0;
line-height: 1;
margin: 0;
line-height: 1;
}
div.footnote p sup {
margin-right: 6px;
vertical-align: middle;
margin-right: 6px;
vertical-align: middle;
}
div.navheader {
border-bottom: 1px solid #CCCCCC;
border-bottom: 1px solid #CCCCCC;
}
div.navfooter {
border-top: 1px solid #CCCCCC;
border-top: 1px solid #CCCCCC;
}
.title {
margin-left: -1em;
padding-left: 1em;
margin-left: -1em;
padding-left: 1em;
}
.title>a {
position: absolute;
visibility: hidden;
display: block;
font-size: 0.85em;
margin-top: 0.05em;
margin-left: -1em;
vertical-align: text-top;
color: black;
.title > a {
position: absolute;
visibility: hidden;
display: block;
font-size: 0.85em;
margin-top: 0.05em;
margin-left: -1em;
vertical-align: text-top;
color: black;
}
.title>a:before {
content: "\00A7";
.title > a:before {
content: "\00A7";
}
.title:hover>a,.title>a:hover,.title:hover>a:hover {
visibility: visible;
.title:hover > a, .title > a:hover, .title:hover > a:hover {
visibility: visible;
}
.title:focus>a,.title>a:focus,.title:focus>a:focus {
outline: 0;
.title:focus > a, .title > a:focus, .title:focus > a:focus {
outline: 0;
}

View File

@@ -20,10 +20,10 @@
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xslthl="http://xslthl.sf.net"
xmlns:d="http://docbook.org/ns/docbook"
exclude-result-prefixes="xslthl d"
version='1.0'>
xmlns:xslthl="http://xslthl.sf.net"
xmlns:d="http://docbook.org/ns/docbook"
exclude-result-prefixes="xslthl d"
version='1.0'>
<!-- Extensions -->
<xsl:param name="use.extensions">1</xsl:param>

View File

@@ -20,10 +20,10 @@ under the License.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xslthl="http://xslthl.sf.net"
xmlns:d="http://docbook.org/ns/docbook"
exclude-result-prefixes="xslthl d"
version='1.0'>
xmlns:xslthl="http://xslthl.sf.net"
xmlns:d="http://docbook.org/ns/docbook"
exclude-result-prefixes="xslthl d"
version='1.0'>
<xsl:import href="urn:docbkx:stylesheet"/>
<xsl:import href="common.xsl"/>

View File

@@ -39,12 +39,12 @@ under the License.
<xsl:apply-imports/>
</xsl:param>
<xsl:call-template name="user.preroot"/>
<xsl:call-template name="user.preroot"/>
<html>
<xsl:call-template name="html.head">
<xsl:with-param name="prev" select="$prev"/>
<xsl:with-param name="next" select="$next"/>
<xsl:with-param name="prev" select="$prev"/>
<xsl:with-param name="next" select="$next"/>
</xsl:call-template>
<body>
<xsl:if test="count($prev) = 0">

View File

@@ -20,10 +20,10 @@ under the License.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xslthl="http://xslthl.sf.net"
xmlns:d="http://docbook.org/ns/docbook"
exclude-result-prefixes="xslthl"
version='1.0'>
xmlns:xslthl="http://xslthl.sf.net"
xmlns:d="http://docbook.org/ns/docbook"
exclude-result-prefixes="xslthl"
version='1.0'>
<xsl:import href="urn:docbkx:stylesheet/highlight.xsl"/>
<xsl:import href="common.xsl"/>
@@ -35,7 +35,7 @@ under the License.
<xsl:param name="highlight.source">1</xsl:param>
<!-- Activate Graphics -->
<xsl:param name="callout.graphics" select="1" />
<xsl:param name="callout.graphics" select="1"/>
<xsl:param name="callout.defaultcolumn">120</xsl:param>
<xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
<xsl:param name="callout.graphics.extension">.png</xsl:param>
@@ -68,35 +68,51 @@ under the License.
<!-- Syntax Highlighting -->
<xsl:template match='xslthl:keyword' mode="xslthl">
<span class="hl-keyword"><xsl:apply-templates mode="xslthl"/></span>
<span class="hl-keyword">
<xsl:apply-templates mode="xslthl"/>
</span>
</xsl:template>
<xsl:template match='xslthl:comment' mode="xslthl">
<span class="hl-comment"><xsl:apply-templates mode="xslthl"/></span>
<span class="hl-comment">
<xsl:apply-templates mode="xslthl"/>
</span>
</xsl:template>
<xsl:template match='xslthl:oneline-comment' mode="xslthl">
<span class="hl-comment"><xsl:apply-templates mode="xslthl"/></span>
<span class="hl-comment">
<xsl:apply-templates mode="xslthl"/>
</span>
</xsl:template>
<xsl:template match='xslthl:multiline-comment' mode="xslthl">
<span class="hl-multiline-comment"><xsl:apply-templates mode="xslthl"/></span>
<span class="hl-multiline-comment">
<xsl:apply-templates mode="xslthl"/>
</span>
</xsl:template>
<xsl:template match='xslthl:tag' mode="xslthl">
<span class="hl-tag"><xsl:apply-templates mode="xslthl"/></span>
<span class="hl-tag">
<xsl:apply-templates mode="xslthl"/>
</span>
</xsl:template>
<xsl:template match='xslthl:attribute' mode="xslthl">
<span class="hl-attribute"><xsl:apply-templates mode="xslthl"/></span>
<span class="hl-attribute">
<xsl:apply-templates mode="xslthl"/>
</span>
</xsl:template>
<xsl:template match='xslthl:value' mode="xslthl">
<span class="hl-value"><xsl:apply-templates mode="xslthl"/></span>
<span class="hl-value">
<xsl:apply-templates mode="xslthl"/>
</span>
</xsl:template>
<xsl:template match='xslthl:string' mode="xslthl">
<span class="hl-string"><xsl:apply-templates mode="xslthl"/></span>
<span class="hl-string">
<xsl:apply-templates mode="xslthl"/>
</span>
</xsl:template>
<!-- Custom Title Page -->

View File

@@ -69,9 +69,9 @@ under the License.
<fo:table-cell text-align="center">
<fo:block>
<fo:external-graphic src="images/logo.png" width="240px"
height="auto" content-width="scale-to-fit"
content-height="scale-to-fit"
content-type="content-type:image/png" text-align="center"
height="auto" content-width="scale-to-fit"
content-height="scale-to-fit"
content-type="content-type:image/png" text-align="center"
/>
</fo:block>
<fo:block font-family="Helvetica" font-size="20pt" font-weight="bold" padding="10mm">
@@ -308,9 +308,9 @@ under the License.
Let's remove it, so this sucker can use our attribute-set only... -->
<xsl:template match="d:title" mode="chapter.titlepage.recto.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
xsl:use-attribute-sets="chapter.titlepage.recto.style">
xsl:use-attribute-sets="chapter.titlepage.recto.style">
<xsl:call-template name="component.title">
<xsl:with-param name="node" select="ancestor-or-self::d:chapter[1]"/>
<xsl:with-param name="node" select="ancestor-or-self::d:chapter[1]"/>
</xsl:call-template>
</fo:block>
</xsl:template>
@@ -524,7 +524,7 @@ under the License.
<xsl:attribute name="space-after.maximum">1.5em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="admonition.title.properties">
<xsl:attribute-set name="admonition.title.properties">
<xsl:attribute name="font-size">10pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="hyphenate">false</xsl:attribute>
@@ -549,34 +549,46 @@ under the License.
</fo:block>
</xsl:template>
<xsl:template match="processing-instruction('asciidoc-pagebreak')">
<fo:block break-after='page'/>
</xsl:template>
<xsl:template match="processing-instruction('asciidoc-pagebreak')">
<fo:block break-after='page'/>
</xsl:template>
<!-- SYNTAX HIGHLIGHT -->
<xsl:template match='xslthl:keyword' mode="xslthl">
<fo:inline font-weight="bold" color="#7F0055"><xsl:apply-templates mode="xslthl"/></fo:inline>
<fo:inline font-weight="bold" color="#7F0055">
<xsl:apply-templates mode="xslthl"/>
</fo:inline>
</xsl:template>
<xsl:template match='xslthl:string' mode="xslthl">
<fo:inline font-weight="bold" font-style="italic" color="#2A00FF"><xsl:apply-templates mode="xslthl"/></fo:inline>
<fo:inline font-weight="bold" font-style="italic" color="#2A00FF">
<xsl:apply-templates mode="xslthl"/>
</fo:inline>
</xsl:template>
<xsl:template match='xslthl:comment' mode="xslthl">
<fo:inline font-style="italic" color="#3F5FBF"><xsl:apply-templates mode="xslthl"/></fo:inline>
<fo:inline font-style="italic" color="#3F5FBF">
<xsl:apply-templates mode="xslthl"/>
</fo:inline>
</xsl:template>
<xsl:template match='xslthl:tag' mode="xslthl">
<fo:inline font-weight="bold" color="#3F7F7F"><xsl:apply-templates mode="xslthl"/></fo:inline>
<fo:inline font-weight="bold" color="#3F7F7F">
<xsl:apply-templates mode="xslthl"/>
</fo:inline>
</xsl:template>
<xsl:template match='xslthl:attribute' mode="xslthl">
<fo:inline font-weight="bold" color="#7F007F"><xsl:apply-templates mode="xslthl"/></fo:inline>
<fo:inline font-weight="bold" color="#7F007F">
<xsl:apply-templates mode="xslthl"/>
</fo:inline>
</xsl:template>
<xsl:template match='xslthl:value' mode="xslthl">
<fo:inline font-weight="bold" color="#2A00FF"><xsl:apply-templates mode="xslthl"/></fo:inline>
<fo:inline font-weight="bold" color="#2A00FF">
<xsl:apply-templates mode="xslthl"/>
</fo:inline>
</xsl:template>
</xsl:stylesheet>

View File

@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<xslthl-config>
<highlighter id="java" file="./xslthl/java-hl.xml" />
<highlighter id="groovy" file="./xslthl/java-hl.xml" />
<highlighter id="html" file="./xslthl/html-hl.xml" />
<highlighter id="ini" file="./xslthl/ini-hl.xml" />
<highlighter id="php" file="./xslthl/php-hl.xml" />
<highlighter id="c" file="./xslthl/c-hl.xml" />
<highlighter id="cpp" file="./xslthl/cpp-hl.xml" />
<highlighter id="csharp" file="./xslthl/csharp-hl.xml" />
<highlighter id="python" file="./xslthl/python-hl.xml" />
<highlighter id="ruby" file="./xslthl/ruby-hl.xml" />
<highlighter id="perl" file="./xslthl/perl-hl.xml" />
<highlighter id="javascript" file="./xslthl/javascript-hl.xml" />
<highlighter id="bash" file="./xslthl/bourne-hl.xml" />
<highlighter id="css" file="./xslthl/css-hl.xml" />
<highlighter id="sql" file="./xslthl/sql2003-hl.xml" />
<highlighter id="asciidoc" file="./xslthl/asciidoc-hl.xml" />
<highlighter id="properties" file="./xslthl/properties-hl.xml" />
<highlighter id="json" file="./xslthl/json-hl.xml" />
<highlighter id="yaml" file="./xslthl/yaml-hl.xml" />
<namespace prefix="xslthl" uri="http://xslthl.sf.net" />
<highlighter id="java" file="./xslthl/java-hl.xml"/>
<highlighter id="groovy" file="./xslthl/java-hl.xml"/>
<highlighter id="html" file="./xslthl/html-hl.xml"/>
<highlighter id="ini" file="./xslthl/ini-hl.xml"/>
<highlighter id="php" file="./xslthl/php-hl.xml"/>
<highlighter id="c" file="./xslthl/c-hl.xml"/>
<highlighter id="cpp" file="./xslthl/cpp-hl.xml"/>
<highlighter id="csharp" file="./xslthl/csharp-hl.xml"/>
<highlighter id="python" file="./xslthl/python-hl.xml"/>
<highlighter id="ruby" file="./xslthl/ruby-hl.xml"/>
<highlighter id="perl" file="./xslthl/perl-hl.xml"/>
<highlighter id="javascript" file="./xslthl/javascript-hl.xml"/>
<highlighter id="bash" file="./xslthl/bourne-hl.xml"/>
<highlighter id="css" file="./xslthl/css-hl.xml"/>
<highlighter id="sql" file="./xslthl/sql2003-hl.xml"/>
<highlighter id="asciidoc" file="./xslthl/asciidoc-hl.xml"/>
<highlighter id="properties" file="./xslthl/properties-hl.xml"/>
<highlighter id="json" file="./xslthl/json-hl.xml"/>
<highlighter id="yaml" file="./xslthl/yaml-hl.xml"/>
<namespace prefix="xslthl" uri="http://xslthl.sf.net"/>
</xslthl-config>

View File

@@ -5,37 +5,37 @@ Syntax highlighting definition for AsciiDoc files
-->
<highlighters>
<highlighter type="multiline-comment">
<start>////</start>
<end>////</end>
</highlighter>
<highlighter type="oneline-comment">
<start>//</start>
<solitary/>
</highlighter>
<highlighter type="regex">
<pattern>^(={1,6} .+)$</pattern>
<style>heading</style>
<flags>MULTILINE</flags>
</highlighter>
<highlighter type="regex">
<pattern>^(\.[^\.\s].+)$</pattern>
<style>title</style>
<flags>MULTILINE</flags>
</highlighter>
<highlighter type="regex">
<pattern>^(:!?\w.*?:)</pattern>
<style>attribute</style>
<flags>MULTILINE</flags>
</highlighter>
<highlighter type="regex">
<pattern>^(-|\*{1,5}|\d*\.{1,5})(?= .+$)</pattern>
<style>bullet</style>
<flags>MULTILINE</flags>
</highlighter>
<highlighter type="regex">
<pattern>^(\[.+\])$</pattern>
<style>attribute</style>
<flags>MULTILINE</flags>
</highlighter>
<highlighter type="multiline-comment">
<start>////</start>
<end>////</end>
</highlighter>
<highlighter type="oneline-comment">
<start>//</start>
<solitary/>
</highlighter>
<highlighter type="regex">
<pattern>^(={1,6} .+)$</pattern>
<style>heading</style>
<flags>MULTILINE</flags>
</highlighter>
<highlighter type="regex">
<pattern>^(\.[^\.\s].+)$</pattern>
<style>title</style>
<flags>MULTILINE</flags>
</highlighter>
<highlighter type="regex">
<pattern>^(:!?\w.*?:)</pattern>
<style>attribute</style>
<flags>MULTILINE</flags>
</highlighter>
<highlighter type="regex">
<pattern>^(-|\*{1,5}|\d*\.{1,5})(?= .+$)</pattern>
<style>bullet</style>
<flags>MULTILINE</flags>
</highlighter>
<highlighter type="regex">
<pattern>^(\[.+\])$</pattern>
<style>attribute</style>
<flags>MULTILINE</flags>
</highlighter>
</highlighters>

View File

@@ -31,8 +31,8 @@ freely, subject to the following restrictions:
<quote>'</quote>
<quote>"</quote>
<flag>-</flag>
<noWhiteSpace />
<looseTerminator />
<noWhiteSpace/>
<looseTerminator/>
</highlighter>
<highlighter type="string">
<string>"</string>
@@ -41,16 +41,16 @@ freely, subject to the following restrictions:
<highlighter type="string">
<string>'</string>
<escape>\</escape>
<spanNewLines />
<spanNewLines/>
</highlighter>
<highlighter type="hexnumber">
<prefix>0x</prefix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="number">
<point>.</point>
<pointStarts />
<ignoreCase />
<pointStarts/>
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<!-- reserved words -->

View File

@@ -46,7 +46,7 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
<start>#</start>
<lineBreakEscape>\</lineBreakEscape>
<style>directive</style>
<solitary />
<solitary/>
</highlighter>
<highlighter type="string">
<string>"</string>
@@ -62,18 +62,18 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
<suffix>lu</suffix>
<suffix>u</suffix>
<suffix>l</suffix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="number">
<point>.</point>
<pointStarts />
<pointStarts/>
<exponent>e</exponent>
<suffix>ul</suffix>
<suffix>lu</suffix>
<suffix>u</suffix>
<suffix>f</suffix>
<suffix>l</suffix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<keyword>auto</keyword>

View File

@@ -64,18 +64,18 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
<suffix>lu</suffix>
<suffix>u</suffix>
<suffix>l</suffix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="number">
<point>.</point>
<pointStarts />
<pointStarts/>
<exponent>e</exponent>
<suffix>ul</suffix>
<suffix>lu</suffix>
<suffix>u</suffix>
<suffix>f</suffix>
<suffix>l</suffix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<!-- C keywords -->

View File

@@ -62,7 +62,7 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
<string>@"</string>
<endString>"</endString>
<escape>\</escape>
<spanNewLines />
<spanNewLines/>
</highlighter>
<highlighter type="string">
<string>"</string>
@@ -78,11 +78,11 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
<suffix>lu</suffix>
<suffix>u</suffix>
<suffix>l</suffix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="number">
<point>.</point>
<pointStarts />
<pointStarts/>
<exponent>e</exponent>
<suffix>ul</suffix>
<suffix>lu</suffix>
@@ -91,7 +91,7 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
<suffix>d</suffix>
<suffix>m</suffix>
<suffix>l</suffix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<keyword>abstract</keyword>

View File

@@ -30,147 +30,147 @@ Reference: http://www.w3.org/TR/CSS21/propidx.html
-->
<highlighters>
<highlighter type="multiline-comment">
<start>/*</start>
<end>*/</end>
</highlighter>
<highlighter type="string">
<highlighter type="multiline-comment">
<start>/*</start>
<end>*/</end>
</highlighter>
<highlighter type="string">
<string>"</string>
<escape>\</escape>
<spanNewLines/>
</highlighter>
<highlighter type="string">
<escape>\</escape>
<spanNewLines/>
</highlighter>
<highlighter type="string">
<string>'</string>
<escape>\</escape>
<spanNewLines/>
</highlighter>
<highlighter type="number">
<point>.</point>
<pointStarts />
</highlighter>
<highlighter type="word">
<word>@charset</word>
<word>@import</word>
<word>@media</word>
<word>@page</word>
<style>directive</style>
</highlighter>
<highlighter type="keywords">
<partChars>-</partChars>
<keyword>azimuth</keyword>
<keyword>background-attachment</keyword>
<keyword>background-color</keyword>
<keyword>background-image</keyword>
<keyword>background-position</keyword>
<keyword>background-repeat</keyword>
<keyword>background</keyword>
<keyword>border-collapse</keyword>
<keyword>border-color</keyword>
<keyword>border-spacing</keyword>
<keyword>border-style</keyword>
<keyword>border-top</keyword>
<keyword>border-right</keyword>
<keyword>border-bottom</keyword>
<keyword>border-left</keyword>
<keyword>border-top-color</keyword>
<keyword>border-right-color</keyword>
<keyword>border-bottom-color</keyword>
<keyword>border-left-color</keyword>
<keyword>border-top-style</keyword>
<keyword>border-right-style</keyword>
<keyword>border-bottom-style</keyword>
<keyword>border-left-style</keyword>
<keyword>border-top-width</keyword>
<keyword>border-right-width</keyword>
<keyword>border-bottom-width</keyword>
<keyword>border-left-width</keyword>
<keyword>border-width</keyword>
<keyword>border</keyword>
<keyword>bottom</keyword>
<keyword>caption-side</keyword>
<keyword>clear</keyword>
<keyword>clip</keyword>
<keyword>color</keyword>
<keyword>content</keyword>
<keyword>counter-increment</keyword>
<keyword>counter-reset</keyword>
<keyword>cue-after</keyword>
<keyword>cue-before</keyword>
<keyword>cue</keyword>
<keyword>cursor</keyword>
<keyword>direction</keyword>
<keyword>display</keyword>
<keyword>elevation</keyword>
<keyword>empty-cells</keyword>
<keyword>float</keyword>
<keyword>font-family</keyword>
<keyword>font-size</keyword>
<keyword>font-style</keyword>
<keyword>font-variant</keyword>
<keyword>font-weight</keyword>
<keyword>font</keyword>
<keyword>height</keyword>
<keyword>left</keyword>
<keyword>letter-spacing</keyword>
<keyword>line-height</keyword>
<keyword>list-style-image</keyword>
<keyword>list-style-position</keyword>
<keyword>list-style-type</keyword>
<keyword>list-style</keyword>
<keyword>margin-right</keyword>
<keyword>margin-left</keyword>
<keyword>margin-top</keyword>
<keyword>margin-bottom</keyword>
<keyword>margin</keyword>
<keyword>max-height</keyword>
<keyword>max-width</keyword>
<keyword>min-height</keyword>
<keyword>min-width</keyword>
<keyword>orphans</keyword>
<keyword>outline-color</keyword>
<keyword>outline-style</keyword>
<keyword>outline-width</keyword>
<keyword>outline</keyword>
<keyword>overflow</keyword>
<keyword>padding-top</keyword>
<keyword>padding-right</keyword>
<keyword>padding-bottom</keyword>
<keyword>padding-left</keyword>
<keyword>padding</keyword>
<keyword>page-break-after</keyword>
<keyword>page-break-before</keyword>
<keyword>page-break-inside</keyword>
<keyword>pause-after</keyword>
<keyword>pause-before</keyword>
<keyword>pause</keyword>
<keyword>pitch-range</keyword>
<keyword>pitch</keyword>
<keyword>play-during</keyword>
<keyword>position</keyword>
<keyword>quotes</keyword>
<keyword>richness</keyword>
<keyword>right</keyword>
<keyword>speak-header</keyword>
<keyword>speak-numeral</keyword>
<keyword>speak-punctuation</keyword>
<keyword>speak</keyword>
<keyword>speech-rate</keyword>
<keyword>stress</keyword>
<keyword>table-layout</keyword>
<keyword>text-align</keyword>
<keyword>text-decoration</keyword>
<keyword>text-indent</keyword>
<keyword>text-transform</keyword>
<keyword>top</keyword>
<keyword>unicode-bidi</keyword>
<keyword>vertical-align</keyword>
<keyword>visibility</keyword>
<keyword>voice-family</keyword>
<keyword>volume</keyword>
<keyword>white-space</keyword>
<keyword>widows</keyword>
<keyword>width</keyword>
<keyword>word-spacing</keyword>
<keyword>z-index</keyword>
</highlighter>
<spanNewLines/>
</highlighter>
<highlighter type="number">
<point>.</point>
<pointStarts/>
</highlighter>
<highlighter type="word">
<word>@charset</word>
<word>@import</word>
<word>@media</word>
<word>@page</word>
<style>directive</style>
</highlighter>
<highlighter type="keywords">
<partChars>-</partChars>
<keyword>azimuth</keyword>
<keyword>background-attachment</keyword>
<keyword>background-color</keyword>
<keyword>background-image</keyword>
<keyword>background-position</keyword>
<keyword>background-repeat</keyword>
<keyword>background</keyword>
<keyword>border-collapse</keyword>
<keyword>border-color</keyword>
<keyword>border-spacing</keyword>
<keyword>border-style</keyword>
<keyword>border-top</keyword>
<keyword>border-right</keyword>
<keyword>border-bottom</keyword>
<keyword>border-left</keyword>
<keyword>border-top-color</keyword>
<keyword>border-right-color</keyword>
<keyword>border-bottom-color</keyword>
<keyword>border-left-color</keyword>
<keyword>border-top-style</keyword>
<keyword>border-right-style</keyword>
<keyword>border-bottom-style</keyword>
<keyword>border-left-style</keyword>
<keyword>border-top-width</keyword>
<keyword>border-right-width</keyword>
<keyword>border-bottom-width</keyword>
<keyword>border-left-width</keyword>
<keyword>border-width</keyword>
<keyword>border</keyword>
<keyword>bottom</keyword>
<keyword>caption-side</keyword>
<keyword>clear</keyword>
<keyword>clip</keyword>
<keyword>color</keyword>
<keyword>content</keyword>
<keyword>counter-increment</keyword>
<keyword>counter-reset</keyword>
<keyword>cue-after</keyword>
<keyword>cue-before</keyword>
<keyword>cue</keyword>
<keyword>cursor</keyword>
<keyword>direction</keyword>
<keyword>display</keyword>
<keyword>elevation</keyword>
<keyword>empty-cells</keyword>
<keyword>float</keyword>
<keyword>font-family</keyword>
<keyword>font-size</keyword>
<keyword>font-style</keyword>
<keyword>font-variant</keyword>
<keyword>font-weight</keyword>
<keyword>font</keyword>
<keyword>height</keyword>
<keyword>left</keyword>
<keyword>letter-spacing</keyword>
<keyword>line-height</keyword>
<keyword>list-style-image</keyword>
<keyword>list-style-position</keyword>
<keyword>list-style-type</keyword>
<keyword>list-style</keyword>
<keyword>margin-right</keyword>
<keyword>margin-left</keyword>
<keyword>margin-top</keyword>
<keyword>margin-bottom</keyword>
<keyword>margin</keyword>
<keyword>max-height</keyword>
<keyword>max-width</keyword>
<keyword>min-height</keyword>
<keyword>min-width</keyword>
<keyword>orphans</keyword>
<keyword>outline-color</keyword>
<keyword>outline-style</keyword>
<keyword>outline-width</keyword>
<keyword>outline</keyword>
<keyword>overflow</keyword>
<keyword>padding-top</keyword>
<keyword>padding-right</keyword>
<keyword>padding-bottom</keyword>
<keyword>padding-left</keyword>
<keyword>padding</keyword>
<keyword>page-break-after</keyword>
<keyword>page-break-before</keyword>
<keyword>page-break-inside</keyword>
<keyword>pause-after</keyword>
<keyword>pause-before</keyword>
<keyword>pause</keyword>
<keyword>pitch-range</keyword>
<keyword>pitch</keyword>
<keyword>play-during</keyword>
<keyword>position</keyword>
<keyword>quotes</keyword>
<keyword>richness</keyword>
<keyword>right</keyword>
<keyword>speak-header</keyword>
<keyword>speak-numeral</keyword>
<keyword>speak-punctuation</keyword>
<keyword>speak</keyword>
<keyword>speech-rate</keyword>
<keyword>stress</keyword>
<keyword>table-layout</keyword>
<keyword>text-align</keyword>
<keyword>text-decoration</keyword>
<keyword>text-indent</keyword>
<keyword>text-transform</keyword>
<keyword>top</keyword>
<keyword>unicode-bidi</keyword>
<keyword>vertical-align</keyword>
<keyword>visibility</keyword>
<keyword>voice-family</keyword>
<keyword>volume</keyword>
<keyword>white-space</keyword>
<keyword>widows</keyword>
<keyword>width</keyword>
<keyword>word-spacing</keyword>
<keyword>z-index</keyword>
</highlighter>
</highlighters>

View File

@@ -10,113 +10,113 @@
This file has been customized for the Asciidoctor project (http://asciidoctor.org).
-->
<highlighters>
<highlighter type="xml">
<elementSet>
<style>htmltag</style>
<element>a</element>
<element>abbr</element>
<element>address</element>
<element>area</element>
<element>article</element>
<element>aside</element>
<element>audio</element>
<element>b</element>
<element>base</element>
<element>bdi</element>
<element>blockquote</element>
<element>body</element>
<element>br</element>
<element>button</element>
<element>caption</element>
<element>canvas</element>
<element>cite</element>
<element>code</element>
<element>command</element>
<element>col</element>
<element>colgroup</element>
<element>dd</element>
<element>del</element>
<element>dialog</element>
<element>div</element>
<element>dl</element>
<element>dt</element>
<element>em</element>
<element>embed</element>
<element>fieldset</element>
<element>figcaption</element>
<element>figure</element>
<element>font</element>
<element>form</element>
<element>footer</element>
<element>h1</element>
<element>h2</element>
<element>h3</element>
<element>h4</element>
<element>h5</element>
<element>h6</element>
<element>head</element>
<element>header</element>
<element>hr</element>
<element>html</element>
<element>i</element>
<element>iframe</element>
<element>img</element>
<element>input</element>
<element>ins</element>
<element>kbd</element>
<element>label</element>
<element>legend</element>
<element>li</element>
<element>link</element>
<element>map</element>
<element>mark</element>
<element>menu</element>
<element>menu</element>
<element>meta</element>
<element>nav</element>
<element>noscript</element>
<element>object</element>
<element>ol</element>
<element>optgroup</element>
<element>option</element>
<element>p</element>
<element>param</element>
<element>pre</element>
<element>q</element>
<element>samp</element>
<element>script</element>
<element>section</element>
<element>select</element>
<element>small</element>
<element>source</element>
<element>span</element>
<element>strong</element>
<element>style</element>
<element>sub</element>
<element>summary</element>
<element>sup</element>
<element>table</element>
<element>tbody</element>
<element>td</element>
<element>textarea</element>
<element>tfoot</element>
<element>th</element>
<element>thead</element>
<element>time</element>
<element>title</element>
<element>tr</element>
<element>track</element>
<element>u</element>
<element>ul</element>
<element>var</element>
<element>video</element>
<element>wbr</element>
<element>xmp</element>
<ignoreCase/>
</elementSet>
<elementPrefix>
<style>namespace</style>
<prefix>xsl:</prefix>
</elementPrefix>
</highlighter>
<highlighter type="xml">
<elementSet>
<style>htmltag</style>
<element>a</element>
<element>abbr</element>
<element>address</element>
<element>area</element>
<element>article</element>
<element>aside</element>
<element>audio</element>
<element>b</element>
<element>base</element>
<element>bdi</element>
<element>blockquote</element>
<element>body</element>
<element>br</element>
<element>button</element>
<element>caption</element>
<element>canvas</element>
<element>cite</element>
<element>code</element>
<element>command</element>
<element>col</element>
<element>colgroup</element>
<element>dd</element>
<element>del</element>
<element>dialog</element>
<element>div</element>
<element>dl</element>
<element>dt</element>
<element>em</element>
<element>embed</element>
<element>fieldset</element>
<element>figcaption</element>
<element>figure</element>
<element>font</element>
<element>form</element>
<element>footer</element>
<element>h1</element>
<element>h2</element>
<element>h3</element>
<element>h4</element>
<element>h5</element>
<element>h6</element>
<element>head</element>
<element>header</element>
<element>hr</element>
<element>html</element>
<element>i</element>
<element>iframe</element>
<element>img</element>
<element>input</element>
<element>ins</element>
<element>kbd</element>
<element>label</element>
<element>legend</element>
<element>li</element>
<element>link</element>
<element>map</element>
<element>mark</element>
<element>menu</element>
<element>menu</element>
<element>meta</element>
<element>nav</element>
<element>noscript</element>
<element>object</element>
<element>ol</element>
<element>optgroup</element>
<element>option</element>
<element>p</element>
<element>param</element>
<element>pre</element>
<element>q</element>
<element>samp</element>
<element>script</element>
<element>section</element>
<element>select</element>
<element>small</element>
<element>source</element>
<element>span</element>
<element>strong</element>
<element>style</element>
<element>sub</element>
<element>summary</element>
<element>sup</element>
<element>table</element>
<element>tbody</element>
<element>td</element>
<element>textarea</element>
<element>tfoot</element>
<element>th</element>
<element>thead</element>
<element>time</element>
<element>title</element>
<element>tr</element>
<element>track</element>
<element>u</element>
<element>ul</element>
<element>var</element>
<element>video</element>
<element>wbr</element>
<element>xmp</element>
<ignoreCase/>
</elementSet>
<elementPrefix>
<style>namespace</style>
<prefix>xsl:</prefix>
</elementPrefix>
</highlighter>
</highlighters>

View File

@@ -54,7 +54,7 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
</highlighter>
<highlighter type="hexnumber">
<prefix>0x</prefix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="number">
<point>.</point>
@@ -62,7 +62,7 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
<suffix>f</suffix>
<suffix>d</suffix>
<suffix>l</suffix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<keyword>abstract</keyword>

View File

@@ -44,12 +44,12 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
</highlighter>
<highlighter type="hexnumber">
<prefix>0x</prefix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="number">
<point>.</point>
<exponent>e</exponent>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<keyword>break</keyword>

View File

@@ -20,7 +20,7 @@
<suffix>f</suffix>
<suffix>d</suffix>
<suffix>l</suffix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<keyword>true</keyword>

View File

@@ -47,12 +47,12 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
</highlighter>
<highlighter type="hexnumber">
<prefix>0x</prefix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="number">
<point>.</point>
<pointStarts />
<ignoreCase />
<pointStarts/>
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<keyword>if</keyword>

View File

@@ -47,24 +47,24 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
<highlighter type="string">
<string>"</string>
<escape>\</escape>
<spanNewLines />
<spanNewLines/>
</highlighter>
<highlighter type="string">
<string>'</string>
<escape>\</escape>
<spanNewLines />
<spanNewLines/>
</highlighter>
<highlighter type="heredoc">
<start>&lt;&lt;&lt;</start>
</highlighter>
<highlighter type="hexnumber">
<prefix>0x</prefix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="number">
<point>.</point>
<exponent>e</exponent>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<keyword>and</keyword>
@@ -142,7 +142,7 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
<keyword>__NAMESPACE__</keyword>
<keyword>goto</keyword>
<keyword>__DIR__</keyword>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="word">
<!-- highlight the php open and close tags as directives -->

View File

@@ -38,11 +38,11 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
<highlighter type="oneline-comment">#</highlighter>
<highlighter type="string">
<string>"""</string>
<spanNewLines />
<spanNewLines/>
</highlighter>
<highlighter type="string">
<string>'''</string>
<spanNewLines />
<spanNewLines/>
</highlighter>
<highlighter type="string">
<string>"</string>
@@ -55,14 +55,14 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
<highlighter type="hexnumber">
<prefix>0x</prefix>
<suffix>l</suffix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="number">
<point>.</point>
<pointStarts />
<pointStarts/>
<exponent>e</exponent>
<suffix>l</suffix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<keyword>and</keyword>

View File

@@ -59,12 +59,12 @@ Michiel Hendriks <elmuerte at users.sourceforge.net>
</highlighter>
<highlighter type="hexnumber">
<prefix>0x</prefix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="number">
<point>.</point>
<exponent>e</exponent>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<keyword>alias</keyword>

View File

@@ -32,36 +32,36 @@ freely, subject to the following restrictions:
</highlighter>
<highlighter type="string">
<string>'</string>
<doubleEscapes />
<doubleEscapes/>
</highlighter>
<highlighter type="string">
<string>U'</string>
<endString>'</endString>
<doubleEscapes />
<doubleEscapes/>
</highlighter>
<highlighter type="string">
<string>B'</string>
<endString>'</endString>
<doubleEscapes />
<doubleEscapes/>
</highlighter>
<highlighter type="string">
<string>N'</string>
<endString>'</endString>
<doubleEscapes />
<doubleEscapes/>
</highlighter>
<highlighter type="string">
<string>X'</string>
<endString>'</endString>
<doubleEscapes />
<doubleEscapes/>
</highlighter>
<highlighter type="number">
<point>.</point>
<pointStarts />
<pointStarts/>
<exponent>e</exponent>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<ignoreCase />
<ignoreCase/>
<!-- reserved -->
<keyword>A</keyword>
<keyword>ABS</keyword>

View File

@@ -20,7 +20,7 @@
<suffix>f</suffix>
<suffix>d</suffix>
<suffix>l</suffix>
<ignoreCase />
<ignoreCase/>
</highlighter>
<highlighter type="keywords">
<keyword>true</keyword>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
@@ -57,21 +57,21 @@
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<comments>
Copyright 2014-2015 the original author or authors.
Copyright 2014-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
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
http://www.apache.org/licenses/LICENSE-2.0
http://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.
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.
See the License for the specific language governing permissions and
limitations under the License.
</comments>
</license>
</licenses>
@@ -275,33 +275,33 @@ limitations under the License.
<useDefaultDelimiters>false</useDefaultDelimiters>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle.version}</version>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build-tools</artifactId>
<version>${spring-cloud-build.version}</version>
</dependency>
</dependencies>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<headerLocation>LICENSE.txt</headerLocation>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
</configuration>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle.version}</version>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build-tools</artifactId>
<version>${spring-cloud-build.version}</version>
</dependency>
</dependencies>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<headerLocation>LICENSE.txt</headerLocation>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
</configuration>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
@@ -317,7 +317,8 @@ limitations under the License.
<verbose>true</verbose>
<dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
</generateGitPropertiesFilename>
</configuration>
</plugin>
<!-- Support our own plugin -->
@@ -370,17 +371,22 @@ limitations under the License.
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.handlers</resource>
</transformer>
<transformer implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer">
<transformer
implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer">
<resource>META-INF/spring.factories</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.schemas</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${start-class}</mainClass>
</transformer>
</transformers>
@@ -445,7 +451,9 @@ limitations under the License.
<downloadUrl>https://github.com/spring-cloud</downloadUrl>
<site>
<id>spring-docs</id>
<url>scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version}</url>
<url>
scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version}
</url>
</site>
<repository>
<id>sonatype-nexus-staging</id>
@@ -756,7 +764,8 @@ limitations under the License.
<foCustomization>${docs.resources.dir}/docbook/xsl/pdf.xsl</foCustomization>
<useExtensions>1</useExtensions>
<highlightSource>1</highlightSource>
<highlightXslthlConfig>${docs.resources.dir}/docbook/xsl/xslthl-config.xml</highlightXslthlConfig>
<highlightXslthlConfig>${docs.resources.dir}/docbook/xsl/xslthl-config.xml
</highlightXslthlConfig>
</configuration>
<dependencies>
<dependency>
@@ -781,20 +790,21 @@ limitations under the License.
</goals>
<phase>prepare-package</phase>
<configuration>
<htmlCustomization>${docs.resources.dir}/docbook/xsl/html-singlepage.xsl</htmlCustomization>
<htmlCustomization>${docs.resources.dir}/docbook/xsl/html-singlepage.xsl
</htmlCustomization>
<targetDirectory>${basedir}/target/docbook/htmlsingle</targetDirectory>
<postProcess>
<copy todir="${basedir}/target/contents/reference/htmlsingle">
<fileset dir="${basedir}/target/docbook/htmlsingle">
<include name="**/*.html" />
<include name="**/*.html"/>
</fileset>
</copy>
<copy todir="${basedir}/target/contents/reference/htmlsingle">
<fileset dir="${docs.resources.dir}/docbook">
<include name="**/*.css" />
<include name="**/*.png" />
<include name="**/*.gif" />
<include name="**/*.jpg" />
<include name="**/*.css"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
</fileset>
</copy>
</postProcess>
@@ -807,7 +817,8 @@ limitations under the License.
</goals>
<phase>prepare-package</phase>
<configuration>
<htmlCustomization>${docs.resources.dir}/docbook/xsl/html-multipage.xsl</htmlCustomization>
<htmlCustomization>${docs.resources.dir}/docbook/xsl/html-multipage.xsl
</htmlCustomization>
<targetDirectory>${basedir}/target/docbook/html</targetDirectory>
<!-- By default `-` prefix is added to files and gh-pages don't render these files -->
<chunkedFilenamePrefix>multi_</chunkedFilenamePrefix>
@@ -815,15 +826,15 @@ limitations under the License.
<postProcess>
<copy todir="${basedir}/target/contents/reference/html">
<fileset dir="${basedir}/target/docbook/html">
<include name="**/*.html" />
<include name="**/*.html"/>
</fileset>
</copy>
<copy todir="${basedir}/target/contents/reference/html">
<fileset dir="${docs.resources.dir}/docbook">
<include name="**/*.css" />
<include name="**/*.png" />
<include name="**/*.gif" />
<include name="**/*.jpg" />
<include name="**/*.css"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
</fileset>
</copy>
</postProcess>
@@ -916,19 +927,19 @@ limitations under the License.
<configuration>
<target>
<echo file="${basedir}/target/generated-index/${docs.main}.adoc">
:nofooter:
:linkcss:
:stylesdir: css
:stylesheet: manual-singlepage.css
:nofooter:
:linkcss:
:stylesdir: css
:stylesheet: manual-singlepage.css
= {docs-main}
= {docs-main}
{spring-cloud-version}
{spring-cloud-version}
== Pick The Documentation Option
== Pick The Documentation Option
- link:single/{docs-main}.html[Single HTML]
- link:multi/multi_{docs-main}.html[Multi HTML]
- link:single/{docs-main}.html[Single HTML]
- link:multi/multi_{docs-main}.html[Multi HTML]
</echo>
</target>
</configuration>
@@ -964,22 +975,22 @@ limitations under the License.
<var name="version-type" value="${project.version}"/>
<propertyregex property="version-type"
override="true" input="${version-type}" regexp=".*\.(.*)"
replace="\1" />
replace="\1"/>
<propertyregex property="version-type"
override="true" input="${version-type}" regexp="(M)\d+"
replace="MILESTONE" />
replace="MILESTONE"/>
<propertyregex property="version-type"
override="true" input="${version-type}" regexp="(RC)\d+"
replace="MILESTONE" />
replace="MILESTONE"/>
<propertyregex property="version-type"
override="true" input="${version-type}" regexp="BUILD-(.*)"
replace="SNAPSHOT" />
replace="SNAPSHOT"/>
<stringutil string="${version-type}" property="spring-cloud-repo">
<lowercase/>
</stringutil>
<var name="github-tag" value="v${project.version}"/>
<propertyregex property="github-tag" override="true"
input="${github-tag}" regexp=".*SNAPSHOT" replace="master" />
input="${github-tag}" regexp=".*SNAPSHOT" replace="master"/>
</target>
</configuration>
</execution>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
@@ -8,7 +8,9 @@
<version>1.3.7.BUILD-SNAPSHOT</version>
<name>spring-cloud-build-tools</name>
<packaging>pom</packaging>
<description>Spring Cloud Build Dependencies: an internal BOM for use with Spring Cloud projects. Use as a BOM or by inheriting from the spring-cloud build parent.</description>
<description>Spring Cloud Build Dependencies: an internal BOM for use with Spring Cloud projects. Use as a BOM or by
inheriting from the spring-cloud build parent.
</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
@@ -43,8 +45,9 @@
<downloadUrl>https://github.com/spring-cloud</downloadUrl>
<site>
<id>spring-docs</id>
<url>scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version}
</url>
<url>
scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version}
</url>
</site>
<repository>
<id>repo.spring.io</id>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
@@ -20,5 +20,5 @@
<version>7.6</version>
</dependency>
</dependencies>
</project>

View File

@@ -15,10 +15,10 @@
<property name="ignoreComments" value="true"/>
</module>
<module name="UnusedImports">
<property name="processJavadoc" value="true" />
<property name="processJavadoc" value="true"/>
</module>
<module name="RedundantImport"/>
<module name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck" >
<module name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
<property name="illegalPkgs" value="com.google.common"/>
</module>
</module>

View File

@@ -1,296 +1,398 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="Spring Boot Java Conventions" version="12">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="90"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="90"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
</profile>
<profile kind="CodeFormatterProfile" name="Spring Boot Java Conventions" version="12">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="do not insert"/>
<setting
id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
<setting
id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="90"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments"
value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header"
value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration"
value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header"
value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference"
value="do not insert"/>
<setting
id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression"
value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting
id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header"
value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration"
value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="90"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation"
value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
</profile>
</profiles>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<version>1.3.7.BUILD-SNAPSHOT</version>
@@ -18,21 +18,21 @@
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<comments>
Copyright 2014-2015 the original author or authors.
Copyright 2014-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
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
http://www.apache.org/licenses/LICENSE-2.0
http://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.
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.
See the License for the specific language governing permissions and
limitations under the License.
</comments>
</license>
</licenses>
@@ -74,8 +74,9 @@ limitations under the License.
<downloadUrl>https://github.com/spring-cloud</downloadUrl>
<site>
<id>spring-docs</id>
<url>scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version}
</url>
<url>
scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version}
</url>
</site>
<repository>
<id>repo.spring.io</id>

View File

@@ -13,4 +13,4 @@ _site/
*.ipr
.factorypath
*.swp
/consul
/consul

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>

View File

@@ -1 +1 @@
-Xmx1024m -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom
-Xmx1024m -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom

View File

@@ -1 +1,2 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip

View File

@@ -1,66 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<servers>
<server>
<id>repo.spring.io</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.CI_DEPLOY_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<!--
N.B. this profile is only here to support users and IDEs that do not use Maven 3.3.
It isn't needed on the command line if you use the wrapper script (mvnw) or if you use
a native Maven with the right version. Eclipse users should points their Maven tooling to
this settings file, or copy the profile into their ~/.m2/settings.xml.
-->
<id>spring</id>
<activation><activeByDefault>true</activeByDefault></activation>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>http://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<servers>
<server>
<id>repo.spring.io</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.CI_DEPLOY_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<!--
N.B. this profile is only here to support users and IDEs that do not use Maven 3.3.
It isn't needed on the command line if you use the wrapper script (mvnw) or if you use
a native Maven with the right version. Eclipse users should points their Maven tooling to
this settings file, or copy the profile into their ~/.m2/settings.xml.
-->
<id>spring</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>http://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>

View File

@@ -6,4 +6,4 @@ language: java
before_install:
- gem install asciidoctor
script:
- ./mvnw clean install -P docs -q -U -Dmaven.test.redirectTestOutputToFile=true
- ./mvnw clean install -P docs -q -U -Dmaven.test.redirectTestOutputToFile=true

View File

@@ -82,4 +82,4 @@ and for Maven Central use
$ mvn install -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2
----
(the "central" profile is available for all projects in Spring Cloud and it sets up the gpg jar signing, and the repository has to be specified separately for this project because it is a parent of the starter parent which users in turn have as their own parent).
(the "central" profile is available for all projects in Spring Cloud and it sets up the gpg jar signing, and the repository has to be specified separately for this project because it is a parent of the starter parent which users in turn have as their own parent).

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-docs</artifactId>

View File

@@ -327,4 +327,4 @@ build_docs_if_applicable
retrieve_doc_properties
stash_changes
add_docs_from_target
checkout_previous_branch
checkout_previous_branch

View File

@@ -4,4 +4,4 @@ spring-cloud-dependencies POM to manage dependencies in Maven or
Gradle. The release trains have names, not versions, to avoid
confusion with the sub-projects. The names are an alphabetic sequence
(so you can sort them chronologically) with names of London Tube
stations ("Angel" is the first release, "Brixton" is the second).
stations ("Angel" is the first release, "Brixton" is the second).

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-cloud-starter-build</artifactId>
<packaging>pom</packaging>
@@ -11,7 +11,7 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>1.2.2.RELEASE</version>
<relativePath />
<relativePath/>
</parent>
<scm>
@@ -28,7 +28,7 @@
<modules>
<module>spring-cloud-dependencies</module>
<module>spring-cloud-starter-parent</module>
<module>docs</module>
<module>docs</module>
</modules>
<build>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
@@ -31,7 +31,7 @@
</properties>
<dependencyManagement>
<dependencies>
<!-- bom dependencies at the bottom so they can be overridden above -->
<!-- bom dependencies at the bottom so they can be overridden above -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-dependencies</artifactId>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
@@ -37,8 +37,9 @@
<downloadUrl>https://github.com/spring-cloud</downloadUrl>
<site>
<id>spring-docs</id>
<url>scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version}
</url>
<url>
scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version}
</url>
</site>
<repository>
<id>repo.spring.io</id>

View File

@@ -1,66 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<servers>
<server>
<id>repo.spring.io</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.CI_DEPLOY_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<!--
N.B. this profile is only here to support users and IDEs that do not use Maven 3.3.
It isn't needed on the command line if you use the wrapper script (mvnw) or if you use
a native Maven with the right version. Eclipse users should points their Maven tooling to
this settings file, or copy the profile into their ~/.m2/settings.xml.
-->
<id>spring</id>
<activation><activeByDefault>true</activeByDefault></activation>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>http://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<servers>
<server>
<id>repo.spring.io</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.CI_DEPLOY_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<!--
N.B. this profile is only here to support users and IDEs that do not use Maven 3.3.
It isn't needed on the command line if you use the wrapper script (mvnw) or if you use
a native Maven with the right version. Eclipse users should points their Maven tooling to
this settings file, or copy the profile into their ~/.m2/settings.xml.
-->
<id>spring</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>http://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>

View File

@@ -6,4 +6,4 @@ language: java
before_install:
- gem install asciidoctor
script:
- ./mvnw clean install -P docs -q -U -Dmaven.test.redirectTestOutputToFile=true
- ./mvnw clean install -P docs -q -U -Dmaven.test.redirectTestOutputToFile=true

View File

@@ -82,4 +82,4 @@ and for Maven Central use
$ mvn install -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2
----
(the "central" profile is available for all projects in Spring Cloud and it sets up the gpg jar signing, and the repository has to be specified separately for this project because it is a parent of the starter parent which users in turn have as their own parent).
(the "central" profile is available for all projects in Spring Cloud and it sets up the gpg jar signing, and the repository has to be specified separately for this project because it is a parent of the starter parent which users in turn have as their own parent).

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-docs</artifactId>

View File

@@ -327,4 +327,4 @@ build_docs_if_applicable
retrieve_doc_properties
stash_changes
add_docs_from_target
checkout_previous_branch
checkout_previous_branch

View File

@@ -4,4 +4,4 @@ spring-cloud-dependencies POM to manage dependencies in Maven or
Gradle. The release trains have names, not versions, to avoid
confusion with the sub-projects. The names are an alphabetic sequence
(so you can sort them chronologically) with names of London Tube
stations ("Angel" is the first release, "Brixton" is the second).
stations ("Angel" is the first release, "Brixton" is the second).

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-cloud-starter-build</artifactId>
<packaging>pom</packaging>
@@ -11,7 +11,7 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>1.3.1.BUILD-SNAPSHOT</version>
<relativePath />
<relativePath/>
</parent>
<scm>
@@ -28,7 +28,7 @@
<modules>
<module>spring-cloud-dependencies</module>
<module>spring-cloud-starter-parent</module>
<module>docs</module>
<module>docs</module>
</modules>
<build>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
@@ -32,7 +32,7 @@
</properties>
<dependencyManagement>
<dependencies>
<!-- bom dependencies at the bottom so they can be overridden above -->
<!-- bom dependencies at the bottom so they can be overridden above -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-dependencies</artifactId>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
@@ -37,8 +37,9 @@
<downloadUrl>https://github.com/spring-cloud</downloadUrl>
<site>
<id>spring-docs</id>
<url>scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version}
</url>
<url>
scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version}
</url>
</site>
<repository>
<id>repo.spring.io</id>

View File

@@ -4,10 +4,11 @@
<meta http-equiv="refresh" content="1; url=http://cloud.spring.io/spring-cloud-static/Dalston.SR3/">
<script>
window.location.href = "http://cloud.spring.io/spring-cloud-static/Dalston.SR3/"
window.location.href = "http://cloud.spring.io/spring-cloud-static/Dalston.SR3/"
</script>
<title>Page Redirection</title>
<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
If you are not redirected automatically, follow the <a href='http://cloud.spring.io/spring-cloud-static/Dalston.SR3/'>link to latest release</a>
If you are not redirected automatically, follow the <a href='http://cloud.spring.io/spring-cloud-static/Dalston.SR3/'>link
to latest release</a>

Some files were not shown because too many files have changed in this diff Show More