3 Replies Latest reply on Dec 10, 2008 10:03 PM by miroconnect

    new bee trying maven aop  plugin compile goal to  add introd

    miroconnect

      I am new bee ,trying to add introduction to one of my class.

      here my pom part

      <plugin>
       <groupId>org.jboss.maven.plugins</groupId>
       <artifactId>maven-jbossaop-plugin</artifactId>
       <version>1.0.0.GA</version>
       <executions>
       <execution>
       <id>run</id>
       <configuration>
       <includeProjectDependency>true</includeProjectDependency>
       <aoppaths>
       <aoppath>src/main/resources/jboss-aop.xml</aoppath>
       </aoppaths>
       <includes>
       <include>gov/hhs/acf/dto/ReassignGrantsOfficerDTO.class</include>
       </includes>
       <verbose>true</verbose>
       <report>true</report>
       </configuration>
       <goals>
       <goal>compile</goal>
       </goals>
       </execution>
       </executions>
       </plugin>


      here my jboss-aop.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <aop>
      <introduction class="gov.hhs.acf.dto.ReassignGrantsOfficerDTO">
       <interfaces>java.io.Serializable</interfaces>
      </introduction>
      </aop>

      here the console output

      [INFO] [jbossaop:compile]
      [INFO] [aop-debug] org.jboss.aop.instrument.InstrumentorFactory Passed in instrumentor: null
      [INFO] [aop-debug] org.jboss.aop.instrument.InstrumentorFactory Defaulting instrumentor to: org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
      [INFO] [aop-debug] org.jboss.aop.AdvisorFactory Passed in advisor: null
      [INFO] [aop-debug] org.jboss.aop.AdvisorFactory [debug] Defaulting advisor to: org.jboss.aop.ClassAdvisor
      [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.class.path is NULL
      [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.search.classpath: 'null' true


      after running this I was expecting ReassignGrantsOfficerDTO will be serializable but no .I dont know what am i missing please help me with this smple application to make a class implement serializable throguh aop


        • 1. Re: new bee trying maven aop  plugin compile goal to  add in
          stalep

          hi, take a look at the introductions example we have in the distro. there you'll find an example jboss-aop.xml file and a pom.xml file that will help you along.

          • 2. Re: new bee trying maven aop  plugin compile goal to  add in
            miroconnect

             

            "stale.pedersen@jboss.org" wrote:
            hi, take a look at the introductions example we have in the distro. there you'll find an example jboss-aop.xml file and a pom.xml file that will help you along.



            I tried the examples it did not help me , please help me give a simple example,

            • 3. Re: new bee trying maven aop  plugin compile goal to  add in
              miroconnect

               

              "stale.pedersen@jboss.org" wrote:
              hi, take a look at the introductions example we have in the distro. there you'll find an example jboss-aop.xml file and a pom.xml file that will help you along.



              I am following the introduction example to introduce an advice to a class.

              as per the example

              I created jboss-aop.xml

              <aop>
               <introduction class="com.test.Pojo">
               <interfaces>java.io.Serializable</interfaces>
               </introduction>
              </aop>
              


              here my assumption is jboss aop will chage the POPJO.class file to implement serizlizable it odesnot happen please please help me unerstand where am i doing wrong please.



              here is the out generated by jboss:compile goal

              [INFO] [aop-debug] org.jboss.aop.instrument.InstrumentorFactory Passed in instrumentor: null
              [INFO] [aop-debug] org.jboss.aop.instrument.InstrumentorFactory Defaulting instrumentor to: org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
              [INFO] [aop-debug] org.jboss.aop.AdvisorFactory Passed in advisor: null
              [INFO] [aop-debug] org.jboss.aop.AdvisorFactory [debug] Defaulting advisor to: org.jboss.aop.ClassAdvisor
              [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.class.path is NULL
              [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.search.classpath: 'null' true
              [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.path: C:\dev\audit\src\main\resources\jboss-aop.xml
              [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.path[0]: C:\dev\audit\src\main\resources\jboss-aop.xml
              [INFO] [aop-debug] org.jboss.aop.Deployment deploying file:/C:/dev/audit/src/main/resources/jboss-aop.xml
              [INFO] [aop-debug] org.jboss.aop.AspectXmlLoader AspectXMLLoader using managerorg.jboss.aop.AspectManager@bf32c


              please help me .