if(mojo.is("org.apache.maven.plugins","maven-assembly-plugin","assembly")) {
if (assemblies==null) assemblies = new ArrayList<File>();
try {
// watch out for AssemblyArchiver.createArchive that returns a File object, pointing to the archives created by the assembly plugin.
mojo.intercept("assemblyArchiver",new InvocationInterceptor() {
public Object invoke(Object proxy, Method method, Object[] args, InvocationHandler delegate) throws Throwable {
Object ret = delegate.invoke(proxy, method, args);
if(method.getName().equals("createArchive") && method.getReturnType()==File.class) {
// System.out.println("Discovered "+ret+" at "+MavenArtifactArchiver.this);
File f = (File) ret;