DATAGRAPH-511 - Tweak AspectJ setup to make sure we can build on Spring 4.1

Added aop.xml to only compile explicitly listed aspects into the code.  This is needed as Spring 4.1 includes a new aspect for JavaEE 7 JCache support that has optional dependencies which we don't have in the classpath. Trying to compile all aspects contained in spring-aspects will result in ClassNotFoundExceptions for the aspects with missing dependencies.
This commit is contained in:
Oliver Gierke
2014-09-04 09:08:05 +02:00
parent 5ae4923c68
commit b17c2abc72
2 changed files with 15 additions and 7 deletions

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<aspectj>
<aspects>
<aspect name="org.springframework.data.neo4j.aspects.support.node.Neo4jNodeBacking" />
<aspect name="org.springframework.data.neo4j.aspects.support.relationship.Neo4jRelationshipBacking" />
</aspects>
</aspectj>

View File

@@ -2,7 +2,7 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-data-neo4j-aspects</artifactId>
<name>Spring Data Neo4j - AspectJ Advanced Mapping</name>
@@ -20,7 +20,7 @@
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
@@ -52,7 +52,7 @@
</exclusion>
</exclusions>
</dependency>
<!-- JSR 303 Validation -->
<dependency>
<groupId>javax.validation</groupId>
@@ -120,7 +120,7 @@
<artifactId>cglib</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-spatial</artifactId>
@@ -141,7 +141,7 @@
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
@@ -175,7 +175,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.4</version>
<version>1.6</version>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
@@ -210,9 +210,10 @@
<source>${source.level}</source>
<target>${source.level}</target>
<complianceLevel>${source.level}</complianceLevel>
<xmlConfigured>aop.xml</xmlConfigured>
</configuration>
</plugin>
<!-- the eclipse plugin interacts with the aspectj-maven-plugin
<!-- the eclipse plugin interacts with the aspectj-maven-plugin
BUT ONLY if the ajdtVersion config value is set (remove it and it won't) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>