--- /dev/null
+<aspectj>
+</aspectj>
\ No newline at end of file
+++ /dev/null
-<aspectj>
-</aspectj>
\ No newline at end of file
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
+import org.aspectj.bridge.Constants;
import org.aspectj.util.FileUtil;
public class OutxmlTest extends AjdeTestCase {
public static final String PROJECT_DIR = "OutxmlTest";
public static final String BIN_DIR = "bin";
public static final String OUTJAR_NAME = "/bin/test.jar";
- public static final String DEFAULT_AOPXML_NAME = "META-INF/aop.xml";
+ public static final String DEFAULT_AOPXML_NAME = Constants.AOP_AJC_XML;
public static final String CUSTOM_AOPXML_NAME = "custom/aop.xml";
/*
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Matthew Webster - initial implementation
+ *******************************************************************************/
+package org.aspectj.bridge;
+
+public class Constants {
+
+ /* Default resource names for user and generate aop.xml file */
+ public final static String AOP_USER_XML = "META-INF/aop.xml";
+ public final static String AOP_AJC_XML = "META-INF/aop-ajc.xml";
+
+}
import org.aspectj.asm.IRelationship;
import org.aspectj.bridge.AbortException;
+import org.aspectj.bridge.Constants;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.util.LangUtil;
import org.aspectj.weaver.ICrossReferenceHandler;
*/
public class ClassLoaderWeavingAdaptor extends WeavingAdaptor {
- private final static String AOP_XML = "META-INF/aop.xml";
+ private final static String AOP_XML = Constants.AOP_USER_XML + ";" + Constants.AOP_AJC_XML;
private boolean initialized;
showError("-outjar requires jar path argument");
}
} else if (arg.equals("-outxml")) {
- buildConfig.setOutxmlName("META-INF/aop.xml");
+ buildConfig.setOutxmlName(org.aspectj.bridge.Constants.AOP_AJC_XML);
} else if (arg.equals("-outxmlfile")) {
if (args.size() > nextArgIndex) {
String name = ((ConfigParser.Arg)args.get(nextArgIndex)).getValue();
IMessageHolder messageHolder = new MessageHandler();
AjBuildConfig config = genBuildConfig(new String[] { "-outxml", "-showWeaveInfo" }, messageHolder);
assertTrue("Warnings: " + messageHolder,!messageHolder.hasAnyMessage(IMessage.WARNING, true));
- assertEquals("Wrong outxml","META-INF/aop.xml",config.getOutxmlName());
+ assertEquals("Wrong outxml","META-INF/aop-ajc.xml",config.getOutxmlName());
assertTrue("Following option currupted",config.getShowWeavingInformation());
}
AjcTask task = getTask("showweaveinfo.lst",destDir);
task.setOutxml(true);
checkRun(task,null);
- File outxmlFile = new File(destDir,"META-INF/aop.xml");
- assertTrue("META-INF/aop.xml missing",outxmlFile.exists());
+ File outxmlFile = new File(destDir,"META-INF/aop-ajc.xml");
+ assertTrue("META-INF/aop-ajc.xml missing",outxmlFile.exists());
}
public void testOutxmlFile () {
int aspectCount = 0;
File aopXML = new File(getWorkingDir().getAbsolutePath()
+ File.separatorChar + projectName + File.separatorChar
- + "bin" + File.separatorChar + "META-INF" + File.separatorChar + "aop.xml");
+ + "bin" + File.separatorChar + "META-INF" + File.separatorChar + "aop-ajc.xml");
if (!aopXML.exists()) {
fail("Expected file " + aopXML.getAbsolutePath() + " to exist but it doesn't");