@@ -545,6 +545,15 @@ public class BuildArgParser extends Main { | |||
} else if (arg.equals("-crossrefs")) { | |||
buildConfig.setGenerateCrossRefsMode(true); | |||
buildConfig.setGenerateModelMode(true); | |||
} else if (arg.startsWith("-checkRuntimeVersion:")) { | |||
String lcArg = arg.toLowerCase(); | |||
if (lcArg.endsWith(":false")) { | |||
buildConfig.setCheckRuntimeVersion(false); | |||
} else if (lcArg.endsWith(":true")) { | |||
buildConfig.setCheckRuntimeVersion(true); | |||
} else { | |||
showError("bad value for -checkRuntimeVersion option, must be true or false"); | |||
} | |||
} else if (arg.equals("-emacssym")) { | |||
buildConfig.setEmacsSymMode(true); | |||
buildConfig.setGenerateModelMode(true); |
@@ -355,6 +355,11 @@ public class AjBuildConfig { | |||
if (!incrementalMode && global.incrementalMode) { | |||
incrementalMode = true; | |||
} | |||
if (isCheckRuntimeVersion() && !global.isCheckRuntimeVersion()) { | |||
setCheckRuntimeVersion(false); | |||
} | |||
join(inJars, global.inJars); | |||
join(inPath, global.inPath); | |||
if ((null == lintMode) | |||
@@ -563,6 +568,14 @@ public class AjBuildConfig { | |||
public void setGenerateCrossRefsMode(boolean on) { | |||
options.generateCrossRefs = on; | |||
} | |||
public boolean isCheckRuntimeVersion() { | |||
return options.checkRuntimeVersion; | |||
} | |||
public void setCheckRuntimeVersion(boolean on) { | |||
options.checkRuntimeVersion = on; | |||
} | |||
public boolean isEmacsSymMode() { | |||
return options.generateEmacsSymFiles; |
@@ -218,18 +218,20 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc | |||
this.handler = | |||
CountingMessageHandler.makeCountingMessageHandler(baseHandler); | |||
if (DO_RUNTIME_VERSION_CHECK) { | |||
String check = checkRtJar(buildConfig); | |||
if (check != null) { | |||
if (FAIL_IF_RUNTIME_NOT_FOUND) { | |||
MessageUtil.error(handler, check); | |||
CompilationAndWeavingContext.leavingPhase(ct); | |||
return false; | |||
} else { | |||
MessageUtil.warn(handler, check); | |||
} | |||
} | |||
} | |||
if (buildConfig==null || buildConfig.isCheckRuntimeVersion()) { | |||
if (DO_RUNTIME_VERSION_CHECK) { | |||
String check = checkRtJar(buildConfig); | |||
if (check != null) { | |||
if (FAIL_IF_RUNTIME_NOT_FOUND) { | |||
MessageUtil.error(handler, check); | |||
CompilationAndWeavingContext.leavingPhase(ct); | |||
return false; | |||
} else { | |||
MessageUtil.warn(handler, check); | |||
} | |||
} | |||
} | |||
} | |||
// if (batch) { | |||
setBuildConfig(buildConfig); | |||
@@ -1189,8 +1191,10 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc | |||
return null; | |||
} | |||
if (buildConfig == null || buildConfig.getFullClasspath() == null) return "no classpath specified"; | |||
String ret = null; | |||
for (Iterator it = buildConfig.getFullClasspath().iterator(); it.hasNext(); ) { | |||
File p = new File( (String)it.next() ); |
@@ -94,6 +94,9 @@ public class AjCompilerOptions extends CompilerOptions { | |||
*/ | |||
public boolean generateCrossRefs = false; | |||
// Check aspectjrt*.jar exists and within it the version number is right (see AjBuildManager.checkRtJar()) | |||
public boolean checkRuntimeVersion = true; | |||
public boolean proceedOnError = false; | |||