build scripts: remove obsolete 'modules.output' property

Also error message about missing module output directory is improved.
This commit is contained in:
nik
2017-08-16 11:56:57 +03:00
parent a5aea3807d
commit 6fb6dc5ff2
2 changed files with 5 additions and 12 deletions
-2
View File
@@ -17,7 +17,6 @@
<dirname property="build" file="${ant.file}"/>
<property name="project.home" value="${build}/../"/>
<property name="gant.home" value="${project.home}/build/lib/gant"/>
<property name="modules.output" value="${project.home}/out"/>
<macrodef name="run">
<attribute name="script"/>
@@ -36,7 +35,6 @@
<java failonerror="true" classname="org.apache.tools.ant.Main" fork="true">
<jvmarg line="-Xms64m -Xmx512m"/>
<jvmarg line="&quot;-Ddeploy=@{deploy}&quot;"/>
<jvmarg line="&quot;-Dmodules.output=${modules.output}&quot;"/>
<jvmarg line="&quot;-Dgant.script=@{script}&quot;"/>
<jvmarg line="&quot;-Dgant.target=@{target}&quot;"/>
@@ -45,11 +45,6 @@ public abstract class IdeaModuleBase extends LayoutFileSet {
}
protected File getOutputDir() {
String common = getProject().getProperty("modules.output");
if (common != null) {
return new File(new File(common), getKind() + "/" + getName());
}
String adhoc = getProject().getProperty(getOutputDirProperty());
return adhoc != null ? new File(adhoc) : null;
}
@@ -60,11 +55,11 @@ public abstract class IdeaModuleBase extends LayoutFileSet {
}
File outputDir = getOutputDir();
if (outputDir == null || !outputDir.exists()) {
throw new BuildException("No " + getKind() + " output found for module " + name +
". Either modules.output property references project output that doesn't contain this module or " +
getOutputDirProperty() + " is not defined or references non-existing directory.");
if (outputDir == null) {
throw new BuildException("Cannot find " + getKind() + " output for module " + name + ": '" + getOutputDirProperty() + "' property isn't defined");
}
if (!outputDir.exists()) {
throw new BuildException("No " + getKind() + " output found for module " + name + ": " + outputDir + " doesn't exist");
}
}