Merge branch '2.0.x' into 2.1.x

This commit is contained in:
Phillip Webb
2019-06-28 23:30:29 -07:00
343 changed files with 338 additions and 140 deletions

View File

@@ -34,7 +34,7 @@ import org.apache.maven.shared.artifact.filter.collection.FilterArtifacts;
*
* @author Stephane Nicoll
* @author David Turanski
* @since 1.1
* @since 1.1.0
*/
public abstract class AbstractDependencyFilterMojo extends AbstractMojo {
@@ -42,7 +42,7 @@ public abstract class AbstractDependencyFilterMojo extends AbstractMojo {
* Collection of artifact definitions to include. The {@link Include} element defines
* a {@code groupId} and {@code artifactId} mandatory properties and an optional
* {@code classifier} property.
* @since 1.2
* @since 1.2.0
*/
@Parameter(property = "spring-boot.includes")
private List<Include> includes;
@@ -51,14 +51,14 @@ public abstract class AbstractDependencyFilterMojo extends AbstractMojo {
* Collection of artifact definitions to exclude. The {@link Exclude} element defines
* a {@code groupId} and {@code artifactId} mandatory properties and an optional
* {@code classifier} property.
* @since 1.1
* @since 1.1.0
*/
@Parameter(property = "spring-boot.excludes")
private List<Exclude> excludes;
/**
* Comma separated list of groupId names to exclude (exact match).
* @since 1.1
* @since 1.1.0
*/
@Parameter(property = "spring-boot.excludeGroupIds", defaultValue = "")
private String excludeGroupIds;

View File

@@ -49,6 +49,7 @@ import org.springframework.boot.loader.tools.MainClassFinder;
* @author David Liu
* @author Daniel Young
* @author Dmytro Nosan
* @since 1.3.0
* @see RunMojo
* @see StartMojo
*/
@@ -58,7 +59,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* The Maven project.
* @since 1.0
* @since 1.0.0
*/
@Parameter(defaultValue = "${project}", readonly = true, required = true)
private MavenProject project;
@@ -69,7 +70,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
* them to appear twice if {@code ClassLoader.getResources()} is called. Please
* consider adding {@code spring-boot-devtools} to your project instead as it provides
* this feature and many more.
* @since 1.0
* @since 1.0.0
*/
@Parameter(property = "spring-boot.run.addResources", defaultValue = "false")
private boolean addResources = false;
@@ -77,14 +78,14 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* Path to agent jar. NOTE: the use of agents means that processes will be started by
* forking a new JVM.
* @since 1.0
* @since 1.0.0
*/
@Parameter(property = "spring-boot.run.agent")
private File[] agent;
/**
* Flag to say that the agent requires -noverify.
* @since 1.0
* @since 1.0.0
*/
@Parameter(property = "spring-boot.run.noverify")
private boolean noverify = false;
@@ -93,7 +94,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
* Current working directory to use for the application. If not specified, basedir
* will be used. NOTE: the use of working directory means that processes will be
* started by forking a new JVM.
* @since 1.5
* @since 1.5.0
*/
@Parameter(property = "spring-boot.run.workingDirectory")
private File workingDirectory;
@@ -103,7 +104,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
* application. On command line, make sure to wrap multiple values between quotes.
* NOTE: the use of JVM arguments means that processes will be started by forking a
* new JVM.
* @since 1.1
* @since 1.1.0
*/
@Parameter(property = "spring-boot.run.jvmArguments")
private String jvmArguments;
@@ -111,7 +112,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* List of JVM system properties to pass to the process. NOTE: the use of system
* properties means that processes will be started by forking a new JVM.
* @since 2.1
* @since 2.1.0
*/
@Parameter
private Map<String, String> systemPropertyVariables;
@@ -120,7 +121,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
* List of Environment variables that should be associated with the forked process
* used to run the application. NOTE: the use of Environment variables means that
* processes will be started by forking a new JVM.
* @since 2.1
* @since 2.1.0
*/
@Parameter
private Map<String, String> environmentVariables;
@@ -128,7 +129,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* Arguments that should be passed to the application. On command line use commas to
* separate multiple arguments.
* @since 1.0
* @since 1.0.0
*/
@Parameter(property = "spring-boot.run.arguments")
private String[] arguments;
@@ -137,7 +138,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
* The spring profiles to activate. Convenience shortcut of specifying the
* 'spring.profiles.active' argument. On command line use commas to separate multiple
* profiles.
* @since 1.3
* @since 1.3.0
*/
@Parameter(property = "spring-boot.run.profiles")
private String[] profiles;
@@ -145,7 +146,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* The name of the main class. If not specified the first compiled class found that
* contains a 'main' method will be used.
* @since 1.0
* @since 1.0.0
*/
@Parameter(property = "spring-boot.run.main-class")
private String mainClass;
@@ -153,7 +154,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* Additional folders besides the classes directory that should be added to the
* classpath.
* @since 1.0
* @since 1.0.0
*/
@Parameter(property = "spring-boot.run.folders")
private String[] folders;
@@ -161,7 +162,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* Directory containing the classes and resource files that should be packaged into
* the archive.
* @since 1.0
* @since 1.0.0
*/
@Parameter(defaultValue = "${project.build.outputDirectory}", required = true)
private File classesDirectory;
@@ -170,14 +171,14 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
* Flag to indicate if the run processes should be forked. {@code fork} is
* automatically enabled if an agent, jvmArguments or working directory are specified,
* or if devtools is present.
* @since 1.2
* @since 1.2.0
*/
@Parameter(property = "spring-boot.run.fork")
private Boolean fork;
/**
* Flag to include the test classpath when running.
* @since 1.3
* @since 1.3.0
*/
@Parameter(property = "spring-boot.run.useTestClasspath", defaultValue = "false")
private Boolean useTestClasspath;

View File

@@ -39,6 +39,7 @@ import org.springframework.boot.loader.tools.LibraryScope;
* @author Phillip Webb
* @author Andy Wilkinson
* @author Stephane Nicoll
* @since 1.0.0
*/
public class ArtifactsLibraries implements Libraries {

View File

@@ -30,7 +30,7 @@ import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter;
*
* @author Stephane Nicoll
* @author David Turanski
* @since 1.2
* @since 1.2.0
*/
public abstract class DependencyFilter extends AbstractArtifactsFilter {

View File

@@ -20,7 +20,7 @@ package org.springframework.boot.maven;
* A model for a dependency to exclude.
*
* @author Stephane Nicoll
* @since 1.1
* @since 1.1.0
*/
public class Exclude extends FilterableDependency {

View File

@@ -26,7 +26,7 @@ import org.apache.maven.artifact.Artifact;
*
* @author Stephane Nicoll
* @author David Turanski
* @since 1.1
* @since 1.1.0
*/
public class ExcludeFilter extends DependencyFilter {

View File

@@ -23,7 +23,6 @@ import org.apache.maven.plugins.annotations.Parameter;
*
* @author Stephane Nicoll
* @author David Turanski
* @since 1.2
*/
abstract class FilterableDependency {

View File

@@ -20,7 +20,7 @@ package org.springframework.boot.maven;
* A model for a dependency to include.
*
* @author David Turanski
* @since 1.2
* @since 1.2.0
*/
public class Include extends FilterableDependency {

View File

@@ -26,7 +26,7 @@ import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter;
* {@link Include}.
*
* @author David Turanski
* @since 1.2
* @since 1.2.0
*/
public class IncludeFilter extends DependencyFilter {

View File

@@ -28,7 +28,7 @@ import org.apache.maven.shared.artifact.filter.collection.AbstractArtifactFeatur
* classes use of {@link String#startsWith} to match on prefix.
*
* @author Mark Ingram
* @since 1.1
* @since 1.1.0
*/
public class MatchingGroupIdFilter extends AbstractArtifactFeatureFilter {

View File

@@ -33,6 +33,7 @@ import org.apache.maven.plugins.shade.resource.ResourceTransformer;
*
* @author Dave Syer
* @author Andy Wilkinson
* @since 1.0.0
*/
public class PropertiesMergingResourceTransformer implements ResourceTransformer {

View File

@@ -59,6 +59,7 @@ import org.springframework.boot.loader.tools.Repackager.MainClassTimeoutWarningL
* @author Dave Syer
* @author Stephane Nicoll
* @author Björn Lindström
* @since 1.0.0
*/
@Mojo(name = "repackage", defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true, threadSafe = true,
requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME,
@@ -69,35 +70,35 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
/**
* The Maven project.
* @since 1.0
* @since 1.0.0
*/
@Parameter(defaultValue = "${project}", readonly = true, required = true)
private MavenProject project;
/**
* Maven project helper utils.
* @since 1.0
* @since 1.0.0
*/
@Component
private MavenProjectHelper projectHelper;
/**
* Directory containing the generated archive.
* @since 1.0
* @since 1.0.0
*/
@Parameter(defaultValue = "${project.build.directory}", required = true)
private File outputDirectory;
/**
* Name of the generated archive.
* @since 1.0
* @since 1.0.0
*/
@Parameter(defaultValue = "${project.build.finalName}", readonly = true)
private String finalName;
/**
* Skip the execution.
* @since 1.2
* @since 1.2.0
*/
@Parameter(property = "spring-boot.repackage.skip", defaultValue = "false")
private boolean skip;
@@ -112,14 +113,14 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
* allows to deploy it alongside to the original one, see <a href=
* "https://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-classifiers.html"
* > the maven documentation for more details</a>.
* @since 1.0
* @since 1.0.0
*/
@Parameter
private String classifier;
/**
* Attach the repackaged archive to be installed and deployed.
* @since 1.4
* @since 1.4.0
*/
@Parameter(defaultValue = "true")
private boolean attach = true;
@@ -127,7 +128,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
/**
* The name of the main class. If not specified the first compiled class found that
* contains a 'main' method will be used.
* @since 1.0
* @since 1.0.0
*/
@Parameter
private String mainClass;
@@ -136,7 +137,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
* The type of archive (which corresponds to how the dependencies are laid out inside
* it). Possible values are JAR, WAR, ZIP, DIR, NONE. Defaults to a guess based on the
* archive type.
* @since 1.0
* @since 1.0.0
*/
@Parameter
private LayoutType layout;
@@ -145,7 +146,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
* The layout factory that will be used to create the executable archive if no
* explicit layout is set. Alternative layouts implementations can be provided by 3rd
* parties.
* @since 1.5
* @since 1.5.0
*/
@Parameter
private LayoutFactory layoutFactory;
@@ -154,7 +155,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
* A list of the libraries that must be unpacked from fat jars in order to run.
* Specify each library as a {@code <dependency>} with a {@code <groupId>} and a
* {@code <artifactId>} and they will be unpacked at runtime.
* @since 1.1
* @since 1.1.0
*/
@Parameter
private List<Dependency> requiresUnpack;
@@ -168,7 +169,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
* or war that has been made fully-executable. It is recommended that you only enable
* this option if you intend to execute it directly, rather than running it with
* {@code java -jar} or deploying it to a servlet container.
* @since 1.3
* @since 1.3.0
*/
@Parameter(defaultValue = "false")
private boolean executable;
@@ -176,28 +177,28 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
/**
* The embedded launch script to prepend to the front of the jar if it is fully
* executable. If not specified the 'Spring Boot' default script will be used.
* @since 1.3
* @since 1.3.0
*/
@Parameter
private File embeddedLaunchScript;
/**
* Properties that should be expanded in the embedded launch script.
* @since 1.3
* @since 1.3.0
*/
@Parameter
private Properties embeddedLaunchScriptProperties;
/**
* Exclude Spring Boot devtools from the repackaged archive.
* @since 1.3
* @since 1.3.0
*/
@Parameter(defaultValue = "true")
private boolean excludeDevtools = true;
/**
* Include system scoped dependencies.
* @since 1.4
* @since 1.4.0
*/
@Parameter(defaultValue = "false")
public boolean includeSystemScope;

View File

@@ -27,7 +27,6 @@ import org.codehaus.plexus.util.cli.CommandLineUtils;
* Parse and expose arguments specified in a single string.
*
* @author Stephane Nicoll
* @since 1.1.0
*/
class RunArguments {

View File

@@ -38,6 +38,7 @@ import org.springframework.boot.loader.tools.RunProcess;
* @author Dmytro Nosan
* @author Stephane Nicoll
* @author Andy Wilkinson
* @since 1.0.0
*/
@Mojo(name = "run", requiresProject = true, defaultPhase = LifecyclePhase.VALIDATE,
requiresDependencyResolution = ResolutionScope.TEST)

View File

@@ -52,7 +52,7 @@ public class StopMojo extends AbstractMojo {
* Flag to indicate if process to stop was forked. By default, the value is inherited
* from the {@link MavenProject}. If it is set, it must match the value used to
* {@link StartMojo start} the process.
* @since 1.3
* @since 1.3.0
*/
@Parameter(property = "spring-boot.stop.fork")
private Boolean fork;