AOP: LTW and maven plguin, improvements
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Sun, 17 Apr 2016 11:35:09 +0000 (13:35 +0200)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Sun, 17 Apr 2016 11:35:09 +0000 (13:35 +0200)
SpringJava/AOP/SpringLTW/src/main/java/de/spring/example/TransactionManager.java
SpringJava/AOP/SpringLTW/src/main/resources/META-INF/aop.xml
SpringJava/AOP/SpringMavenWeaver/pom.xml
SpringJava/AOP/SpringMavenWeaver/src/main/java/de/spring/example/TransactionManager.java

index 53f3c59..338c82a 100644 (file)
@@ -1,12 +1,10 @@
 package de.spring.example;
 
-import org.aspectj.lang.annotation.Aspect;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.jdbc.datasource.DataSourceTransactionManager;
 import org.springframework.transaction.TransactionStatus;
 
-@Aspect
 public class TransactionManager {
        private static final Logger LOGGER = LoggerFactory.getLogger(TransactionManager.class);
     private static TransactionManager instance = new TransactionManager();
index a5e58ae..186f621 100644 (file)
@@ -1,6 +1,8 @@
 <!DOCTYPE aspectj PUBLIC
         "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
 
+       <!-- REQUIRED FILE WHEN USING LOAD TIME WEAVING!!!! -->
+
 <aspectj>
        <!--
                With or without logs
index 1e3dac6..dd5a42e 100644 (file)
                 <encoding>${project.build.sourceEncoding}</encoding>
                 <complianceLevel>1.8</complianceLevel>                    
                 <verbose>true</verbose>
+                <warn>constructorName,packageDefaultMethod,deprecation,maskedCatchBlocks,unusedLocals,unusedArguments,unusedImports</warn>
+                <crossrefs>true</crossrefs>
                                <weaveDirectories>
                        <weaveDirectory>${project.build.directory}/classes</weaveDirectory>
                        </weaveDirectories>
                        <showWeaveInfo>true</showWeaveInfo>
+                       <outxml>true</outxml>
                                <sources>
                                        <source>
                                                <basedir>src/main/java</basedir>
                                                <includes>
-                                                       <include>**/aspects/*.java</include>
+                                                       <include>**/*.java</include>
                                                </includes>
                                                <excludes>
                                                        <exclude>**/logging/*.aj</exclude>
index 53f3c59..338c82a 100644 (file)
@@ -1,12 +1,10 @@
 package de.spring.example;
 
-import org.aspectj.lang.annotation.Aspect;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.jdbc.datasource.DataSourceTransactionManager;
 import org.springframework.transaction.TransactionStatus;
 
-@Aspect
 public class TransactionManager {
        private static final Logger LOGGER = LoggerFactory.getLogger(TransactionManager.class);
     private static TransactionManager instance = new TransactionManager();