mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '2.5.x'
Closes gh-28153
This commit is contained in:
commit
ea68672594
@ -110,18 +110,19 @@ public class MavenPluginPlugin implements Plugin<Project> {
|
|||||||
project.getDependencies()
|
project.getDependencies()
|
||||||
.components((components) -> components.all(MavenRepositoryComponentMetadataRule.class));
|
.components((components) -> components.all(MavenRepositoryComponentMetadataRule.class));
|
||||||
Copy task = project.getTasks().create("populateIntTestMavenRepository", Copy.class);
|
Copy task = project.getTasks().create("populateIntTestMavenRepository", Copy.class);
|
||||||
task.setDestinationDir(project.getBuildDir());
|
task.setDestinationDir(new File(project.getBuildDir(), "int-test-maven-repository"));
|
||||||
task.into("int-test-maven-repository",
|
task.with(copyIntTestMavenRepositoryFiles(project, runtimeClasspathMavenRepository));
|
||||||
(copy) -> copyIntTestMavenRepositoryFiles(project, copy, runtimeClasspathMavenRepository));
|
|
||||||
task.dependsOn(project.getTasks().getByName(MavenRepositoryPlugin.PUBLISH_TO_PROJECT_REPOSITORY_TASK_NAME));
|
task.dependsOn(project.getTasks().getByName(MavenRepositoryPlugin.PUBLISH_TO_PROJECT_REPOSITORY_TASK_NAME));
|
||||||
project.getTasks().getByName(IntegrationTestPlugin.INT_TEST_TASK_NAME).dependsOn(task);
|
project.getTasks().getByName(IntegrationTestPlugin.INT_TEST_TASK_NAME).dependsOn(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void copyIntTestMavenRepositoryFiles(Project project, CopySpec copy,
|
private CopySpec copyIntTestMavenRepositoryFiles(Project project,
|
||||||
RuntimeClasspathMavenRepository runtimeClasspathMavenRepository) {
|
RuntimeClasspathMavenRepository runtimeClasspathMavenRepository) {
|
||||||
copy.from(project.getConfigurations().getByName(MavenRepositoryPlugin.MAVEN_REPOSITORY_CONFIGURATION_NAME));
|
CopySpec copySpec = project.copySpec();
|
||||||
copy.from(new File(project.getBuildDir(), "maven-repository"));
|
copySpec.from(project.getConfigurations().getByName(MavenRepositoryPlugin.MAVEN_REPOSITORY_CONFIGURATION_NAME));
|
||||||
copy.from(runtimeClasspathMavenRepository);
|
copySpec.from(new File(project.getBuildDir(), "maven-repository"));
|
||||||
|
copySpec.from(runtimeClasspathMavenRepository);
|
||||||
|
return copySpec;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addDocumentPluginGoalsTask(Project project, MavenExec generatePluginDescriptorTask) {
|
private void addDocumentPluginGoalsTask(Project project, MavenExec generatePluginDescriptorTask) {
|
||||||
@ -169,7 +170,7 @@ public class MavenPluginPlugin implements Plugin<Project> {
|
|||||||
FormatHelpMojoSourceTask copyFormattedHelpMojoSourceTask = createCopyFormattedHelpMojoSourceTask(project,
|
FormatHelpMojoSourceTask copyFormattedHelpMojoSourceTask = createCopyFormattedHelpMojoSourceTask(project,
|
||||||
generateHelpMojoTask, generatedHelpMojoDir);
|
generateHelpMojoTask, generatedHelpMojoDir);
|
||||||
project.getTasks().getByName(mainSourceSet.getCompileJavaTaskName()).dependsOn(copyFormattedHelpMojoSourceTask);
|
project.getTasks().getByName(mainSourceSet.getCompileJavaTaskName()).dependsOn(copyFormattedHelpMojoSourceTask);
|
||||||
mainSourceSet.java((javaSources) -> javaSources.srcDir(generatedHelpMojoDir));
|
mainSourceSet.java((javaSources) -> javaSources.srcDir(copyFormattedHelpMojoSourceTask));
|
||||||
Copy pluginDescriptorInputs = createCopyPluginDescriptorInputs(project, pluginDescriptorDir, mainSourceSet);
|
Copy pluginDescriptorInputs = createCopyPluginDescriptorInputs(project, pluginDescriptorDir, mainSourceSet);
|
||||||
pluginDescriptorInputs.dependsOn(mainSourceSet.getClassesTaskName());
|
pluginDescriptorInputs.dependsOn(mainSourceSet.getClassesTaskName());
|
||||||
MavenExec task = createGeneratePluginDescriptorTask(project, pluginDescriptorDir);
|
MavenExec task = createGeneratePluginDescriptorTask(project, pluginDescriptorDir);
|
||||||
|
@ -25,6 +25,14 @@ javadoc {
|
|||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
javadocJar {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
|
sourcesJar {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
plugins.withType(EclipsePlugin) {
|
plugins.withType(EclipsePlugin) {
|
||||||
extensions.getByType(org.gradle.plugins.ide.eclipse.model.EclipseModel).classpath { classpath ->
|
extensions.getByType(org.gradle.plugins.ide.eclipse.model.EclipseModel).classpath { classpath ->
|
||||||
classpath.plusConfigurations.add(configurations.getByName(sourceSets.main.runtimeClasspathConfigurationName))
|
classpath.plusConfigurations.add(configurations.getByName(sourceSets.main.runtimeClasspathConfigurationName))
|
||||||
|
Loading…
Reference in New Issue
Block a user