#70 - Revert Adapt to changed distribution build.
This reverts commit 76169aa395 as the distribution build already constructs correct Javadoc.
This commit is contained in:
@@ -31,8 +31,6 @@ import org.springframework.data.release.model.Phase;
|
||||
import org.springframework.data.release.model.Project;
|
||||
import org.springframework.data.release.model.Train;
|
||||
import org.springframework.data.release.model.TrainIteration;
|
||||
import org.springframework.data.release.utils.ExecutionUtils;
|
||||
import org.springframework.data.release.utils.Logger;
|
||||
import org.springframework.plugin.core.PluginRegistry;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -47,7 +45,6 @@ public class BuildOperations {
|
||||
|
||||
private final @NonNull PluginRegistry<BuildSystem, Project> buildSystems;
|
||||
private final @NonNull MavenProperties properties;
|
||||
private final @NonNull Logger logger;
|
||||
|
||||
/**
|
||||
* Updates all inter-project dependencies based on the given {@link TrainIteration} and release {@link Phase}.
|
||||
@@ -81,18 +78,12 @@ public class BuildOperations {
|
||||
/**
|
||||
* Triggers the distribution builds for all modules participating in the given {@link Train}.
|
||||
*
|
||||
* @param train must not be {@literal null}.
|
||||
* @param iteration must not be {@literal null}.
|
||||
*/
|
||||
public void distributeResources(Train train) {
|
||||
|
||||
Assert.notNull(train, "Train must not be null!");
|
||||
|
||||
logger.log(train, "Preparing distribution build…");
|
||||
ExecutionUtils.run(train, module -> {
|
||||
doWithBuildSystem(module, BuildSystem::prepareDistributionBuild);
|
||||
});
|
||||
|
||||
logger.log(train, "Running distribution build…");
|
||||
doWithBuildSystem(train, BuildSystem::triggerDistributionBuild);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,15 +56,7 @@ interface BuildSystem extends Plugin<Project> {
|
||||
DeploymentInformation deploy(ModuleIteration module);
|
||||
|
||||
/**
|
||||
* Runs the distribution build preparation.
|
||||
*
|
||||
* @param module must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
Module prepareDistributionBuild(Module module);
|
||||
|
||||
/**
|
||||
* Runs the distribution build. Requires {@link #prepareDistributionBuild(Module) a preparation run}.
|
||||
* Runs the distribution build.
|
||||
*
|
||||
* @param module must not be {@literal null}.
|
||||
* @return
|
||||
|
||||
@@ -95,24 +95,6 @@ class MavenBuildSystem implements BuildSystem {
|
||||
return module;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.release.build.BuildSystem#prepareDistributionBuild(org.springframework.data.release.model.Module)
|
||||
*/
|
||||
@Override
|
||||
public Module prepareDistributionBuild(Module module) {
|
||||
|
||||
return doWithDistributionBuild(module, project -> {
|
||||
|
||||
logger.log(project, "Preparing distribution build…");
|
||||
|
||||
mvn.execute(project, CommandLine.of(Goal.CLEAN, goal("generate-sources"), //
|
||||
profile("distribute"), Argument.of("-B")));
|
||||
|
||||
logger.log(project, "Successfully prepared distribution build!");
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.release.build.BuildSystem#triggerDistributionBuild(org.springframework.data.release.model.Module)
|
||||
@@ -120,19 +102,6 @@ class MavenBuildSystem implements BuildSystem {
|
||||
@Override
|
||||
public Module triggerDistributionBuild(Module module) {
|
||||
|
||||
return doWithDistributionBuild(module, project -> {
|
||||
|
||||
logger.log(project, "Triggering distribution build…");
|
||||
|
||||
mvn.execute(project, CommandLine.of(Goal.DEPLOY, //
|
||||
SKIP_TESTS, profile("distribute"), Argument.of("-B")));
|
||||
|
||||
logger.log(project, "Successfully finished distribution build!");
|
||||
});
|
||||
}
|
||||
|
||||
private Module doWithDistributionBuild(Module module, Consumer<Project> consumer) {
|
||||
|
||||
Project project = module.getProject();
|
||||
|
||||
if (BUILD.equals(project)) {
|
||||
@@ -144,7 +113,12 @@ class MavenBuildSystem implements BuildSystem {
|
||||
return module;
|
||||
}
|
||||
|
||||
consumer.accept(project);
|
||||
logger.log(project, "Triggering distribution build…");
|
||||
|
||||
mvn.execute(project, CommandLine.of(Goal.CLEAN, Goal.DEPLOY, //
|
||||
SKIP_TESTS, profile("distribute"), Argument.of("-B")));
|
||||
|
||||
logger.log(project, "Successfully finished distribution build!");
|
||||
|
||||
return module;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user