From 45b84e93b81522852b6034a2e922b9f3990ff48d Mon Sep 17 00:00:00 2001 From: acolyer Date: Tue, 16 Mar 2004 11:37:33 +0000 Subject: [PATCH] fix for Bugzilla Bug 43714 weaving from an input jar into that same jar. (adds outjar attribute to 'compile') --- .../aspectj/testing/harness/bridge/CompilerRun.java | 10 ++++++++++ .../src/org/aspectj/testing/xml/AjcSpecXmlReader.java | 3 ++- tests/ajcTestSuite.dtd | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java b/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java index 9241d103e..76d340126 100644 --- a/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java +++ b/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java @@ -336,6 +336,10 @@ public class CompilerRun implements IAjcRun { String sr = FileUtil.flatten(xlintFiles, null); arguments.add(sr); } + if (spec.outjar != null) { + arguments.add("-outjar"); + arguments.add(spec.outjar); + } if (!LangUtil.isEmpty(extdirFiles)) { arguments.add("-extdirs"); String sr = FileUtil.flatten(extdirFiles, null); @@ -728,6 +732,7 @@ public class CompilerRun implements IAjcRun { /** src path = {suiteParentDir}/{testBaseDirOffset}/{testSrcDirOffset}/{path} */ protected String testSrcDirOffset; protected String xlintfile; + protected String outjar; public Spec() { super(XMLNAME); @@ -747,6 +752,7 @@ public class CompilerRun implements IAjcRun { spec.permitAnyCompiler = permitAnyCompiler; spec.sourceroots = copy(sourceroots); spec.extdirs = copy(extdirs); + spec.outjar = outjar; spec.testSetup = null; if (null != testSetup) { spec.testSetup = (TestSetup) testSetup.clone(); @@ -829,6 +835,10 @@ public class CompilerRun implements IAjcRun { public void setXlintfile(String path) { xlintfile = path; } + + public void setOutjar(String path) { + outjar = path; + } /** * Set extension dirs, deleting any old ones diff --git a/testing/src/org/aspectj/testing/xml/AjcSpecXmlReader.java b/testing/src/org/aspectj/testing/xml/AjcSpecXmlReader.java index 2bd5f0d34..8ea6ec86b 100644 --- a/testing/src/org/aspectj/testing/xml/AjcSpecXmlReader.java +++ b/testing/src/org/aspectj/testing/xml/AjcSpecXmlReader.java @@ -299,7 +299,7 @@ public class AjcSpecXmlReader { new String[] { "files", "options", "staging", "badInput", "reuseCompiler", "includeClassesDir", "argfiles", "aspectpath", "classpath", "extdirs", - "sourceroots", "xlintfile"}), + "sourceroots", "xlintfile", "outjar"}), new BProps(IncCompilerRun.Spec.class, new String[] { "tag" }), new BProps(JavaRun.Spec.class, @@ -346,6 +346,7 @@ public class AjcSpecXmlReader { crunSpec.setIncludeClassesDir(false); crunSpec.setReuseCompiler(false); crunSpec.setXlintfile((String) null); + crunSpec.setOutjar((String)null); IncCompilerRun.Spec icrunSpec = new IncCompilerRun.Spec(); icrunSpec.addMessage((IMessage) null); diff --git a/tests/ajcTestSuite.dtd b/tests/ajcTestSuite.dtd index 19d172bc2..f6626208f 100644 --- a/tests/ajcTestSuite.dtd +++ b/tests/ajcTestSuite.dtd @@ -25,6 +25,7 @@ + -- 2.39.5