Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit a31e72f

Browse files
committed
DATAMONGO-1045 - Tweak AspectJ setup in cross-store module to be able to build against Spring 4.1.
Added an aop.xml to only compile explicitly listed aspects in the cross-store module. 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.
1 parent f07d8fc commit a31e72f

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<aspectj>
3+
<aspects>
4+
<aspect name="org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect" />
5+
<aspect name="org.springframework.data.mongodb.crossstore.MongoDocumentBacking" />
6+
</aspects>
7+
</aspectj>

spring-data-mongodb-cross-store/pom.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
<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/maven-v4_0_0.xsd">
33

44
<modelVersion>4.0.0</modelVersion>
5-
5+
66
<parent>
77
<groupId>org.springframework.data</groupId>
88
<artifactId>spring-data-mongodb-parent</artifactId>
99
<version>1.6.0.BUILD-SNAPSHOT</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
12-
12+
1313
<artifactId>spring-data-mongodb-cross-store</artifactId>
1414
<name>Spring Data MongoDB - Cross-Store Support</name>
15-
15+
1616
<properties>
1717
<jpa>1.0.0.Final</jpa>
1818
<hibernate>3.6.10.Final</hibernate>
1919
</properties>
20-
20+
2121
<dependencies>
2222

2323
<!-- Spring -->
@@ -126,10 +126,11 @@
126126
<groupId>org.springframework</groupId>
127127
<artifactId>spring-aspects</artifactId>
128128
</aspectLibrary>
129-
</aspectLibraries>
129+
</aspectLibraries>
130130
<complianceLevel>${source.level}</complianceLevel>
131131
<source>${source.level}</source>
132132
<target>${source.level}</target>
133+
<xmlConfigured>aop.xml</xmlConfigured>
133134
</configuration>
134135
</plugin>
135136
</plugins>

0 commit comments

Comments
 (0)