Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit f1ea442

Browse files
committed
Change pom to run test with -javaagent command line option
1 parent 8a412ec commit f1ea442

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

SPR-9215/pom.xml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0"
2-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
43
<modelVersion>4.0.0</modelVersion>
54
<groupId>org.springframework.issues</groupId>
65
<artifactId>SPR-9215</artifactId>
@@ -10,6 +9,7 @@
109
<maven.compiler.source>1.6</maven.compiler.source>
1110
<maven.compiler.target>1.6</maven.compiler.target>
1211
<project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
12+
<spring.version>3.1.0.RELEASE</spring.version>
1313
</properties>
1414
<dependencies>
1515
<dependency>
@@ -38,23 +38,29 @@
3838
<dependency>
3939
<groupId>org.springframework</groupId>
4040
<artifactId>spring-aspects</artifactId>
41-
<version>3.1.0.RELEASE</version>
41+
<version>${spring.version}</version>
4242
<scope>runtime</scope>
4343
</dependency>
4444
<dependency>
4545
<groupId>org.springframework</groupId>
4646
<artifactId>spring-context</artifactId>
47-
<version>3.1.0.RELEASE</version>
47+
<version>${spring.version}</version>
4848
</dependency>
4949
<dependency>
5050
<groupId>org.springframework</groupId>
51-
<artifactId>spring-tx</artifactId>
52-
<version>3.1.0.RELEASE</version>
51+
<artifactId>spring-instrument</artifactId>
52+
<version>${spring.version}</version>
53+
<scope>runtime</scope>
5354
</dependency>
5455
<dependency>
5556
<groupId>org.springframework</groupId>
5657
<artifactId>spring-orm</artifactId>
57-
<version>3.1.0.RELEASE</version>
58+
<version>${spring.version}</version>
59+
</dependency>
60+
<dependency>
61+
<groupId>org.springframework</groupId>
62+
<artifactId>spring-tx</artifactId>
63+
<version>${spring.version}</version>
5864
</dependency>
5965
<dependency>
6066
<groupId>log4j</groupId>
@@ -89,6 +95,10 @@
8995
<artifactId>maven-surefire-plugin</artifactId>
9096
<version>2.7.2</version>
9197
<configuration>
98+
<forkMode>once</forkMode>
99+
<argLine>
100+
-javaagent:${settings.localRepository}/org/springframework/spring-instrument/${spring.version}/spring-instrument-${spring.version}.jar
101+
</argLine>
92102
<includes>
93103
<include>**/*Tests.java</include>
94104
</includes>

SPR-9215/src/test/java/org/springframework/issues/XmlConfigTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class XmlConfigTests {
1818
@Test
1919
public void xmlConfigurationTest() {
2020
GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
21-
ctx.load("classpath:org/springframework/issues/ReproTests-context.xml");
21+
ctx.load("classpath:/org/springframework/issues/ReproTests-context.xml");
2222
ctx.refresh();
2323
try {
2424
TestService ts = ctx.getBean(TestService.class);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
jdbc.driverClass=org.hsqldb.jdbc.JDBCDriver
2-
jdbc.url=jdbc:hsqldb:mem
2+
jdbc.url=jdbc:hsqldb:mem:test
33
jdbc.user=SA
44
jdbc.password=

0 commit comments

Comments
 (0)