Skip to content

Commit

Permalink
DATAGRAPH-511 - Tweak AspectJ setup to make sure we can build on Spri…
Browse files Browse the repository at this point in the history
…ng 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.
  • Loading branch information
odrotbohm committed Sep 4, 2014
1 parent 4320c76 commit 8a98803
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
7 changes: 7 additions & 0 deletions spring-data-neo4j-aspects/aop.xml
Original file line number Diff line number Diff line change
@@ -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>
15 changes: 8 additions & 7 deletions spring-data-neo4j-aspects/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -20,7 +20,7 @@
</properties>

<dependencies>

<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
Expand Down Expand Up @@ -52,7 +52,7 @@
</exclusion>
</exclusions>
</dependency>

<!-- JSR 303 Validation -->
<dependency>
<groupId>javax.validation</groupId>
Expand Down Expand Up @@ -120,7 +120,7 @@
<artifactId>cglib</artifactId>
<version>2.2.2</version>
</dependency>

<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-spatial</artifactId>
Expand All @@ -141,7 +141,7 @@
</exclusions>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 8a98803

Please sign in to comment.