mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
separate target for building all except artifacts added to generated Ant xml
This commit is contained in:
@@ -42,10 +42,10 @@ public abstract class ProjectBuild extends Generator {
|
||||
|
||||
// the sequence in which modules are imported is important cause output path properties for dependent modules should be defined first
|
||||
|
||||
final StringBuilder alltargetNames = new StringBuilder();
|
||||
alltargetNames.append(BuildProperties.TARGET_INIT);
|
||||
alltargetNames.append(", ");
|
||||
alltargetNames.append(BuildProperties.TARGET_CLEAN);
|
||||
final StringBuilder buildModulesTargetNames = new StringBuilder();
|
||||
buildModulesTargetNames.append(BuildProperties.TARGET_INIT);
|
||||
buildModulesTargetNames.append(", ");
|
||||
buildModulesTargetNames.append(BuildProperties.TARGET_CLEAN);
|
||||
final ModuleChunk[] chunks = genOptions.getModuleChunks();
|
||||
|
||||
if (chunks.length > 0) {
|
||||
@@ -55,10 +55,10 @@ public abstract class ProjectBuild extends Generator {
|
||||
myAntProject.add(createModuleBuildGenerator(chunk, genOptions), 1);
|
||||
final String[] targets = ChunkBuildExtension.getAllTargets(chunk);
|
||||
for (String target : targets) {
|
||||
if (alltargetNames.length() > 0) {
|
||||
alltargetNames.append(", ");
|
||||
if (buildModulesTargetNames.length() > 0) {
|
||||
buildModulesTargetNames.append(", ");
|
||||
}
|
||||
alltargetNames.append(target);
|
||||
buildModulesTargetNames.append(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,19 +78,21 @@ public abstract class ProjectBuild extends Generator {
|
||||
|
||||
myAntProject.add(new CleanProject(genOptions, artifactsGenerator), 1);
|
||||
|
||||
myAntProject.add(new Target(BuildProperties.TARGET_BUILD_MODULES, buildModulesTargetNames.toString(),
|
||||
CompilerBundle.message("generated.ant.build.build.all.modules.target.name"), null), 1);
|
||||
|
||||
StringBuilder buildAllTargetNames = new StringBuilder();
|
||||
buildAllTargetNames.append(BuildProperties.TARGET_BUILD_MODULES);
|
||||
if (artifactsGenerator != null) {
|
||||
List<Generator> generators = artifactsGenerator.generate();
|
||||
for (Generator generator : generators) {
|
||||
myAntProject.add(generator, 1);
|
||||
}
|
||||
|
||||
if (alltargetNames.length() > 0) {
|
||||
alltargetNames.append(", ");
|
||||
}
|
||||
alltargetNames.append(ArtifactsGenerator.BUILD_ALL_ARTIFACTS_TARGET);
|
||||
buildAllTargetNames.append(", ").append(ArtifactsGenerator.BUILD_ALL_ARTIFACTS_TARGET);
|
||||
}
|
||||
|
||||
myAntProject.add(new Target(BuildProperties.TARGET_ALL, alltargetNames.toString(),
|
||||
myAntProject.add(new Target(BuildProperties.TARGET_ALL, buildAllTargetNames.toString(),
|
||||
CompilerBundle.message("generated.ant.build.build.all.target.name"), null), 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import java.util.Set;
|
||||
|
||||
public abstract class BuildProperties extends CompositeGenerator {
|
||||
public static final @NonNls String TARGET_ALL = "all";
|
||||
public static final @NonNls String TARGET_BUILD_MODULES = "build.modules";
|
||||
public static final @NonNls String TARGET_CLEAN = "clean";
|
||||
public static final @NonNls String TARGET_INIT = "init";
|
||||
public static final @NonNls String DEFAULT_TARGET = TARGET_ALL;
|
||||
|
||||
@@ -46,6 +46,7 @@ generated.ant.build.compile.modules.tests.target.comment=compile {0,choice, 1#mo
|
||||
generated.ant.build.modules.section.title=Modules
|
||||
generated.ant.build.initialization.section.title=Build initialization
|
||||
generated.ant.build.initialization.section.comment=Perform any build initialization in this target
|
||||
generated.ant.build.build.all.modules.target.name=build all modules
|
||||
generated.ant.build.build.all.target.name=build all
|
||||
generated.ant.build.building.concrete.module.section.title=Module {0}
|
||||
compiler.error.exception=Error: {0}
|
||||
|
||||
Reference in New Issue
Block a user