This commit is contained in:
Phillip Webb
2015-06-18 14:11:40 -07:00
parent fffc6f5dd2
commit 2f16a01dd5
8 changed files with 41 additions and 43 deletions

View File

@@ -36,7 +36,6 @@ import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.shared.artifact.filter.collection.AbstractArtifactFeatureFilter;
import org.apache.maven.shared.artifact.filter.collection.FilterArtifacts;
import org.springframework.boot.loader.tools.FileUtils;
import org.springframework.boot.loader.tools.MainClassFinder;
@@ -349,7 +348,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
private void addDependencies(List<URL> urls) throws MalformedURLException,
MojoExecutionException {
FilterArtifacts filters = this.useTestClasspath ? getFilters() : getFilters(new TestArtifactFilter());
FilterArtifacts filters = this.useTestClasspath ? getFilters()
: getFilters(new TestArtifactFilter());
Set<Artifact> artifacts = filterDependencies(this.project.getArtifacts(), filters);
for (Artifact artifact : artifacts) {
if (artifact.getFile() != null) {

View File

@@ -151,7 +151,7 @@ mvn spring-boot:run
in such a way that any dependency that is excluded in the plugin's configuration gets excluded
from the classpath as well. See {{{./examples/exclude-dependency.html}Exclude a dependency}} for
more details.
Sometimes it is useful to include test dependencies when running the application. For example,
if you want to run your application in a test mode that uses stub classes. If you wish to do this,
you can set the <<<useTestClasspath>>> parameter to true. Note that this is only applied when you