[jboss-cvs] JBossAS SVN: r103305 - in projects/aop/branches/Branch_2_2: aop/docs/reference/reference/en/modules and 12 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 31 05:27:37 EDT 2010


Author: flavia.rainone at jboss.com
Date: 2010-03-31 05:27:36 -0400 (Wed, 31 Mar 2010)
New Revision: 103305

Added:
   projects/aop/branches/Branch_2_2/as5integration/
   projects/aop/branches/Branch_2_2/as5integration/pom.xml
   projects/aop/branches/Branch_2_2/as5integration/src/
   projects/aop/branches/Branch_2_2/as5integration/src/assembly/
   projects/aop/branches/Branch_2_2/as5integration/src/assembly/deployers.xml
   projects/aop/branches/Branch_2_2/as5integration/src/assembly/mc.xml
   projects/aop/branches/Branch_2_2/as5integration/src/main/
   projects/aop/branches/Branch_2_2/as5integration/src/main/java/
   projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/
   projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/
   projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/
   projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/
   projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/
   projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/AOPAnnotationMetaDataParserDeployer.java
   projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/AspectDeployer.java
   projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-50-run.conf
   projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-50-run.conf.bat
   projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop.xml
Removed:
   projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-60-install-aop.xml
Modified:
   projects/aop/branches/Branch_2_2/aop/docs/reference/reference/en/modules/installing.xml
   projects/aop/branches/Branch_2_2/asintegration-core/src/etc/ReadMe-AS4.txt
   projects/aop/branches/Branch_2_2/asintegration-core/src/etc/ReadMe-AS5.txt
   projects/aop/branches/Branch_2_2/asintegration-core/src/etc/ReadMe-AS6.txt
   projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-40-install-jboss-aop-jdk50-build.xml
   projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-50-install-jboss-aop-jdk50-build.xml
   projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-60-install-jboss-aop-build.xml
   projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss.properties
   projects/aop/branches/Branch_2_2/build/build.xml
   projects/aop/branches/Branch_2_2/pom.xml
Log:
[JBAOP-777] Port to Branch2_2

Modified: projects/aop/branches/Branch_2_2/aop/docs/reference/reference/en/modules/installing.xml
===================================================================
--- projects/aop/branches/Branch_2_2/aop/docs/reference/reference/en/modules/installing.xml	2010-03-31 09:09:47 UTC (rev 103304)
+++ projects/aop/branches/Branch_2_2/aop/docs/reference/reference/en/modules/installing.xml	2010-03-31 09:27:36 UTC (rev 103305)
@@ -3,7 +3,7 @@
    <title>Installing</title>
 
    <para>
-         This section defines how to install JBoss AOP standalone, within JBoss 4.0.x, JBoss 4.2.x and within JBoss 5.x
+         This section defines how to install JBoss AOP standalone, within JBoss 4.0.x, JBoss 4.2.x, JBoss 5.x, and JBoss 6.x
    </para>
 
    <mediaobject>
@@ -31,12 +31,13 @@
          DISCLAIMER: We no longer actively test against JBoss Application Server 4.0.x or 4.2.x. If there are any
          problems with the issues outlined below, please contact us on the JBoss AOP user forum at http://www.jboss.org.
       </para>
+
       <para>
          To install JBoss AOP in JBoss 4.0.x or JBoss 4.2.x Application Server: with JDK 5, there is an ant build script to
-         install into the application server. It lives in <literal>jboss-40-install/jboss-aop-jdk50.deployer/build.xml</literal>.
-         Modify <literal>jboss-40-install/jboss-aop-jdk50.deployer/jboss.properties</literal>  to point to the the root of your
-         JBoss installation and specify the application server configuration you want to upgrade. These are the steps taken by
-         the ant script:
+         install into the application server. It lives in <literal>jboss-40-install/build.xml</literal>.
+         Modify <literal>jboss-40-install/jboss.properties</literal> so that <literal>jboss.home</literal> property points
+         to the the root of your JBoss installation and specify the application server configuration you want to upgrade.
+         These are the steps taken by the ant script:
       </para>
       <orderedlist spacing="compact">
          <listitem>
@@ -50,11 +51,22 @@
             <literal><![CDATA[${jboss.home}/server/<config-name>/deploy/jboss-aop-jdk50.deployer]]></literal>
          </listitem>
          <listitem>
+             Copy the files <literal>javassist.jar</literal>, <literal>jboss-common-core.jar</literal>,
+             <literal>trove.jar</literal>, <literal>jboss-classpool.jar</literal>, and <literal>jboss-classpool-scoped.jar</literal>
+             from <literal>lib</literal> folder over the files that already exist in your existing JBoss Application Server
+             distribution under <literal><![CDATA[${jboss.home}/server/<config-name>/deploy/jboss-aop-jdk50.deployer]]></literal>
+         </listitem>
+         <listitem>
             In JBoss 4.0.4.GA and later, move <literal><![CDATA[${jboss.home}/server/<config-name>/deploy/jboss-aop-jdk50.deployer/javassist.jar]]></literal>
             to <literal><![CDATA[${jboss.home}/server/<config-name>/lib/javassist.jar]]></literal>. Any existing javassist.jar in that location is copied to
             <literal><![CDATA[${jboss.home}/server/<config-name>/deploy/jboss-aop-jdk50.deployer.bak/lib/javassist.bak]]></literal>
          </listitem>
          <listitem>
+            In JBoss 4.0.5.GA and later, we are using jarjar to rename the packages of the files in <literal>jboss-40-install/jboss-aop-jdk50.deployer</literal>.
+            This is done to avoid crashing with older versions of the same packages in the server. If your server version is 4.0.5.GA or later, we
+            advise you to use the ant script for installation.
+         </listitem>
+         <listitem>
             If you NOT upgrading from a previous AOP 2 distribution, open up
             <literal><![CDATA[${jboss.home}/server/<config-name>/deploy/jboss-aop-jdk50.deployer/jboss-aspect-library-jdk50.jar]]></literal> and
             delete all classes and subpackages under <literal>org.jboss.aop</literal>. In AOP 2.0 we changed the packaging, these
@@ -68,27 +80,77 @@
    <sect1 id="installing-jboss5-jdk5" revision="1">
       <title>Installing with JBoss Application Server 5</title>
       <para>
-         JBoss AS 5 ships with AOP 2.0.0.GA. To upgrade to a newer AOP version, we have provided am an script to 
-         upgrade the server. It can be found at <literal>jboss-50-install/build.xml</literal>. Modifly 
-         <literal>jboss-50-install</literal> to point to the root of your JBoss installation, and specify the
-         application server configuration you want to upgrade. These are the steps taken by the
-         ant script:
+         JBoss AS 5 ships with AOP 2.0.0.GA. To upgrade to a newer AOP version, we have provided an script to 
+         upgrade the server. It can be found at <literal>jboss-50-install/build.xml</literal>. Modify 
+         <literal>jboss-50-install/jboss.properties</literal> so that <literal>jboss.home</literal> points to the
+          root of your JBoss installation, and specify the application server configuration you want to upgrade.
+          These are the steps taken by the ant script:
       </para>
       <orderedlist spacing="compact">
          <listitem>
              Back up the existing <literal>${jboss.home}/lib</literal> and 
-             <literal><![CDATA[${jboss.home}/server/<config-name>/deployers/jboss-aop-jboss5.deployer]]></literal> folders.
+             <literal><![CDATA[${jboss.home}/server/<config-name>/deployers/jboss-aop-jboss5.deployer]]></literal> folders,
+             besides <literal><![CDATA[${jboss.home}/server/<config-name>/conf/bootstrap/aop.xml]]></literal> file
          </listitem>
          <listitem>
-             Overwrite the <literal><![CDATA[${jboss.home}/server/<config-name>/deployers/jboss-aop-jboss5.deployer]]></literal> 
-             folder with the files from <literal>jboss-50-install/jboss-aop-jboss5.deployer</literal>.
+             Overwrite the <literal>${jboss.home}/lib</literal> folder with the files from <literal>jboss-50-install/lib</literal>.
          </listitem>
          <listitem>
-             Overwrite the <literal>${jboss.home}/lib</literal> folder with the files from 
-             <literal>jboss-50-install/lib</literal>.
+             Overwrite the <literal>jboss-aop.jar</literal>, <literal>javassist.jar</literal>,
+             <literal>pluggable-instrumentor.jar</literal>, and <literal>trove.jar</literal> files in
+             <literal>${jboss.home}/lib</literal> with the corresponding files from <literal>lib</literal>
          </listitem>
+         <listitem>
+              Overwrite the <literal>pluggable-instrumentor.jar</literal> and <literal>jboss-aop-aspects.jar</literal> files in the
+              <literal><![CDATA[${jboss.home}/server/<config-name>/deployers/jboss-aop-jboss5.deployer]]></literal> folder with
+              the corresponding files from <literal>lib</literal>
+         </listitem>
+         <listitem>
+              Overwrite the <literal><![CDATA[${jboss.home}/server/client/jboss-aop-client.jar]]></literal> file with the
+              <literal>lib/jboss-aop-client.jar</literal> file
+         </listitem>
+         <listitem>
+              Overwrite the <literal><![CDATA[${jboss.home}/server/<config-name>/conf/bootstrap/aop.xml]]></literal> file with
+              the corresponding file from <listeral>jboss-50-install</literal> directory
+         </listitem>
+
       </orderedlist>
       
    </sect1>
+   <sect1 id="installing-jboss6" revision="1">
+      <title>Installing with JBoss Application Server 6</title>
+      <para>
+         To upgrade JBoss AS 6 to a newer AOP version, we have provided an script to 
+         upgrade the server. It can be found at <literal>jboss-60-install/build.xml</literal>. Modify 
+         <literal>jboss-60-install/jboss.properties</literal> so that <literal>jboss.home</literal> points to the
+         root of your JBoss installation, and specify the application server configuration you want to upgrade.
+         These are the steps taken by the ant script:
+      </para>
+      <orderedlist spacing="compact">
+         <listitem>
+             Back up the existing <literal>${jboss.home}/lib</literal> and 
+             <literal><![CDATA[${jboss.home}/server/<config-name>/deployers/jboss-aop-jboss5.deployer]]></literal> folders
+         </listitem>
+         <listitem>
+             Overwrite the <literal>${jboss.home}/lib</literal> folder with the files from <literal>jboss-60-install/lib</literal>.
+         </listitem>
+         <listitem>
+             Overwrite the <literal>jboss-aop.jar</literal>, <literal>javassist.jar</literal>, <literal>jboss-classpool.jar</literal>,
+             <literal>jboss-classpool-scoped.jar</literal>, and <literal>trove.jar</literal> files in
+             <literal>${jboss.home}/lib</literal> with the corresponding files from <literal>lib</literal>
+         </listitem>
+         <listitem>
+              Overwrite the <literal>pluggable-instrumentor.jar</literal> and <literal>jboss-aop-aspects.jar</literal> files in the
+              <literal><![CDATA[${jboss.home}/server/<config-name>/deployers/jboss-aop-jboss5.deployer]]></literal> folder with
+              the corresponding files from <literal>lib</literal>
+         </listitem>
+         <listitem>
+              Overwrite the <literal><![CDATA[${jboss.home}/server/client/jboss-aop-client.jar]]></literal> file with the
+              <literal>lib/jboss-aop-client.jar</literal> file
+         </listitem>
+
+      </orderedlist>
+      
+   </sect1>
 </chapter>
 

Added: projects/aop/branches/Branch_2_2/as5integration/pom.xml
===================================================================
--- projects/aop/branches/Branch_2_2/as5integration/pom.xml	                        (rev 0)
+++ projects/aop/branches/Branch_2_2/as5integration/pom.xml	2010-03-31 09:27:36 UTC (rev 103305)
@@ -0,0 +1,182 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.aop</groupId>
+    <artifactId>jboss-aop-parent</artifactId>
+    <version>2.1.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jboss-aop-as5integration</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss AOP AS 5 Integration</name>
+  <description>JBoss AOP AS 5 Integration</description>
+  
+  <build>
+    <finalName>${project.artifactId}</finalName>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.5</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.2-beta-2</version>
+        <executions>
+          <execution>
+            <id>mc</id>
+            <phase>package</phase>
+            <goals>
+              <goal>attached</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${project.build.directory}/as5-install</outputDirectory>
+              <descriptors>
+                <descriptor>src/assembly/mc.xml</descriptor>
+              </descriptors>
+              <finalName>jboss-aop-asintegration</finalName>
+              <archive>
+                <manifest>
+                  <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+                  <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                </manifest>
+                <manifestEntries>
+                  <Implementation-URL>${pom.url}</Implementation-URL>
+                </manifestEntries>
+              </archive>
+            </configuration>
+          </execution>
+          <execution>
+            <id>deployers</id>
+            <phase>package</phase>
+            <goals>
+              <goal>attached</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${project.build.directory}/as5-install</outputDirectory>
+              <descriptors>
+                <descriptor>src/assembly/deployers.xml</descriptor>
+              </descriptors>
+              <finalName>jboss-aop</finalName>
+              <archive>
+                <manifest>
+                  <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+                  <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                </manifest>
+                <manifestEntries>
+                  <Implementation-URL>${pom.url}</Implementation-URL>
+                </manifestEntries>
+              </archive>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy</id>
+            <phase>package</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.jboss.classpool</groupId>
+                  <artifactId>jboss-classpool-scoped</artifactId>
+                  <version>1.0.0.Alpha3</version>
+                  <type>jar</type>
+                  <outputDirectory>${project.build.directory}/as5-install</outputDirectory>
+                  <destFileName>jboss-classpool-scoped.jar</destFileName>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.jboss.classpool</groupId>
+                  <artifactId>jboss-classpool</artifactId>
+                  <version>1.0.0.Alpha3</version>
+                  <type>jar</type>
+                  <outputDirectory>${project.build.directory}/as5-install</outputDirectory>
+                  <destFileName>jboss-classpool.jar</destFileName>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>org.jboss.classpool</groupId>
+                  <artifactId>jboss-classpool-jbosscl</artifactId>
+                  <version>1.0.0.Alpha3</version>
+                  <type>jar</type>
+                 <outputDirectory>${project.build.directory}/as5-install</outputDirectory>
+                  <destFileName>jboss-classpool-jbosscl.jar</destFileName>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+    </plugins>
+    
+  </build>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss.aop</groupId>
+      <artifactId>jboss-aop-asintegration-mc</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss</groupId>
+          <artifactId>jboss-vfs</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.deployers</groupId>
+          <artifactId>jboss-deployers-vfs</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.aop</groupId>
+      <artifactId>jboss-aop-deployers</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss</groupId>
+          <artifactId>jboss-vfs</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.deployers</groupId>
+          <artifactId>jboss-deployers-vfs</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+      <version>2.1.3.SP1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-vfs</artifactId>
+      <version>2.0.8.GA</version>
+    </dependency>
+  </dependencies>
+  
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+      <version>2.1.3.SP1</version>
+    </dependency>
+    </dependencies>
+  </dependencyManagement>
+  
+</project>

Added: projects/aop/branches/Branch_2_2/as5integration/src/assembly/deployers.xml
===================================================================
--- projects/aop/branches/Branch_2_2/as5integration/src/assembly/deployers.xml	                        (rev 0)
+++ projects/aop/branches/Branch_2_2/as5integration/src/assembly/deployers.xml	2010-03-31 09:27:36 UTC (rev 103305)
@@ -0,0 +1,32 @@
+<assembly>
+  <id>deployers</id>
+  <formats>
+    <format>jar</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <dependencySets>
+    <dependencySet>
+      <includes>
+        <include>org.jboss.aop:jboss-aop-deployers</include>
+       </includes>
+       <unpack>true</unpack>
+       <unpackOptions>
+         <excludes>
+           <exclude>**/AOPAnnotationMetaDataParserDeployer*.class</exclude>
+         </excludes>
+       </unpackOptions>
+    </dependencySet>
+    <dependencySet>
+      <includes>
+        <include>org.jboss.aop:jboss-aop-as5integration</include>
+      </includes>
+      <unpack>true</unpack>
+       <unpackOptions>
+         <excludes>
+           <exclude>**/AspectDeployer*.class</exclude>
+         </excludes>
+       </unpackOptions>
+    </dependencySet>
+  </dependencySets>
+
+</assembly>
\ No newline at end of file


Property changes on: projects/aop/branches/Branch_2_2/as5integration/src/assembly/deployers.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: projects/aop/branches/Branch_2_2/as5integration/src/assembly/mc.xml
===================================================================
--- projects/aop/branches/Branch_2_2/as5integration/src/assembly/mc.xml	                        (rev 0)
+++ projects/aop/branches/Branch_2_2/as5integration/src/assembly/mc.xml	2010-03-31 09:27:36 UTC (rev 103305)
@@ -0,0 +1,32 @@
+<assembly>
+  <id>mc</id>
+  <formats>
+    <format>jar</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <dependencySets>
+    <dependencySet>
+      <includes>
+        <include>org.jboss.aop:jboss-aop-asintegration-mc</include>
+       </includes>
+       <unpack>true</unpack>
+       <unpackOptions>
+         <excludes>
+           <exclude>**/AspectDeployer*.class</exclude>
+         </excludes>
+       </unpackOptions>
+    </dependencySet>
+    <dependencySet>
+      <includes>
+        <include>org.jboss.aop:jboss-aop-as5integration</include>
+      </includes>
+      <unpack>true</unpack>
+      <unpackOptions>
+         <excludes>
+           <exclude>**/AOPAnnotationMetaDataParserDeployer*.class</exclude>
+         </excludes>
+       </unpackOptions>
+    </dependencySet>
+  </dependencySets>
+
+</assembly>
\ No newline at end of file


Property changes on: projects/aop/branches/Branch_2_2/as5integration/src/assembly/mc.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/AOPAnnotationMetaDataParserDeployer.java
===================================================================
--- projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/AOPAnnotationMetaDataParserDeployer.java	                        (rev 0)
+++ projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/AOPAnnotationMetaDataParserDeployer.java	2010-03-31 09:27:36 UTC (rev 103305)
@@ -0,0 +1,196 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.aop.asintegration.jboss5;
+
+import java.io.BufferedInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import javassist.bytecode.ClassFile;
+
+import org.jboss.aop.AspectAnnotationLoader;
+import org.jboss.aop.microcontainer.beans.metadata.AOPDeployment;
+import org.jboss.aop.microcontainer.beans.metadata.AspectManagerAwareBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.metadata.MicrocontainerAnnotationLoaderStrategy;
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.virtual.VisitorAttributes;
+import org.jboss.virtual.plugins.context.jar.JarUtils;
+import org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor;
+import org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter;
+
+/**
+ * Reads the annotations and converts them into AOP metadata to be deployed properly 
+ * by the AOPDeploymentAopMetaDataDeployer
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision$
+ */
+public class AOPAnnotationMetaDataParserDeployer extends AbstractDeployer
+{
+   public AOPAnnotationMetaDataParserDeployer(int xmlParserOrder)
+   {
+      super.setOutput(AOPDeployment.class);
+      super.setStage(DeploymentStages.POST_PARSE);
+      if (xmlParserOrder != 0)
+      {
+         //Make this come after the AOPXMLMetaDataParserDeployer if the relative order is set
+         super.setRelativeOrder(xmlParserOrder + 1);
+      }
+   }
+   
+   public AOPAnnotationMetaDataParserDeployer()
+   {
+      this(0);
+   }
+
+   public void deploy(DeploymentUnit unit) throws DeploymentException
+   {
+      // Ignore non-vfs deployments
+      if (unit instanceof VFSDeploymentUnit == false)
+      {
+         log.trace("Not a vfs deployment: " + unit.getName());
+         return;
+      }
+      // See if the suffix matches the .aop requirement
+      if (unit.getSimpleName().endsWith(".aop") == false)
+      {
+         log.trace("Unit name does not end in .aop: " + unit.getSimpleName());
+         return;
+      }
+      internalDeploy((VFSDeploymentUnit)unit);
+   }
+   
+   private void internalDeploy(VFSDeploymentUnit unit) throws DeploymentException
+   {
+      MicrocontainerAnnotationLoaderStrategy strategy = new MicrocontainerAnnotationLoaderStrategy(); 
+      AspectAnnotationLoader loader = new AspectAnnotationLoader(null, strategy);
+      
+      List<VirtualFile> files = getClasses(unit);
+      for(VirtualFile file : files)
+      {
+         try
+         {
+            ClassFile cf = loadClassFile(file);
+            log.debug("Deploying possibly annotated class " + cf.getName());
+            loader.deployClassFile(cf);
+         }
+         catch (Exception e)
+         {
+            throw new DeploymentException("Error reading annotations for " + file, e);
+         }
+      }
+      
+      List<AspectManagerAwareBeanMetaDataFactory> factories = strategy.getFactories();
+      
+      AOPDeployment deployment = unit.getAttachment(AOPDeployment.class);
+      if (factories != null && factories.size() > 0)
+      {
+         if (deployment == null)
+         {
+            deployment = new AOPDeployment();
+            unit.addAttachment(AOPDeployment.class.getName(), deployment, AOPDeployment.class);
+         }
+         if (deployment.getBeanFactories() == null)
+         {
+            deployment.setBeanFactories(new ArrayList<BeanMetaDataFactory>());
+         }
+         deployment.getBeanFactories().addAll(factories);
+      }  
+   }
+
+   private ClassFile loadClassFile(VirtualFile file)
+   {
+      DataInputStream din = null;
+      ClassFile cf = null;
+      try
+      {
+         InputStream in = file.openStream();
+         din = new DataInputStream(new BufferedInputStream(in));
+         cf = new ClassFile(din);
+      }
+      catch (IOException e)
+      {
+         throw new RuntimeException("Error reading " + file, e);
+      }
+      finally
+      {
+         try
+         {
+            din.close();
+         }
+         catch (IOException ignored)
+         {
+         }
+      }
+      
+      return cf;
+   }
+
+   private List<VirtualFile> getClasses(VFSDeploymentUnit unit)
+   {
+      VisitorAttributes va = new VisitorAttributes();
+      va.setLeavesOnly(true);
+      ClassFileFilter filter = new ClassFileFilter();
+      SuffixesExcludeFilter noJars = new SuffixesExcludeFilter(JarUtils.getSuffixes());
+      va.setRecurseFilter(noJars);
+      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
+
+      for (VirtualFile vf : unit.getClassPath())
+      {
+         try
+         {
+            vf.visit(visitor);
+         }
+         catch (IOException e)
+         {
+            throw new RuntimeException(e);
+         }
+      }
+      return visitor.getMatched();
+
+   }
+   
+   private static class ClassFileFilter implements VirtualFileFilter
+   {
+      public boolean accepts(VirtualFile file)
+      {
+         try
+         {
+            return file.isLeaf() && file.getName().endsWith(".class");
+         }
+         catch (IOException e)
+         {
+            throw new RuntimeException("Error visiting file: " + file.getName(), e);
+         }
+      }
+   }
+}


Property changes on: projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/AOPAnnotationMetaDataParserDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/AspectDeployer.java
===================================================================
--- projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/AspectDeployer.java	                        (rev 0)
+++ projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/AspectDeployer.java	2010-03-31 09:27:36 UTC (rev 103305)
@@ -0,0 +1,378 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, Red Hat Middleware LLC., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.asintegration.jboss5;
+
+import java.io.BufferedInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import javassist.bytecode.ClassFile;
+
+import org.jboss.aop.AspectAnnotationLoader;
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.AspectXmlLoader;
+import org.jboss.aop.Domain;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.virtual.VisitorAttributes;
+import org.jboss.virtual.plugins.context.jar.JarUtils;
+import org.jboss.virtual.plugins.vfs.helpers.FilterVirtualFileVisitor;
+import org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter;
+import org.w3c.dom.Document;
+
+/**
+ * Deployer for Aspects
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @author adrian at jboss.org
+ */
+public class AspectDeployer extends AbstractVFSRealDeployer
+{
+   private static final String AOP_JAR_SUFFIX = ".aop";
+   private static final String AOP_DD_SUFFIX = "-aop.xml";
+
+   /** The aspect manager */
+   private AspectManager aspectManager;
+   
+   /**
+    * Create a new AspectDeployer.
+    */
+   public AspectDeployer()
+   {
+      setStage(DeploymentStages.POST_CLASSLOADER);
+   }
+
+   /**
+    * Get the aspectManager.
+    * 
+    * @return the aspectManager.
+    */
+   public AspectManager getAspectManager()
+   {
+      return aspectManager;
+   }
+
+   /**
+    * Set the aspectManager.
+    * 
+    * @param aspectManager the aspectManager.
+    */
+   public void setAspectManager(AspectManager aspectManager)
+   {
+      this.aspectManager = aspectManager;
+   }
+
+   /**
+    * Validate the configuration
+    */
+   public void create()
+   {
+      if (aspectManager == null)
+         throw new IllegalStateException("No aspect manager configured");
+   }
+   
+   public void deploy(VFSDeploymentUnit unit) throws DeploymentException
+   {
+      AspectManager manager = getCorrectManager(unit);
+      unit.addAttachment(AspectManager.class, manager);
+      
+      List<VirtualFile> files = unit.getMetaDataFiles(null, AOP_DD_SUFFIX);
+
+      if (isAopArchiveOrFolder(unit))
+      {
+         deployAnnotations(manager, unit);
+      }
+      
+      if (files.size() > 0)
+      {
+         deployXml(manager, unit, files);
+      }
+   }
+   
+   public void undeploy(VFSDeploymentUnit unit)
+   {
+      try
+      {
+         AspectManager manager = unit.getAttachment(AspectManager.class);
+
+         List<VirtualFile> files = unit.getMetaDataFiles(null, AOP_DD_SUFFIX);
+   
+         if (isAopArchiveOrFolder(unit))
+         {
+            undeployAnnotations(manager, unit);
+         }
+         
+         if (files.size() > 0)
+         {
+            undeployXml(manager, unit, files);
+         }
+      }
+      finally
+      {
+         AOPClassLoaderInitializer.unregisterLoaders(aspectManager, unit);
+      }
+   }
+
+   private void deployXml(AspectManager manager, VFSDeploymentUnit unit, List<VirtualFile> files) throws DeploymentException
+   {
+      log.info("Deploying xml into " + manager + " for " + unit.getClassLoader());   
+      
+      ArrayList<VirtualFile> deployedFiles = new ArrayList<VirtualFile>(files.size());
+      for (VirtualFile vf : files)
+      {
+         deployedFiles.add(vf);
+         try
+         {
+            log.debug("deploying: " + vf.toURL() + " into " + manager);
+            InputStream is = vf.openStream();
+            try
+            {
+               Document doc = AspectXmlLoader.loadDocument(is);
+               AspectXmlLoader loader = new AspectXmlLoader();
+      
+               loader.setManager(manager);
+               loader.setClassLoader(unit.getClassLoader());
+               loader.deployXML(doc, vf.toURL(), unit.getClassLoader());
+            }
+            finally
+            {
+               is.close();
+            }
+         }
+         catch (Exception e)
+         {
+            //Unwind things already installed, in the reverse order
+            for (int i = deployedFiles.size() - 1 ; i >= 0 ; i--)
+            {
+               undeployXml(manager, deployedFiles.get(i));
+            }
+            
+            throw DeploymentException.rethrowAsDeploymentException("Error deploying xml " + vf.getName() + " into " + manager, e);
+         }
+      }
+   }
+
+   private void undeployXml(AspectManager manager, VFSDeploymentUnit unit, List<VirtualFile> files)
+   {
+      for (VirtualFile vf : files)
+      {
+         undeployXml(manager, vf);
+      }
+   }
+   
+   private void undeployXml(AspectManager manager, VirtualFile vf)
+   {
+      try
+      {
+         log.debug("undeploying: " + vf.toURL() + " from " + manager);
+         InputStream is = vf.openStream();
+         try
+         {
+            Document doc = AspectXmlLoader.loadDocument(is);
+            AspectXmlLoader loader = new AspectXmlLoader();
+            
+            loader.setManager(manager);
+            loader.undeployXML(doc, vf.toURL());
+         }
+         finally
+         {
+            try
+            {
+               is.close();
+            }
+            catch(IOException ignore)
+            {
+            }
+         }
+      }
+      catch (Exception e)
+      {
+         log.warn("Error undeploying xml " + vf.getName() + " from " + manager, e);
+      }
+   }
+
+   private void deployAnnotations(AspectManager manager, VFSDeploymentUnit unit) throws DeploymentException
+   {
+      log.info("Deploying AOP annotations into " + manager + " for " + unit.getClassLoader());   
+
+      AspectAnnotationLoader loader = getAnnotationLoader(manager, unit); 
+      List<VirtualFile> files = getClasses(unit);
+      ArrayList<VirtualFile> deployedFiles = new ArrayList<VirtualFile>(files.size());
+      for(VirtualFile file : files)
+      {
+         try
+         {
+            ClassFile cf = loadClassFile(file);
+            log.debug("Deploying possibly annotated class " + cf.getName() + " into " + manager);
+            loader.deployClassFile(cf);
+         }
+         catch (Exception e)
+         {
+            //Unwind things already installed, in the reverse order
+            for (int i = deployedFiles.size() ; i >= 0 ; i-- )
+            {
+               undeployAnnotation(loader, deployedFiles.get(i));
+            }
+            throw new DeploymentException("Error reading annotations for " + file + " during deployment into " + manager, e);
+         }
+      }
+   }
+   
+   private void undeployAnnotations(AspectManager manager, VFSDeploymentUnit unit)
+   {
+      AspectAnnotationLoader loader = getAnnotationLoader(manager, unit); 
+      List<VirtualFile> files = getClasses(unit);
+      for(VirtualFile file : files)
+      {
+         undeployAnnotation(loader, file);
+      }
+   }
+
+   private void undeployAnnotation(AspectAnnotationLoader loader, VirtualFile file)
+   {
+      try
+      {
+         ClassFile cf = loadClassFile(file);
+         log.debug("Undeploying possibly annotated class " + cf.getName());
+         loader.undeployClassFile(cf);
+      }
+      catch (Exception e)
+      {
+         log.warn("Error reading annotations for " + file, e);
+      }
+   }
+   
+   private AspectAnnotationLoader getAnnotationLoader(AspectManager manager, VFSDeploymentUnit unit)
+   {
+      AspectAnnotationLoader loader = new AspectAnnotationLoader(manager);
+      loader.setClassLoader(unit.getClassLoader());
+      return loader;
+   }
+   
+   private ClassFile loadClassFile(VirtualFile file)
+   {
+      DataInputStream din = null;
+      ClassFile cf = null;
+      try
+      {
+         InputStream in = file.openStream();
+         din = new DataInputStream(new BufferedInputStream(in));
+         cf = new ClassFile(din);
+      }
+      catch (IOException e)
+      {
+         throw new RuntimeException("Error reading " + file, e);
+      }
+      finally
+      {
+         try
+         {
+            din.close();
+         }
+         catch (IOException ignored)
+         {
+         }
+      }
+      
+      return cf;
+   }
+   
+   private List<VirtualFile> getClasses(VFSDeploymentUnit unit)
+   {
+      VisitorAttributes va = new VisitorAttributes();
+      va.setLeavesOnly(true);
+      ClassFileFilter filter = new ClassFileFilter();
+      SuffixesExcludeFilter noJars = new SuffixesExcludeFilter(JarUtils.getSuffixes());
+      va.setRecurseFilter(noJars);
+      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
+
+      for (VirtualFile vf : unit.getClassPath())
+      {
+         try
+         {
+            vf.visit(visitor);
+         }
+         catch (IOException e)
+         {
+            throw new RuntimeException(e);
+         }
+      }
+      return visitor.getMatched();
+
+   }
+   
+   private boolean isAopArchiveOrFolder(VFSDeploymentUnit unit)
+   {
+      String name = unit.getName();
+      
+      //If name is of format 'blah-blah.aop!/' get rid of the trailing '!' and '/', and see if it ends with .aop
+      int index = name.length();
+      if (name.charAt(name.length() - 1) == '/') 
+      {
+         index--;
+      }
+      if (name.charAt(name.length() - 2) == '!')
+      {
+         index--;
+      }
+      String realName = (index == name.length()) ? name : name.substring(0, index);
+      
+      return (realName.endsWith(AOP_JAR_SUFFIX));
+   }
+   
+   private AspectManager getCorrectManager(final VFSDeploymentUnit unit)
+   {
+      //Scoped AOP deployments are only available when deployed as part of a scoped sar, ear etc.
+      //It can contain an aop.xml file, or it can be part of a .aop file
+      Domain domain = AOPClassLoaderInitializer.initializeForUnit(unit); 
+      if (domain != null)
+      {
+         return domain;
+      }
+      
+      return aspectManager;
+   }
+   
+   private static class ClassFileFilter implements VirtualFileFilter
+   {
+      public boolean accepts(VirtualFile file)
+      {
+         try
+         {
+            return file.isLeaf() && file.getName().endsWith(".class");
+         }
+         catch (IOException e)
+         {
+            throw new RuntimeException("Error visiting file: " + file.getName(), e);
+         }
+      }
+   }
+
+}


Property changes on: projects/aop/branches/Branch_2_2/as5integration/src/main/java/org/jboss/aop/asintegration/jboss5/AspectDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/ReadMe-AS4.txt
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/ReadMe-AS4.txt	2010-03-31 09:09:47 UTC (rev 103304)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/ReadMe-AS4.txt	2010-03-31 09:27:36 UTC (rev 103305)
@@ -1,8 +1,26 @@
 NOTE: from the 2.0 release of JBoss AOP only JDK1.5 is supported. This means that that both JBoss AS and AOP
 need to be compiled with JDK1.5 before you upgrade JBoss AOP.
 
-To upgrade your jboss instance:
+To upgrade your JBoss AS 4.x instance, use the ant script:
+1) Edit jboss.properties file, setting the root of the jboss installation
+and the server configuration you wish to patch.
+2) Run the command:
+$ ant 
+The ant script does an automatic backup of the affected files in your server.
+You can disable that option by setting backup property to false in the jboss.properties
+file.
 
+Alternatively, you can do the installation process manually:
+1) Copy the contents of jboss-aop-jdk50.deployer folder over the corresponding deployer folder in
+JBoss4.x/server/xxx/all/deploy
+2) Copy the files javassist.jar, jboss-common-core.jar, trove.jar, jboss-classpool.jar, and
+jboss-classpool-scoped.jar from ../lib folder over the files that already exist in your
+JBoss4.x/server/<config-name>/deploy/jboss-aop-jdk50.deployer folder
+
+* In JBoss 4.0.5.GA and later, we are using jarjar to rename the packages of the files in jboss-aop-jdk50.deployer
+This is done to avoid crashing with older versions of the same packages in the server. If your server version
+4.0.5.GA or later, we advise you to use the ant script for installation.
+
 * If installing in a version before JBoss 4.0.4, you should leave javassist.jar in place in this folder.
 
 *If installing in jboss 4.0.4 or later, the classes contained in javassist.jar will already be available,
@@ -23,10 +41,4 @@
 
 * If you are deploying the jdk 1.4 deployer and upgrading from JDK 1.5, we need to modify the interfaces 
 specifying the simulated annotations in jboss-aspect-library.jar. The build.xml file does this 
-as part of the install step.
-
-Alternatively, you can use the ant script, which will automate all these tasks for you:
-1) Edit jboss.properties file, setting the root of the jboss installation
-and the server configuration you wish to patch.
-2) Run the command:
-$ ant 
\ No newline at end of file
+as part of the install step.
\ No newline at end of file

Modified: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/ReadMe-AS5.txt
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/ReadMe-AS5.txt	2010-03-31 09:09:47 UTC (rev 103304)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/ReadMe-AS5.txt	2010-03-31 09:27:36 UTC (rev 103305)
@@ -1,11 +1,20 @@
-To upgrade your jboss instance:
-1) Copy the contents of the lib folder into the JBoss-5.x/lib/ folder
-2) Copy the jboss-aop-jdk50.deployer over the JBoss-5.x/server/xxx/deployers/jboss-aop-jboss5.deployer/ folder
-3) Copy the jboss-aop-client.jar (located at ../lib) into the JBoss-5.x/client/ folder.
-Note that this will not replace the jboss-aspect-library.jar, which is tied to application
-server version
-Alternatively, you can use the ant script:
+To upgrade your JBoss AS 5.x instance, use the ant script:
 1) Edit jboss.properties file, setting the root of the jboss installation
 and the server configuration you wish to patch.
 2) Run the command:
-$ ant 
\ No newline at end of file
+$ ant 
+The ant script does an automatic backup of the affected files in your server.
+You can disable that option by setting backup property to false in the jboss.properties
+file.
+
+Alternatively, you can do the installation process manually:
+1) Copy the contents of the lib folder into the JBoss-5.x/lib/ folder
+2) Copy the files jboss-aop.jar, javassist.jar, pluggable-instrumentor.jar, and
+trove.jar (from ../lib) into the JBoss-5.x/lib/ folder
+3) Copy the files ../lib/pluggable-instrumentor and ../lib/jboss-aop-aspects.jar
+over the JBoss-5.x/server/xxx/deployers/jboss-aop-jboss5.deployer/ folder
+4) Copy the jboss-aop-client.jar (located at ../lib) into the JBoss-5.x/client/ folder.
+5) Copy the aop.xml file into JBoss-5.x/server/xxx/conf/bootstrap
+
+Note that this will not replace the jboss-aspect-library.jar, which is tied to application
+server version
\ No newline at end of file

Modified: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/ReadMe-AS6.txt
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/ReadMe-AS6.txt	2010-03-31 09:09:47 UTC (rev 103304)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/ReadMe-AS6.txt	2010-03-31 09:27:36 UTC (rev 103305)
@@ -1,12 +1,21 @@
-To upgrade your jboss instance:
+To upgrade your JBoss AS 6.x instance, use the ant script:
+1) Edit jboss.properties file, setting the root of the jboss installation
+and the server configuration you wish to patch.
+2) Run the command:
+$ ant 
+The ant script does an automatic backup of the affected files in your server.
+You can disable that option by setting backup property to false in the jboss.properties
+file.
+
+Alternatively, you can do the installation process manually:
 1) Copy the contents of the lib folder into the JBoss-6.x/lib/ folder
-2) Copy the jboss-aop-jdk50.deployer over the JBoss-6.x/server/xxx/deployers/jboss-aop-jboss5.deployer/ folder
-3) Copy the jboss-aop-client.jar (located at ../lib) into the JBoss-6.x/client/ folder.
-4) Copy the aop.xml file into the JBoss-6.x/server/<your-server-config>/conf/bootstrap/
+2) Copy the files jboss-aop.jar, jboss-classpool.jar, jboss-classpool-scoped.jar,
+javassist.jar, and trove.jar (from ../lib) to the JBoss-6.x/lib folder.
+3) Copy the files ../lib/pluggable-instrumentor.jar and ../lib/jboss-aop-aspects.jar
+to the JBoss-6.x/server/xxx/deployers/jboss-aop-jboss5.deployer/ folder
+4) Copy the jboss-aop-client.jar (located at ../lib) into the JBoss-6.x/client/ folder.
+5) Copy the aop.xml file into the JBoss-6.x/server/<your-server-config>/conf/bootstrap/
+
 Note that this will not replace the jboss-aspect-library.jar, which is tied to application
 server version
-Alternatively, you can use the ant script:
-1) Edit jboss.properties file, setting the root of the jboss installation
-and the server configuration you wish to patch.
-2) Run the command:
-$ ant 
\ No newline at end of file
+

Modified: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-40-install-jboss-aop-jdk50-build.xml
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-40-install-jboss-aop-jdk50-build.xml	2010-03-31 09:09:47 UTC (rev 103304)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-40-install-jboss-aop-jdk50-build.xml	2010-03-31 09:27:36 UTC (rev 103305)
@@ -80,7 +80,12 @@
       <!-- <fail unless="library.exists" message="${aspect.library} does not exist. If you are using the non-ejb3 versions of jboss-4.0.4.GA and jboss-4.0.5.GA, you should "/> -->
 
       <property name="old.deployer" value="${jboss.config.dir}/deploy/jboss-aop${dot}deployer.bak"/>
-      <available file="${old.deployer}" property="old.deployer.exists"/>
+      <condition property="old.deployer.exists">
+         <or>
+            <available file="${old.deployer}"/>
+            <isfalse value="${backup}"/>
+         </or>
+      </condition>
 
       <property name="lib.javassist" value="${jboss.config.dir}/lib/javassist.jar"/>
       <available file="${lib.javassist}" property="jboss.post.4.0.4"/>
@@ -89,10 +94,13 @@
       
       <condition property="backup.javassist" value="true">
          <and>
-            <isset property="jboss.post.4.0.4"/>
-            <not>
-               <isset property="javassist.bak.exists"/>
-             </not>
+            <and>
+               <isset property="jboss.post.4.0.4"/>
+               <not>
+                  <isset property="javassist.bak.exists"/>
+                </not>
+            </and>
+            <istrue value="${backup}"/>
          </and>
       </condition>
 
@@ -103,19 +111,22 @@
       <property name="bak.jbossall-client" value="${jboss.client.dir}/jbossall-client.bak"/>
       <available file="${bak.jbossall-client}" property="jbossall-client.bak.exists"/>
       <condition property="backup.jbossall-client" value="true">
-         <not>
-            <isset property="jbossall-client.bak.exists"/>
-         </not>
+         <and>
+            <not>
+               <isset property="jbossall-client.bak.exists"/>
+            </not>
+            <istrue value="${backup}"/>
+         </and>
       </condition>
 
+      <property name="jboss.aop.lib" value="../lib"/>
+      <available file="${jboss.aop.lib}" property="lib.jboss.aop.exists"/>
+      <fail unless="lib.jboss.aop.exists" message="${jboss.aop.lib} does not exist. Modify build.xml, setting the value of the property 'jboss.aop.lib' to be the path of the JBoss AOP lib installation directory."/>
+
    </target>
       
    <target name="init-lib" depends="init" unless="AS-40">
       
-      <property name="jboss.aop.lib" value="../../lib"/>
-      <available file="${jboss.aop.lib}" property="lib.jboss.aop.exists"/>
-      <fail unless="lib.jboss.aop.exists" message="${jboss.aop.lib} does not exist. Modify build.xml, setting the value of the property 'jboss.aop.lib' to be the path of the JBoss AOP lib installation directory."/>
-
       <property name="lib.jbossaop-client" value="${jboss.aop.lib}/jboss-aop-client.jar"/>
       <available file="${lib.jbossaop-client}" property="lib.jbossaop-client.exists"/>
       <fail unless="lib.jbossaop-client.exists" message="${lib.jbossaop-client} does not exist. Modify build.xml, setting the value of the property 'jboss.aop.lib' to be the path of the JBoss AOP lib installation directory."/>
@@ -127,20 +138,26 @@
       <property name="bak.jbossaop-client" value="${jboss.client.dir}/jboss-aop-jdk50-client.bak"/>
       <available file="${bak.jbossaop-client}" property="jbossaop-client.bak.exists"/>
       <condition property="backup.jbossaop-client" value="true">
-         <not>
-            <isset property="jbossaop-client.bak.exists"/>
-         </not>
+         <and>
+            <not>
+               <isset property="jbossaop-client.bak.exists"/>
+            </not>
+            <istrue value="${backup}"/>
+         </and>
       </condition>
 
    </target>
 
-   <target name="jarjar" depends="init" if="enable.jarjar" >
+   <target name="jarjar" depends="init-lib" if="enable.jarjar" >
       <path id="classpath">
          <pathelement location="jarjar.jar"/>
       </path>
+      <property name="jarjar.lib" value="jarjar-lib"/>
+      <property name="jarjar.suffix" value="-jarjar"/>
+      <mkdir dir="${jarjar.lib}"/>
       <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="classpath"/>
-      <jarjar destfile="jboss-reflect-aop.jar">
-         <zipfileset src="jboss-reflect.jar"/>
+      <jarjar destfile="${jarjar.lib}/jboss-reflect${jarjar.suffix}.jar">
+         <zipfileset src="${jboss.aop.lib}/jboss-reflect.jar"/>
          <rule pattern="org.jboss.beans.**" result="org.jboss.jbossaop4deployermc2.beans. at 1"/>
          <rule pattern="org.jboss.classadapter.**" result="org.jboss.jbossaop4deployermc2.classadapter. at 1"/>
          <rule pattern="org.jboss.config.**" result="org.jboss.org.jboss.jbossaop4deployermc2.config. at 1"/>
@@ -149,8 +166,8 @@
          <rule pattern="org.jboss.annotation.**" result="org.jboss.org.jboss.jbossaop4deployermc2.annotation. at 1"/>
          <rule pattern="org.jboss.metadata.**" result="org.jboss.org.jboss.jbossaop4deployermc2.metadata. at 1"/>
       </jarjar>
-      <jarjar destfile="jboss-mdr-aop.jar">
-         <zipfileset src="jboss-mdr.jar"/>
+      <jarjar destfile="${jarjar.lib}/jboss-mdr${jarjar.suffix}.jar">
+         <zipfileset src="${jboss.aop.lib}/jboss-mdr.jar"/>
          <rule pattern="org.jboss.beans.**" result="org.jboss.jbossaop4deployermc2.beans. at 1"/>
          <rule pattern="org.jboss.classadapter.**" result="org.jboss.jbossaop4deployermc2.classadapter. at 1"/>
          <rule pattern="org.jboss.config.**" result="org.jboss.org.jboss.jbossaop4deployermc2.config. at 1"/>
@@ -159,8 +176,8 @@
          <rule pattern="org.jboss.annotation.**" result="org.jboss.org.jboss.jbossaop4deployermc2.annotation. at 1"/>
          <rule pattern="org.jboss.metadata.**" result="org.jboss.org.jboss.jbossaop4deployermc2.metadata. at 1"/> 
       </jarjar>
-      <jarjar destfile="jboss-aop-jarjar.jar">
-         <zipfileset src="jboss-aop-jdk50.jar"/>
+      <jarjar destfile="${jarjar.lib}/jboss-aop${jarjar.suffix}.jar">
+         <zipfileset src="${jboss.aop.lib}/jboss-aop.jar"/>
          <rule pattern="org.jboss.beans.**" result="org.jboss.jbossaop4deployermc2.beans. at 1"/>
          <rule pattern="org.jboss.classadapter.**" result="org.jboss.jbossaop4deployermc2.classadapter. at 1"/>
          <rule pattern="org.jboss.config.**" result="org.jboss.org.jboss.jbossaop4deployermc2.config. at 1"/>
@@ -169,8 +186,8 @@
          <rule pattern="org.jboss.annotation.**" result="org.jboss.org.jboss.jbossaop4deployermc2.annotation. at 1"/>
          <rule pattern="org.jboss.metadata.**" result="org.jboss.org.jboss.jbossaop4deployermc2.metadata. at 1"/>
       </jarjar>
-      <jarjar destfile="jboss-aop-asintegration-core-jarjar.jar">
-         <zipfileset src="jboss-aop-asintegration-core.jar"/>
+      <jarjar destfile="${jarjar.lib}/jboss-aop-asintegration-core${jarjar.suffix}.jar">
+         <zipfileset src="jboss-aop-jdk50.deployer/jboss-aop-asintegration-core.jar"/>
          <rule pattern="org.jboss.beans.**" result="org.jboss.jbossaop4deployermc2.beans. at 1"/>
          <rule pattern="org.jboss.classadapter.**" result="org.jboss.jbossaop4deployermc2.classadapter. at 1"/>
          <rule pattern="org.jboss.config.**" result="org.jboss.org.jboss.jbossaop4deployermc2.config. at 1"/>
@@ -179,8 +196,8 @@
          <rule pattern="org.jboss.annotation.**" result="org.jboss.org.jboss.jbossaop4deployermc2.annotation. at 1"/>
          <rule pattern="org.jboss.metadata.**" result="org.jboss.org.jboss.jbossaop4deployermc2.metadata. at 1"/>
       </jarjar>
-      <jarjar destfile="jboss-aop-asintegration-jmx-jarjar.jar">
-         <zipfileset src="jboss-aop-asintegration-jmx.jar"/>
+      <jarjar destfile="${jarjar.lib}/jboss-aop-asintegration-jmx${jarjar.suffix}.jar">
+         <zipfileset src="jboss-aop-jdk50.deployer/jboss-aop-asintegration-jmx.jar"/>
          <rule pattern="org.jboss.beans.**" result="org.jboss.jbossaop4deployermc2.beans. at 1"/>
          <rule pattern="org.jboss.classadapter.**" result="org.jboss.jbossaop4deployermc2.classadapter. at 1"/>
          <rule pattern="org.jboss.config.**" result="org.jboss.org.jboss.jbossaop4deployermc2.config. at 1"/>
@@ -193,7 +210,6 @@
 
    <target name="prepare-aspect-library" depends="init,download-aspect-library">
       <!-- Unjar aspect library into a temp folder -->
-      <delete file="jboss-aspect-library-jdk50.jar"/>
       <mkdir dir="aspect-library-temp"/>
       <unjar src="${aspect.library}" dest="aspect-library-temp"/>
 
@@ -230,7 +246,7 @@
       <delete file="${lib.jbossall-client}"/>
       <!-- Get rid of the files that exist in jboss-aop-jdk50.jar -->
       <delete dir="jbossall-client-library-temp/org/jboss/aop"/>
-      <unjar src="jboss-aop-jdk50.jar" dest="jbossall-client-library-temp">
+      <unjar src="${jboss.aop.lib}/jboss-aop.jar" dest="jbossall-client-library-temp">
          <patternset>
             <exclude name="META-INF/MANIFEST.MF"/>
          </patternset>
@@ -254,46 +270,60 @@
       <copy file="${lib.jbossaop-client.injboss}" tofile="${bak.jbossaop-client}"/>
    </target>
 
-   <target name="backup" depends="prepare-aspect-library" unless="old.deployer.exists">
+   <target name="backup.deployer" unless="old.deployer.exists">
       <echo>Backing up existing aop deployer to ${old.deployer}</echo>
       <copy todir="${old.deployer}">
          <fileset dir="${aspect.deployer}"/>
       </copy>
+   </target>
+
+   <target name="delete.deployer" depends="prepare-aspect-library,backup.deployer">
+      <move file="${aspect.deployer}/base-aop.xml" todir="."/>
       <delete dir="${aspect.deployer}"/>
    </target>
 
-   <target name="install.deployer" depends="backup,jarjar">
+   <target name="install.deployer" depends="delete.deployer,jarjar">
       
       <!-- Indicates whether the jar files have been jarjarred -->
-      <condition property="jarjarred" value="NOT_JARJARRED" else="">
+      <condition property="lib.dir" value="${jboss.aop.lib}" else="${jarjar.lib}">
          <isfalse value="${enable.jarjar}"/>
       </condition>
-      
+      <condition property="suffix" value="${jarjar.suffix}" else="">
+         <istrue value="${enable.jarjar}"/>
+      </condition>
+      <condition property="exclude" value="**/*asintegration*.jar" else="">
+         <istrue value="${enable.jarjar}"/>
+      </condition>
       <copy todir="${jboss.deploy.dir}" overwrite="true">
-         <fileset dir="..">
+         <fileset dir=".">
             <include name="jboss-aop-jdk50.deployer/**"/>
-            <exclude name="jboss-aop-jdk50.deployer/build.xml"/>
-            <exclude name="jboss-aop-jdk50.deployer/jboss.properties"/>
-            <exclude name="jboss-aop-jdk50.deployer/build_jboss4.0.xml"/>
-            <exclude name="jboss-aop-jdk50.deployer/ReadMe-AS4.txt"/>
-            <exclude name="jboss-aop-jdk50.deployer/jarjar.jar"/>
-            <!-- if the jar files have been jarjarred, we must not deploy the
-                 original jar files. If they haven't been jarjarred, we must deploy
-                 the original jar files. -->
-            <exclude name="${jarjarred}jboss-aop-jdk50.deployer/jboss-reflect.jar"/>
-            <exclude name="${jarjarred}jboss-aop-jdk50.deployer/jboss-mdr.jar"/>
-            <exclude name="${jarjarred}jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
-            <exclude name="${jarjarred}jboss-aop-jdk50.deployer/jboss-asintegration-core.jar"/>
-            <exclude name="${jarjarred}jboss-aop-jdk50.deployer/jboss-asintegration-jmx.jar"/>
+            <exclude name="${exclude}"/>
          </fileset>
       </copy>
-      <delete file="jboss-reflect-aop.jar"/>
-      <delete file="jboss-mdr-aop.jar"/>
-      <delete file="jboss-aop-jarjar.jar"/>
-      <delete file="jboss-aop-asintegration-core-jarjar.jar"/>
-      <delete file="jboss-aop-asintegration-jmx-jarjar.jar"/>
-      <move file="${jboss.deploy.dir}/jboss-aop-jdk50.deployer" tofile="${jboss.deploy.dir}/jboss-aop${dot}deployer"/>
-      <copy todir="${jboss.deploy.dir}/jboss-aop${dot}deployer" file="${old.deployer}/base-aop.xml"/>
+      <copy todir="${jboss.deploy.dir}/jboss-aop-jdk50.deployer" overwrite="true" flatten="true">
+         <fileset dir="${jboss.aop.lib}">
+            <include name="javassist.jar"/>
+            <include name="jboss-common-core.jar"/>
+            <include name="trove.jar"/>
+            <include name="jboss-classpool.jar"/>
+            <include name="jboss-classpool-scoped.jar"/>
+         </fileset>
+         <!-- if the jar files have been jarjarred, we must not deploy the
+               original jar files. If they haven't been jarjarred, we must deploy
+               the original jar files. -->
+         <fileset dir="${lib.dir}">
+            <include name="jboss-aop-asintegration-core${suffix}.jar"/>
+            <include name="jboss-aop-asintegration-jmx${suffix}.jar"/>
+            <include name="jboss-mdr${suffix}.jar"/>
+            <include name="jboss-reflect${suffix}.jar"/>
+         </fileset>
+       </copy>
+       <move file="jboss-aspect-library-jdk50.jar" todir="${jboss.deploy.dir}/jboss-aop-jdk50.deployer"/>
+       <copy file="${lib.dir}/jboss-aop${suffix}.jar" tofile="${jboss.deploy.dir}/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+       <copy file="${jboss.aop.lib}/jboss-aop-aspects.jar" tofile="${jboss.deploy.dir}/jboss-aop-jdk50.deployer/jboss-standalone-aspect-library-jdk50.jar"/>
+       <move file="${jboss.deploy.dir}/jboss-aop-jdk50.deployer" tofile="${jboss.deploy.dir}/jboss-aop${dot}deployer"/>
+       <move file="./base-aop.xml" todir="${jboss.deploy.dir}/jboss-aop${dot}deployer"/>
+       <delete dir="${jarjar.lib}"/>
    </target>
 
    <target name="backup.javassist.post.4.0.4" depends="init" if="backup.javassist">
@@ -310,7 +340,7 @@
 
    <target name="install.post.4.0.4" depends="install.deployer, install.bin, backup.javassist.post.4.0.4" if="jboss.post.4.0.4">
       <delete file="${aspect.deployer}/javassist.jar"/>
-      <copy file="javassist.jar" tofile="${lib.javassist}" overwrite="true"/>
+      <copy file="${jboss.aop.lib}/javassist.jar" tofile="${lib.javassist}" overwrite="true"/>
    </target>
 
 

Modified: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-50-install-jboss-aop-jdk50-build.xml
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-50-install-jboss-aop-jdk50-build.xml	2010-03-31 09:09:47 UTC (rev 103304)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-50-install-jboss-aop-jdk50-build.xml	2010-03-31 09:27:36 UTC (rev 103305)
@@ -13,6 +13,8 @@
       <property name="jboss.bin.dir" value="${jboss.home}/bin"/>
       <property name="jboss.client.dir" value="${jboss.home}/client"/>
       <property name="jboss.backup.dir" value="${jboss.config.dir}/deployers.bak"/>
+      <property name="jboss.bootstrap.dir" value="${jboss.config.dir}/conf/bootstrap"/>
+      <property name="jboss.conf.backup.dir" value="${jboss.config.dir}/conf.bak"/>
 
       <available file="${jboss.home}" property="jboss.exists" type="dir"/>
       <fail unless="jboss.exists" message="${jboss.home} does not exist. Modify 'jboss.home' in jboss.properties to be a valid root of a jboss installation"/>
@@ -26,6 +28,9 @@
       <available file="${jboss.config.dir}" property="config.exists" type="dir"/>
       <fail unless="config.exists" message="${jboss.config.dir} does not exist. Modify 'jboss.config' in jboss.properties to be a valid server configuration"/>
 
+      <available file="${jboss.bootstrap.dir}" property="bootstrap.exists" type="dir"/>
+      <fail unless="bootstrap.exists" message="${jboss.bootstrap.dir} does not exist. Modify 'jboss.config' in jboss.properties to be a valid server configuration"/>
+
       <property name="deployers.dir" value="${jboss.config.dir}/deployers"/>
 
       <property name="aspect.deployer" value="${deployers.dir}/jboss-aop-jboss5.deployer"/>
@@ -51,18 +56,66 @@
       <property name="bak.jbossaop-client" value="${jboss.client.dir}/jboss-aop-client.bak"/>
       <available file="${bak.jbossaop-client}" property="jbossaop-client.bak.exists"/>
       <condition property="backup.jbossaop-client" value="true">
-         <not>
-            <isset property="jbossaop-client.bak.exists"/>
-         </not>
+         <and>
+            <not>
+               <isset property="jbossaop-client.bak.exists"/>
+            </not>
+            <istrue value="${backup}"/>
+         </and>
       </condition>
 
+      <property name="jboss.run.conf" value="${jboss.bin.dir}/run.conf"/>
+      <available file="${jboss.run.conf}" property="jboss.run.conf.exists"/>
+      <fail unless="jboss.run.conf.exists" message="${jboss.run.conf} does not exist. Modify 'jboss.home' in jboss.properties to be a valid root of a jboss installation"/>
+
+      <condition property="backup.enabled" value="true">
+         <istrue value="${backup}"/>
+      </condition>
+
+      <property name="bak.jboss.run.conf" value="${jboss.run.conf}.bak"/>
+      <available file="${bak.jboss.run.conf}" property="jboss.run.conf.bak.exists"/>
+      <condition property="backup.jboss.run.conf" value="true">
+         <and>
+            <not>
+               <isset property="jboss.run.conf.bak.exists"/>
+            </not>
+            <istrue value="${backup}"/>
+         </and>
+      </condition>
+
+      <property name="jboss.run.conf.bat" value="${jboss.bin.dir}/run.conf.bat"/>
+      <available file="${jboss.run.conf.bat}" property="jboss.run.conf.bat.exists"/>
+      <fail unless="jboss.run.conf.bat.exists" message="${jboss.run.conf.bat} does not exist. Modify 'jboss.home' in jboss.properties to be a valid root of a jboss installation"/>
+
+      <property name="bak.jboss.run.conf.bat" value="${jboss.run.conf.bat}.bak"/>
+      <available file="${bak.jboss.run.conf.bat}" property="jboss.run.conf.bat.bak.exists"/>
+      <condition property="backup.jboss.run.conf.bat" value="true">
+         <and>
+            <not>
+               <isset property="jboss.run.conf.bat.bak.exists"/>
+            </not>
+            <istrue value="${backup}"/>
+         </and>
+      </condition>
+
+      <loadfile srcFile="${jboss.run.conf}" property="jboss.run.conf.contents"/>
+      <condition property="run.conf.updated" value="true">
+         <matches string="${jboss.run.conf.contents}" pattern=".*# Appended by JBoss AOP Installation Script.*# End of lines added by JBoss AOP Installation Script.*"
+            multiline="true" singleline="true"/>
+      </condition>
+
       <tstamp>
          <format property="tstamp"  pattern="yyyyMMdd-HHmmss"/>
       </tstamp>
+
+      <property name="jboss.aop.lib" value="../lib"/>
+      <available file="${jboss.aop.lib}" property="lib.jboss.aop.exists"/>
+      <fail unless="lib.jboss.aop.exists" message="${jboss.aop.lib} does not exist. Modify build.xml, setting the value of the property 'jboss.aop.lib' to be the path of the JBoss AOP lib installation directory."/>
+
    </target>
 
 
-   <target name="backup.lib" depends="init">
+   <target name="backup.lib" depends="init" if="backup.enabled">
       <property name="old.lib" value="${jboss.lib}-${tstamp}.bak"/>
       <echo>Backing up existing lib directory to ${old.lib}</echo>
       <copy todir="${old.lib}">
@@ -70,7 +123,7 @@
       </copy>
    </target>
 
-   <target name="backup.deployer" depends="init">
+   <target name="backup.deployer" depends="init" if="backup.enabled">
       <mkdir dir="${jboss.backup.dir}"/>
       <echo>Backing up existing aop deployer to ${old.deployer}</echo>
       <copy todir="${jboss.backup.dir}/jboss-aop-jboss5.deployer-${tstamp}.bak">
@@ -83,19 +136,36 @@
       <copy file="${lib.jbossaop-client.injboss}" tofile="${bak.jbossaop-client}"/>
    </target>
 
+   <target name="backup.run.conf" if="backup.jboss.run.conf">
+      <echo>Backing up existing ${jboss.run.conf} to ${bak.jboss.run.conf}</echo>
+      <copy file="${jboss.run.conf}" tofile="${bak.jboss.run.conf}"/>
+   </target>
+
+   <target name="backup.run.conf.bat" if="backup.jboss.run.conf.bat">
+      <echo>Backing up existing ${jboss.run.conf.bat} to ${bak.jboss.run.conf.bat}</echo>
+      <copy file="${jboss.run.conf.bat}" tofile="${bak.jboss.run.conf.bat}"/>
+   </target>
+
    <target name="install.lib" depends="backup.lib,backup.client.lib">
-      <copy todir="${jboss.lib}" overwrite="true">
+      <copy todir="${jboss.lib}" overwrite="true" flatten="true">
          <fileset dir="lib">
             <include name="*"/>
          </fileset>
+         <fileset dir="${jboss.aop.lib}">
+            <include name="javassist.jar"/>
+            <include name="jboss-aop.jar"/>
+            <include name="pluggable-instrumentor.jar"/>
+            <include name="trove.jar"/>
+         </fileset>
       </copy>
       <copy file="${lib.jbossaop-client}" tofile="${lib.jbossaop-client.injboss}"/>
    </target>
 
    <target name="install.deployer" depends="backup.deployer">
-      <copy todir="${aspect.deployer}" overwrite="true">
-         <fileset dir="jboss-aop-jboss5.deployer">
-            <include name="**/*"/>
+      <copy todir="${aspect.deployer}" overwrite="true" flatten="true">
+         <fileset dir="${jboss.aop.lib}">
+            <include name="pluggable-instrumentor.jar"/>
+            <include name="jboss-aop-aspects.jar"/>
          </fileset>
       </copy>
    </target>
@@ -108,6 +178,27 @@
       </copy>
    </target>
 
+   <target name="install.run.conf" depends="backup.run.conf,backup.run.conf.bat" unless="run.conf.updated">
+      <echo>Appending the contents of append-run.conf to ${jboss.run.conf}</echo>
+      <concat destfile="${jboss.run.conf}" append="true">
+         <fileset file="append-run.conf"/>
+      </concat>
+      <echo>Appending the contents of append-run.conf.bat to ${jboss.run.conf.bat}</echo>
+      <concat destfile="${jboss.run.conf.bat}" append="true">
+         <fileset file="append-run.conf.bat"/>
+      </concat>
+   </target>
 
-   <target name="install" depends="install.lib,install.deployer,install.bin"/>
+   <target name="backup.aop.xml" depends="init" if="backup.enabled">
+      <property name="old.bootstrap" value="${jboss.conf.backup.dir}/bootstrap-${tstamp}.bak"/>
+      <mkdir dir="${old.bootstrap}"/>
+      <echo>Backing up existing conf/bootstrap/aop.xml file to ${old.bootstrap}/aop.xml</echo>
+      <copy file="${jboss.bootstrap.dir}/aop.xml" todir="${old.bootstrap}"/>
+   </target>
+
+   <target name="install.aop.xml" depends="init,backup.aop.xml">
+      <copy file="aop.xml" todir="${jboss.bootstrap.dir}" overwrite="true"/>
+   </target>
+
+   <target name="install" depends="install.lib,install.deployer,install.bin,install.aop.xml,install.run.conf"/>
 </project>

Added: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-50-run.conf
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-50-run.conf	                        (rev 0)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-50-run.conf	2010-03-31 09:27:36 UTC (rev 103305)
@@ -0,0 +1,13 @@
+# Appended by JBoss AOP Installation Script (do not remove this line)
+# the _AOP suffix is to avoid name crashes
+DIR_AOP=`dirname $0`
+DIR_AOP=`cd $DIR_AOP/..; pwd;`
+NEW_CLASSPATH_AOP="$DIR_AOP/lib/jboss-classpool-scoped.jar:$DIR_AOP/lib/jboss-classpool.jar:$DIR_AOP/lib/javassist.jar:$DIR_AOP/lib/jboss-logging-spi.jar:$DIR_AOP/lib/jboss-common-core.jar"
+if [ "x$JBOSS_CLASSPATH" = "x" ]; then
+    JBOSS_CLASSPATH="$NEW_CLASSPATH_AOP"
+else
+    JBOSS_CLASSPATH="$NEW_CLASSPATH_AOP:$JBOSS_CLASSPATH"
+fi
+
+# End of lines added by JBoss AOP Installation Script (do not remove this line)
+

Added: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-50-run.conf.bat
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-50-run.conf.bat	                        (rev 0)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-50-run.conf.bat	2010-03-31 09:27:36 UTC (rev 103305)
@@ -0,0 +1,21 @@
+rem Appended by JBoss AOP Installation Script
+rem the _AOP suffix is to avoid name crashes
+
+if "%OS%" == "Windows_NT" (
+  set "DIR_AOP=%~dp0%"
+) else (
+  set DIR_AOP=.\
+)
+pushd %DIR_AOP%..
+set "DIR_AOP=%CD%"
+popd
+
+set "NEW_CLASSPATH_AOP=%DIR_AOP%\lib\jboss-classpool-scoped.jar;%DIR_AOP%\lib\jboss-classpool.jar;%DIR_AOP%\lib\javassist.jar;%DIR_AOP%\lib\jboss-logging-spi.jar:%DIR_AOP%\lib\jboss-common-core.jar"
+if "x%JBOSS_CLASSPATH%" == "x" (
+  set "JBOSS_CLASSPATH=%NEW_CLASSPATH_AOP%"
+) else (
+  set "JBOSS_CLASSPATH=%NEW_CLASSPATH_AOP%;%JBOSS_CLASSPATH%"
+)
+
+rem End of lines added by JBoss AOP Installation Script
+

Deleted: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-60-install-aop.xml
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-60-install-aop.xml	2010-03-31 09:09:47 UTC (rev 103304)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-60-install-aop.xml	2010-03-31 09:27:36 UTC (rev 103305)
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-   AOP configuration
--->
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <classloader><inject bean="aop-classloader:0.0.0"/></classloader>
-
-   <classloader name="aop-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
-      <root>${jboss.lib.url}jboss-aop-asintegration-core.jar</root>
-      <root>${jboss.lib.url}jboss-aop-asintegration-mc.jar</root>
-      <root>${jboss.lib.url}jboss-aop-deployers.jar</root>
-      <root>${jboss.lib.url}jboss-aop-jboss5.jar</root>
-      <root>${jboss.lib.url}jboss-classpool.jar</root>
-      <root>${jboss.lib.url}jboss-classpool-jbosscl.jar</root>
-      <root>${jboss.lib.url}jboss-deployers-impl.jar</root>
-   </classloader>
-
-   <!-- Integration -->
-   <bean name="AOPClassLoaderScopingPolicy" class="org.jboss.aop.asintegration.jboss5.VFSClassLoaderScopingPolicy"/>
-   
-   <bean name="AOPClassPoolFactory" class="org.jboss.classpool.plugins.jbosscl.JBossClDelegatingClassPoolFactory">
-      <constructor>
-         <parameter><inject bean="AOPClassLoaderScopingPolicy" property="registry"/></parameter>
-         <parameter><inject bean="AOPRegisterModuleCallback"/></parameter>
-      </constructor>
-   </bean>
-
-   <bean name="AOPJBossIntegration" class="org.jboss.aop.asintegration.jboss5.JBoss5Integration">
-      <property name="classPoolFactory"><inject bean="AOPClassPoolFactory"/></property>
-      <property name="aopClassLoaderScopingPolicy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
-   </bean>
-
-   <bean name="DefaultAspectManager" class="org.jboss.aop.microcontainer.beans.metadata.DefaultAspectManager">
-      <property name="managerBean">AspectManager</property>
-      <property name="managerProperty">aspectManager</property>
-   </bean>
-
-   <!-- bean name="AOPBootstrap" class="org.jboss.aop.asintegration.jboss5.AOPBootstrap" -->
-      <!--  This one lives in AS 5 source tree -->
-      <!-- property name="policy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
-       <property name="manager"><inject bean="AspectManager" property="aspectManager"/></property>
-   </bean-->
-
-<bean name="ClassLoaderDomainRegistry" class="org.jboss.aop.asintegration.jboss5.AOPVFSClassLoaderDomainRegistry">
-     <constructor factoryMethod="getRegistry">
-	<factory bean="AOPClassLoaderScopingPolicy"/>
-     </constructor>
-        </bean>
-
-
-   <bean name="AOPRegisterModuleCallback" class="org.jboss.classpool.plugins.jbosscl.RegisterModuleCallback">
-      <!-- classloader><null/></classloader -->
-     <constructor>
-            <parameter><inject bean="ClassLoaderDomainRegistry"/></parameter>
-                 </constructor>
-                      <install method="addModuleRegistry" bean="ClassLoading" whenRequired="Start">
-                             <parameter><this/></parameter>
-                                  </install>
-                                  <install method="addModule">
-                                    <parameter><inject bean="bootstrap-classloader:0.0.0$MODULE"/></parameter>
-                                  </install>
-<!--                                  <install method="addModule" -->
-                                       <uninstall method="removeModuleRegistry" bean="ClassLoading" whenRequired="Start">
-                                              <parameter><this/></parameter>
-                                                   </uninstall>
-                                                     </bean>
-
-
-
-<!--
-      Valid values for the AspectManager bean for use with enableTransformer=true are:
-      * org.jboss.aop.deployers.AspectManagerJDK5 - works with the -javaagent:pluggable-instrumentor.jar switch
-      * org.jboss.aop.deployers.AspectManagerJRockit - works with JRockit and the -Xmanagement:class=org.jboss.aop.hook.JRockitPluggableClassPreProcessor switch
-   -->
-   <bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
-      <constructor>
-         <parameter><![CDATA[
-	         <aop>
-			      <aspect name="mainDeployer" class="org.jboss.profileservice.aop.MainDeployerAspect"/>
-					   <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployment.MainDeployer}->process(..))">
-				      <advice name="process" aspect="mainDeployer"/>
-				   </bind>
-					<aspect name="persist" class="org.jboss.profileservice.aop.PersistAspect"/>
-					<bind pointcut="execution(* $instanceof{org.jboss.managed.api.ManagedProperty}->setValue(..))">
-				      <advice name="setValue" aspect="persist"/>
-				   </bind>
-				</aop>]]>
-	      </parameter>
-      </constructor>
-
-      <property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>
-
-      <property name="enableLoadtimeWeaving">false</property>
-      <!-- only relevant when EnableLoadtimeWeaving is true.
-           When transformer is on, every loaded class gets
-           transformed.  If AOP can't find the class, then it
-           throws an exception.  Sometimes, classes may not have
-           all the classes they reference.  So, the Suppressing
-           is needed.  (i.e. Jboss cache in the default configuration -->
-      <property name="suppressTransformationErrors">true</property>
-      <property name="prune">true</property>
-      <property name="include">org.jboss.test., org.jboss.injbossaop.</property>
-      <property name="exclude">org.jboss.</property>
-      <!-- This avoids instrumentation of hibernate cglib enhanced proxies
-      <property name="ignore">*$$EnhancerByCGLIB$$*</property> -->
-      <property name="optimized">true</property>
-      <property name="verbose">false</property>
-      <!--
-         Available choices for this attribute are:
-            org.jboss.aop.instrument.ClassicInstrumentor (default)
-            org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
-       <property name="instrumentor">org.jboss.aop.instrument.ClassicInstrumentor</property>
-      -->
-	  <!-- 
-		By default the deployment of the aspects contained in 
-		../deployers/jboss-aop-jboss5.deployer/base-aspects.xml
-		are not deployed. To turn on deployment uncomment this property
-	  <property name="useBaseXml">true</property>
-	  -->
-   </bean>
-
-</deployment>

Modified: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-60-install-jboss-aop-build.xml
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-60-install-jboss-aop-build.xml	2010-03-31 09:09:47 UTC (rev 103304)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-60-install-jboss-aop-build.xml	2010-03-31 09:27:36 UTC (rev 103305)
@@ -14,6 +14,7 @@
       <property name="jboss.client.dir" value="${jboss.home}/client"/>
       <property name="jboss.backup.dir" value="${jboss.config.dir}/deployers.bak"/>
       <property name="jboss.bootstrap.dir" value="${jboss.config.dir}/conf/bootstrap"/>
+      <property name="jboss.conf.backup.dir" value="${jboss.config.dir}/conf.bak"/>
 
       <available file="${jboss.home}" property="jboss.exists" type="dir"/>
       <fail unless="jboss.exists" message="${jboss.home} does not exist. Modify 'jboss.home' in jboss.properties to be a valid root of a jboss installation"/>
@@ -55,18 +56,26 @@
       <property name="bak.jbossaop-client" value="${jboss.client.dir}/jboss-aop-client.bak"/>
       <available file="${bak.jbossaop-client}" property="jbossaop-client.bak.exists"/>
       <condition property="backup.jbossaop-client" value="true">
-         <not>
-            <isset property="jbossaop-client.bak.exists"/>
-         </not>
+         <and>
+            <not>
+               <isset property="jbossaop-client.bak.exists"/>
+            </not>
+            <istrue value="${backup}"/>
+         </and>
       </condition>
 
       <tstamp>
          <format property="tstamp"  pattern="yyyyMMdd-HHmmss"/>
       </tstamp>
+
+     <condition property="backup.enabled" value="true">
+        <istrue value="${backup}"/>
+     </condition>
+
    </target>
 
 
-   <target name="backup.lib" depends="init">
+   <target name="backup.lib" depends="init" if="backup.enabled">
       <property name="old.lib" value="${jboss.lib}-${tstamp}.bak"/>
       <echo>Backing up existing lib directory to ${old.lib}</echo>
       <copy todir="${old.lib}">
@@ -74,7 +83,7 @@
       </copy>
    </target>
 
-   <target name="backup.deployer" depends="init">
+   <target name="backup.deployer" depends="init" if="backup.enabled">
       <mkdir dir="${jboss.backup.dir}"/>
       <echo>Backing up existing aop deployer to ${old.deployer}</echo>
       <copy todir="${jboss.backup.dir}/jboss-aop-jboss5.deployer-${tstamp}.bak">
@@ -92,14 +101,22 @@
          <fileset dir="lib">
             <include name="*"/>
          </fileset>
+         <fileset dir="${jboss.aop.lib}">
+            <include name="javassist.jar"/>
+            <include name="jboss-aop.jar"/>
+            <include name="jboss-classpool.jar"/>
+            <include name="jboss-classpool-scoped.jar"/>
+            <include name="trove.jar"/>
+         </fileset>
       </copy>
       <copy file="${lib.jbossaop-client}" tofile="${lib.jbossaop-client.injboss}"/>
    </target>
 
    <target name="install.deployer" depends="backup.deployer">
       <copy todir="${aspect.deployer}" overwrite="true">
-         <fileset dir="jboss-aop-jboss5.deployer">
-            <include name="**/*"/>
+         <fileset dir="${jboss.aop.lib}">
+            <include name="pluggable-instrumentor"/>
+            <include name="jboss-aop-aspects.jar"/>
          </fileset>
       </copy>
    </target>
@@ -112,7 +129,14 @@
       </copy>
    </target>
 
-   <target name="install.aop.xml" depends="init">
+   <target name="backup.aop.xml" depends="init" if="backup.enabled">
+      <property name="old.bootstrap" value="${jboss.conf.backup.dir}/bootstrap-${tstamp}.bak"/>
+      <mkdir dir="${old.bootstrap}"/>
+      <echo>Backing up existing conf/bootstrap/aop.xml file to ${old.bootstrap}/aop.xml</echo>
+      <copy file="${jboss.bootstrap.dir}/aop.xml" todir="${old.bootstrap}"/>
+   </target>
+
+   <target name="install.aop.xml" depends="init,backup.aop.xml">
       <copy file="aop.xml" todir="${jboss.bootstrap.dir}" overwrite="true"/>
    </target>
 

Copied: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop.xml (from rev 102786, projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-60-install-aop.xml)
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop.xml	                        (rev 0)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss-install-aop.xml	2010-03-31 09:27:36 UTC (rev 103305)
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+   AOP configuration
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <classloader><inject bean="aop-classloader:0.0.0"/></classloader>
+
+   <classloader name="aop-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
+      <root>${jboss.lib.url}jboss-aop-asintegration-core.jar</root>
+      <root>${jboss.lib.url}jboss-aop-asintegration-mc.jar</root>
+      <root>${jboss.lib.url}jboss-aop-deployers.jar</root>
+      <root>${jboss.lib.url}jboss-aop-jboss5.jar</root>
+      <root>${jboss.lib.url}jboss-classpool.jar</root>
+      <root>${jboss.lib.url}jboss-classpool-jbosscl.jar</root>
+      <root>${jboss.lib.url}jboss-deployers-impl.jar</root>
+   </classloader>
+
+   <!-- Integration -->
+   <bean name="AOPClassLoaderScopingPolicy" class="org.jboss.aop.asintegration.jboss5.VFSClassLoaderScopingPolicy"/>
+   
+   <bean name="AOPClassPoolFactory" class="org.jboss.classpool.plugins.jbosscl.JBossClDelegatingClassPoolFactory">
+      <constructor>
+         <parameter><inject bean="AOPClassLoaderScopingPolicy" property="registry"/></parameter>
+         <parameter><inject bean="AOPRegisterModuleCallback"/></parameter>
+      </constructor>
+   </bean>
+
+   <bean name="AOPJBossIntegration" class="org.jboss.aop.asintegration.jboss5.JBoss5Integration">
+      <property name="classPoolFactory"><inject bean="AOPClassPoolFactory"/></property>
+      <property name="aopClassLoaderScopingPolicy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
+   </bean>
+
+   <bean name="DefaultAspectManager" class="org.jboss.aop.microcontainer.beans.metadata.DefaultAspectManager">
+      <property name="managerBean">AspectManager</property>
+      <property name="managerProperty">aspectManager</property>
+   </bean>
+
+   <!-- bean name="AOPBootstrap" class="org.jboss.aop.asintegration.jboss5.AOPBootstrap" -->
+      <!--  This one lives in AS 5 source tree -->
+      <!-- property name="policy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
+       <property name="manager"><inject bean="AspectManager" property="aspectManager"/></property>
+   </bean-->
+
+<bean name="ClassLoaderDomainRegistry" class="org.jboss.aop.asintegration.jboss5.AOPVFSClassLoaderDomainRegistry">
+     <constructor factoryMethod="getRegistry">
+	<factory bean="AOPClassLoaderScopingPolicy"/>
+     </constructor>
+        </bean>
+
+
+   <bean name="AOPRegisterModuleCallback" class="org.jboss.classpool.plugins.jbosscl.RegisterModuleCallback">
+      <!-- classloader><null/></classloader -->
+     <constructor>
+            <parameter><inject bean="ClassLoaderDomainRegistry"/></parameter>
+                 </constructor>
+                      <install method="addModuleRegistry" bean="ClassLoading" whenRequired="Start">
+                             <parameter><this/></parameter>
+                                  </install>
+                                  <install method="addModule">
+                                    <parameter><inject bean="bootstrap-classloader:0.0.0$MODULE"/></parameter>
+                                  </install>
+<!--                                  <install method="addModule" -->
+                                       <uninstall method="removeModuleRegistry" bean="ClassLoading" whenRequired="Start">
+                                              <parameter><this/></parameter>
+                                                   </uninstall>
+                                                     </bean>
+
+
+
+<!--
+      Valid values for the AspectManager bean for use with enableTransformer=true are:
+      * org.jboss.aop.deployers.AspectManagerJDK5 - works with the -javaagent:pluggable-instrumentor.jar switch
+      * org.jboss.aop.deployers.AspectManagerJRockit - works with JRockit and the -Xmanagement:class=org.jboss.aop.hook.JRockitPluggableClassPreProcessor switch
+   -->
+   <bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
+      <constructor>
+         <parameter><![CDATA[
+	         <aop>
+			      <aspect name="mainDeployer" class="org.jboss.profileservice.aop.MainDeployerAspect"/>
+					   <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployment.MainDeployer}->process(..))">
+				      <advice name="process" aspect="mainDeployer"/>
+				   </bind>
+					<aspect name="persist" class="org.jboss.profileservice.aop.PersistAspect"/>
+					<bind pointcut="execution(* $instanceof{org.jboss.managed.api.ManagedProperty}->setValue(..))">
+				      <advice name="setValue" aspect="persist"/>
+				   </bind>
+				</aop>]]>
+	      </parameter>
+      </constructor>
+
+      <property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>
+
+      <property name="enableLoadtimeWeaving">false</property>
+      <!-- only relevant when EnableLoadtimeWeaving is true.
+           When transformer is on, every loaded class gets
+           transformed.  If AOP can't find the class, then it
+           throws an exception.  Sometimes, classes may not have
+           all the classes they reference.  So, the Suppressing
+           is needed.  (i.e. Jboss cache in the default configuration -->
+      <property name="suppressTransformationErrors">true</property>
+      <property name="prune">true</property>
+      <property name="include">org.jboss.test., org.jboss.injbossaop.</property>
+      <property name="exclude">org.jboss.</property>
+      <!-- This avoids instrumentation of hibernate cglib enhanced proxies
+      <property name="ignore">*$$EnhancerByCGLIB$$*</property> -->
+      <property name="optimized">true</property>
+      <property name="verbose">false</property>
+      <!--
+         Available choices for this attribute are:
+            org.jboss.aop.instrument.ClassicInstrumentor (default)
+            org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
+       <property name="instrumentor">org.jboss.aop.instrument.ClassicInstrumentor</property>
+      -->
+	  <!-- 
+		By default the deployment of the aspects contained in 
+		../deployers/jboss-aop-jboss5.deployer/base-aspects.xml
+		are not deployed. To turn on deployment uncomment this property
+	  <property name="useBaseXml">true</property>
+	  -->
+   </bean>
+
+</deployment>

Modified: projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss.properties
===================================================================
--- projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss.properties	2010-03-31 09:09:47 UTC (rev 103304)
+++ projects/aop/branches/Branch_2_2/asintegration-core/src/etc/jboss.properties	2010-03-31 09:27:36 UTC (rev 103305)
@@ -3,3 +3,5 @@
 jboss.home=/Users/kabir/sourcecontrol/jbossas/Branch_5_x/build/output/jboss-5.1.0.Beta1
 #Set the server configuration you want to patch here (e.g, all or default)
 jboss.config=all
+#Set this to false if you don't want to have backups of the files edited by the install script
+backup=true
\ No newline at end of file

Modified: projects/aop/branches/Branch_2_2/build/build.xml
===================================================================
--- projects/aop/branches/Branch_2_2/build/build.xml	2010-03-31 09:09:47 UTC (rev 103304)
+++ projects/aop/branches/Branch_2_2/build/build.xml	2010-03-31 09:27:36 UTC (rev 103305)
@@ -315,29 +315,35 @@
 
     <!-- ==================================================  -->
     <!-- Now pull everything together                        -->
-    <!-- ==================================================  -->
-
-    <property name="aop.50.location" value="${project.root}/aop/target/lib/jboss-aop.jar"/>
-    <property name="aop.50.single.location" value="${project.root}/aop/target/lib/jboss-aop-single.jar"/>
-    <property name="aop.aspect-library50.location" value="${project.root}/aspects/target/jboss-aop-aspects.jar"/>
+    <!-- ==================================================  -->
+
+    <property name="aop.asintegration-mc.name" value="jboss-aop-asintegration-mc.jar"/>
+    <property name="aop.deployers.name" value="jboss-aop-deployers.jar"/>
+    <property name="aop.location" value="${project.root}/aop/target/lib/jboss-aop.jar"/>
+    <property name="aop.single.location" value="${project.root}/aop/target/lib/jboss-aop-single.jar"/>
+    <property name="aop.aspect-library.location" value="${project.root}/aspects/target/jboss-aop-aspects.jar"/>
     <property name="aop.asintegration-core.location" value="${project.root}/asintegration-core/target/jboss-aop-asintegration-core.jar"/>
     <property name="aop.asintegration-jmx.location" value="${project.root}/asintegration-jmx/target/jboss-aop-asintegration-jmx.jar"/>
-    <property name="aop.asintegration-mc.location" value="${project.root}/asintegration-mc/target/jboss-aop-asintegration-mc.jar"/>
+    <property name="aop.asintegration-mc.location" value="${project.root}/asintegration-mc/target/${aop.asintegration-mc.name}"/>
+    <property name="aop.as5integration-lib.location" value="${project.root}/as5integration/target/as5-install"/>
     <property name="aop.pluggable-instrumentor.location" value="${project.root}/pluggable-instrumentor/target/pluggable-instrumentor.jar"/>
-    <property name="aop.deployers.location" value="${project.root}/deployers/target/jboss-aop-deployers.jar"/>
+    <property name="aop.deployers.location" value="${project.root}/deployers/target/${aop.deployers.name}"/>
     <property name="aop.readme-as4.location" value="${project.root}/asintegration-core/src/etc/ReadMe-AS4.txt"/>
     <property name="aop.readme-as5.location" value="${project.root}/asintegration-core/src/etc/ReadMe-AS5.txt"/>
     <property name="aop.readme-as6.location" value="${project.root}/asintegration-core/src/etc/ReadMe-AS6.txt"/>
-    <property name="aop.jboss-service.location" value="${project.root}/asintegration-jmx/src/resources/META-INF/jboss-service.xml"/>
+    <property name="aop.jboss-service.location" value="${project.root}/asintegration-jmx/src/resources/META-INF/jboss-service.xml"/>
+    <property name="jboss-install-aop.xml.location" value="${project.root}/asintegration-core/src/etc/jboss-install-aop.xml"/>
+    <property name="jboss-50-run.conf.location" value="${project.root}/asintegration-core/src/etc/jboss-50-run.conf"/>
+    <property name="jboss-50-run.conf.bat.location" value="${project.root}/asintegration-core/src/etc/jboss-50-run.conf.bat"/>
 
     <!-- Copy across the eula -->
     <copy todir="${project.release}" file="${project.root}/aop/src/etc/jbossorg-eula.txt"/>
 
     <!-- The JDK 5 libs -->
-    <copy todir="${project.release}/lib" file="${aop.50.location}"/>
-    <copy todir="${project.release}/lib" file="${aop.50.single.location}"/>
+    <copy todir="${project.release}/lib" file="${aop.location}"/>
+    <copy todir="${project.release}/lib" file="${aop.single.location}"/>
     <copy todir="${project.release}/lib" file="${project.root}/aop/target/lib/jboss-aop-client.jar"/>
-    <copy todir="${project.release}/lib" file="${aop.aspect-library50.location}"/>
+    <copy todir="${project.release}/lib" file="${aop.aspect-library.location}"/>
     <copy todir="${project.release}/lib" file="${aop.pluggable-instrumentor.location}"/>
     <copy todir="${project.release}/lib" file="${aop.deployers.location}"/>
     <copy tofile="${project.release}/lib/javassist.jar" file="${javassist:javassist:jar}"/>
@@ -359,49 +365,39 @@
         <filter token="SERVICE_NAME" value="org.jboss.aop.deployment.AspectManagerServiceJDK5"/>
       </filterset>
     </copy>
-    <copy tofile="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer/build.xml" file="../asintegration-core/src/etc/jboss-40-install-jboss-aop-jdk50-build.xml"/>
-    <copy todir="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer" file="../asintegration-core/src/etc/jboss.properties"/>
-    <copy tofile="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar" file="${aop.50.location}"/>
-    <copy tofile="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer/jboss-standalone-aspect-library-jdk50.jar" file="${aop.aspect-library50.location}"/>
+    <copy tofile="${project.release}/jboss-40-install/build.xml" file="../asintegration-core/src/etc/jboss-40-install-jboss-aop-jdk50-build.xml"/>
+    <copy todir="${project.release}/jboss-40-install/" file="${aop.readme-as4.location}"/>
+    <copy tofile="${project.release}/jboss-40-install/jarjar.jar" file="${com.google.code:jarjar:jar}"/>
+    <copy todir="${project.release}/jboss-40-install" file="../asintegration-core/src/etc/jboss.properties"/>
     <copy todir="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer" file="${aop.asintegration-core.location}"/>
     <copy todir="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer" file="${aop.asintegration-jmx.location}"/>
-    <copy todir="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer" file="${aop.readme-as4.location}"/>
-    <copy tofile="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer/jboss-reflect.jar" file="${org.jboss:jboss-reflect:jar}"/>
-    <copy tofile="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer/jboss-mdr.jar" file="${org.jboss:jboss-mdr:jar}"/>
-    <copy tofile="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer/jboss-common-core.jar" file="${org.jboss:jboss-common-core:jar}"/>
-    <copy tofile="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer/javassist.jar" file="${javassist:javassist:jar}"/>
-    <copy tofile="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer/trove.jar" file="${trove:trove:jar}"/>
-    <copy tofile="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer/jarjar.jar" file="${com.google.code:jarjar:jar}"/>
-    <copy tofile="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer/META-INF/jboss-service.xml" file="output/temp/jboss-service-jdk50.xml"/>
+    <copy tofile="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer/META-INF/jboss-service.xml" file="output/temp/jboss-service-jdk50.xml"/>
+    <copy tofile="${project.release}/jboss-40-install/jboss-aop-jdk50.deployer/jboss-classpool-ucl.jar" file="${org.jboss.classpool:jboss-classpool-ucl:jar}"/>
 
+
     <!-- The JBoss 5 libs for JDK 5 (JBoss 5 needs JDK 5) -->
-    <copy todir="${project.release}/jboss-50-install/lib" file="${aop.50.location}"/>
     <copy todir="${project.release}/jboss-50-install/lib" file="${aop.asintegration-core.location}"/>
-    <copy todir="${project.release}/jboss-50-install/lib" file="${aop.asintegration-mc.location}"/>
+    <copy todir="${project.release}/jboss-50-install/lib">
+      <fileset dir="${aop.as5integration-lib.location}">
+         <include name="*.jar"/>
+      </fileset>
+    </copy>
     <copy todir="${project.release}/jboss-50-install/lib" file="${aop.asintegration-jmx.location}"/>
     <copy todir="${project.release}/jboss-50-install" file="${aop.readme-as5.location}"/>
     <copy tofile="${project.release}/jboss-50-install/build.xml" file="../asintegration-core/src/etc/jboss-50-install-jboss-aop-jdk50-build.xml"/>
     <copy todir="${project.release}/jboss-50-install" file="../asintegration-core/src/etc/jboss.properties"/>
-    <copy tofile="${project.release}/jboss-50-install/lib/javassist.jar" file="${javassist:javassist:jar}"/>
-    <copy tofile="${project.release}/jboss-50-install/lib/trove.jar" file="${trove:trove:jar}"/>
-    <copy todir="${project.release}/jboss-50-install/jboss-aop-jboss5.deployer/" file="${aop.aspect-library50.location}"/>
-    <copy todir="${project.release}/jboss-50-install/jboss-aop-jboss5.deployer/" file="${aop.pluggable-instrumentor.location}"/>
+    <copy tofile="${project.release}/jboss-50-install/aop.xml" file="${jboss-install-aop.xml.location}"/>
+    <copy tofile="${project.release}/jboss-50-install/append-run.conf" file="${jboss-50-run.conf.location}"/>
+    <copy tofile="${project.release}/jboss-50-install/append-run.conf.bat" file="${jboss-50-run.conf.bat.location}"/>
 
     <!-- The JBoss 6 libs for JDK 6 (JBoss 6 needs JDK6) -->
-    <copy todir="${project.release}/jboss-60-install/lib" file="${aop.50.location}"/>
-    <copy todir="${project.release}/jboss-60-install/lib" file="${aop.asintegration-core.location}"/>
-    <copy todir="${project.release}/jboss-60-install/lib" file="${aop.asintegration-mc.location}"/>
     <copy todir="${project.release}/jboss-60-install" file="${aop.readme-as6.location}"/>
     <copy tofile="${project.release}/jboss-60-install/build.xml" file="../asintegration-core/src/etc/jboss-60-install-jboss-aop-build.xml"/>
-    <copy tofile="${project.release}/jboss-60-install/aop.xml" file="../asintegration-core/src/etc/jboss-60-install-aop.xml"/>
+    <copy tofile="${project.release}/jboss-60-install/aop.xml" file="${jboss-install-aop.xml.location}"/>
     <copy todir="${project.release}/jboss-60-install" file="../asintegration-core/src/etc/jboss.properties"/>
-    <copy tofile="${project.release}/jboss-60-install/lib/javassist.jar" file="${javassist:javassist:jar}"/>
-    <copy tofile="${project.release}/jboss-60-install/lib/jboss-classpool-scoped.jar" file="${org.jboss.classpool:jboss-classpool-scoped:jar}"/>
-    <copy tofile="${project.release}/jboss-60-install/lib/jboss-classpool.jar" file="${org.jboss.classpool:jboss-classpool:jar}"/>
+    <copy todir="${project.release}/jboss-60-install/lib" file="${aop.asintegration-core.location}"/>
+    <copy todir="${project.release}/jboss-60-install/lib" file="${aop.asintegration-mc.location}"/>
     <copy tofile="${project.release}/jboss-60-install/lib/jboss-classpool-jbosscl.jar" file="${org.jboss.classpool:jboss-classpool-jbosscl:jar}"/>
-    <copy tofile="${project.release}/jboss-60-install/lib/trove.jar" file="${trove:trove:jar}"/>
-    <copy todir="${project.release}/jboss-60-install/jboss-aop-jboss5.deployer/" file="${aop.aspect-library50.location}"/>
-    <copy todir="${project.release}/jboss-60-install/jboss-aop-jboss5.deployer/" file="${aop.pluggable-instrumentor.location}"/>
 
     <!-- Copy aophelper to the dist -->
     <mkdir dir="${project.release}/aophelper"/>

Modified: projects/aop/branches/Branch_2_2/pom.xml
===================================================================
--- projects/aop/branches/Branch_2_2/pom.xml	2010-03-31 09:09:47 UTC (rev 103304)
+++ projects/aop/branches/Branch_2_2/pom.xml	2010-03-31 09:27:36 UTC (rev 103305)
@@ -79,6 +79,7 @@
     <module>asintegration-core</module>
     <module>asintegration-jmx</module>
     <module>asintegration-mc</module>
+    <module>as5integration</module>
     <module>aophelper</module>
     <module>deployers</module>
     <module>build</module>
@@ -200,6 +201,11 @@
         <version>${project.version}</version>
       </dependency>
       <dependency>
+        <groupId>org.jboss.aop</groupId>
+        <artifactId>jboss-aop-deployers</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
         <groupId>org.jboss.cl</groupId>
         <artifactId>jboss-classloader</artifactId>
         <version>${version.org.jboss.cl}</version>




More information about the jboss-cvs-commits mailing list