Browse Source

fix for Bugzilla Bug 43714

 	weaving from an input jar into that same jar.
(adds outjar attribute to 'compile')
tags/Root_ajdt_support
acolyer 20 years ago
parent
commit
45b84e93b8

+ 10
- 0
testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java View File

@@ -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

+ 2
- 1
testing/src/org/aspectj/testing/xml/AjcSpecXmlReader.java View File

@@ -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);

+ 1
- 0
tests/ajcTestSuite.dtd View File

@@ -25,6 +25,7 @@
<!ATTLIST compile options CDATA #IMPLIED >
<!ATTLIST compile sourceroots CDATA #IMPLIED >
<!ATTLIST compile xlintfile CDATA #IMPLIED >
<!ATTLIST compile outjar CDATA #IMPLIED >
<!ELEMENT inc-compile (dir-changes*,message*)>
<!ATTLIST inc-compile tag CDATA #REQUIRED >

Loading…
Cancel
Save