Semyon Danilov
Semyon Danilov

Reputation: 1773

Aspectj maven plugin error

I got this error

[ERROR] can't determine superclass of missing type org.springframework.aop.interceptor.AsyncExecutionAspectSupport
when batch building BuildConfig[null] #Files=18 AopXmls=#0
 [Xlint:cantFindType]

This is my part of POM with aspectj plugin aspectj.version is 1.6.11

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>aspectj-maven-plugin</artifactId>
            <version>1.4</version>

            <configuration>
                <showWeaveInfo>false</showWeaveInfo>
                <verbose>false</verbose>
                <source>1.7</source>
                <target>1.7</target>
                <complianceLevel>1.7</complianceLevel>

                <aspectLibraries>
                    <aspectLibrary>
                        <groupId>ru.sofitlabs</groupId>
                        <artifactId>ngutil</artifactId>
                    </aspectLibrary>

                    <aspectLibrary>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-aspects</artifactId>
                    </aspectLibrary>
                </aspectLibraries>
            </configuration>

            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                        <goal>test-compile</goal>
                    </goals>
                </execution>
            </executions>

            <dependencies>
                <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjrt</artifactId>
                    <version>${aspectj.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                    <version>${aspectj.version}</version>
                </dependency>
            </dependencies>
        </plugin>

I will appreciate any help.

Upvotes: 1

Views: 3281

Answers (2)

Semyon Danilov
Semyon Danilov

Reputation: 1773

Finally found a solution. I set compilance, source and target level to 1.7 (do not forget to set parameters "-XX:-UseSplitVerifier" for server VM) and excluded lots of dependencies. For example old springaspects, spring-aop and so on. IDEA has a nice tool - dependencies graph, which is very useful in this case.

Upvotes: 0

Julien
Julien

Reputation: 2584

The missing type org.springframework.aop.interceptor.AsyncExecutionAspectSupport is supposed to be in spring-aop which depends spring-aspects.

Are you sure the jar spring-aop is in your classpath at exec time ?

Upvotes: 2

Related Questions