Source format and clean-up

This commit is contained in:
Phillip Webb
2013-11-15 23:42:40 -08:00
parent 883fd9162f
commit 64f32893bb
46 changed files with 133 additions and 99 deletions

View File

@@ -26,7 +26,7 @@ import org.springframework.boot.gradle.task.RunJar;
/**
* Gradle 'Spring Boot' {@link Plugin}.
*
*
* @author Phillip Webb
*/
public class SpringBootPlugin implements Plugin<Project> {
@@ -53,12 +53,14 @@ public class SpringBootPlugin implements Plugin<Project> {
}
private Repackage addRepackageTask(Project project) {
Repackage packageTask = project.getTasks().create(REPACKAGE_TASK_NAME, Repackage.class);
Repackage packageTask = project.getTasks().create(REPACKAGE_TASK_NAME,
Repackage.class);
packageTask.setDescription("Repackage existing JAR and WAR "
+ "archives so that they can be executed from the command " + "line using 'java -jar'");
+ "archives so that they can be executed from the command "
+ "line using 'java -jar'");
packageTask.setGroup(BasePlugin.BUILD_GROUP);
packageTask.dependsOn(project.getConfigurations().getByName(Dependency.ARCHIVES_CONFIGURATION)
.getAllArtifacts().getBuildDependencies());
packageTask.dependsOn(project.getConfigurations().getByName(
Dependency.ARCHIVES_CONFIGURATION).getAllArtifacts().getBuildDependencies());
return packageTask;
}

View File

@@ -1,3 +1,4 @@
package org.springframework.boot.gradle.task;
import java.io.File;
@@ -23,6 +24,7 @@ class ProjectLibraries implements Libraries {
/**
* Create a new {@link ProjectLibraries} instance of the specified {@link Project}.
*
* @param project the gradle project
*/
public ProjectLibraries(Project project) {
@@ -31,6 +33,7 @@ class ProjectLibraries implements Libraries {
/**
* Set the name of the provided configuration. Defaults to 'providedRuntime'.
*
* @param providedConfigurationName the providedConfigurationName to set
*/
public void setProvidedConfigurationName(String providedConfigurationName) {

View File

@@ -29,7 +29,7 @@ import org.springframework.boot.loader.tools.Repackager;
/**
* Repackage task.
*
*
* @author Phillip Webb
*/
public class Repackage extends DefaultTask {
@@ -44,6 +44,7 @@ public class Repackage extends DefaultTask {
libraries.setProvidedConfigurationName(extension.getProvidedConfiguration());
}
project.getTasks().withType(Jar.class, new Action<Jar>() {
@Override
public void execute(Jar archive) {
if ("".equals(archive.getClassifier())) {

View File

@@ -29,7 +29,7 @@ import org.gradle.process.internal.ExecAction;
/**
* Run Jar task. Run the built jar file from Gradle.
*
*
* @author Dave Noel
*/
public class RunJar extends DefaultTask {
@@ -40,6 +40,7 @@ public class RunJar extends DefaultTask {
public void runJar() {
Project project = getProject();
project.getTasks().withType(Jar.class, new Action<Jar>() {
@Override
public void execute(Jar archive) {
file = archive.getArchivePath();