Merge branch '1.5.x' into 2.0.x

This commit is contained in:
Phillip Webb
2019-06-28 23:27:59 -07:00
342 changed files with 332 additions and 139 deletions

View File

@@ -35,7 +35,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 {
@@ -43,7 +43,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;
@@ -52,21 +52,21 @@ 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;
/**
* Comma separated list of artifact names to exclude (exact match).
* @since 1.1
* @since 1.1.0
* @deprecated as of 2.0.2 in favour of {@code excludes}
*/
@Parameter(property = "spring-boot.excludeArtifactIds", defaultValue = "")

View File

@@ -46,6 +46,7 @@ import org.springframework.boot.loader.tools.MainClassFinder;
* @author Stephane Nicoll
* @author David Liu
* @author Daniel Young
* @since 1.3.0
* @see RunMojo
* @see StartMojo
*/
@@ -55,7 +56,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;
@@ -66,7 +67,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;
@@ -74,14 +75,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;
@@ -90,7 +91,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;
@@ -100,7 +101,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;
@@ -108,7 +109,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;
@@ -117,7 +118,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;
@@ -125,7 +126,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;
@@ -133,7 +134,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;
@@ -141,7 +142,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;
@@ -150,14 +151,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

@@ -57,6 +57,7 @@ import org.springframework.boot.loader.tools.Repackager.MainClassTimeoutWarningL
* @author Phillip Webb
* @author Dave Syer
* @author Stephane Nicoll
* @since 1.0.0
*/
@Mojo(name = "repackage", defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true, threadSafe = true,
requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME,
@@ -65,35 +66,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}", required = 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;
@@ -106,14 +107,14 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
* 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;
@@ -121,7 +122,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;
@@ -130,7 +131,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;
@@ -139,7 +140,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;
@@ -148,7 +149,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;
@@ -162,7 +163,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;
@@ -170,28 +171,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

@@ -36,6 +36,7 @@ import org.springframework.boot.loader.tools.RunProcess;
* @author Phillip Webb
* @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;