mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-28 14:52:24 +00:00
Pass apache-ds temp working directory as a system property through the surefire plugin.
This commit is contained in:
parent
8b98a9d27c
commit
5464678355
@ -207,16 +207,16 @@ public class LdapTestServer {
|
|||||||
private void startLdapServer() {
|
private void startLdapServer() {
|
||||||
cfg = new MutableStartupConfiguration();
|
cfg = new MutableStartupConfiguration();
|
||||||
|
|
||||||
// Attempt to use the maven target directory for the apache ds store.
|
// Attempt to use the maven target directory for the apache ds store. Property is passed
|
||||||
// This doesn't work at the moment - need to find out if we can access maven properties somehow.
|
// through surefire plugin setup in pom.xml.
|
||||||
|
|
||||||
String tempDirectory = System.getProperty("maven.build.dir");
|
String apacheWorkDir = System.getProperty("apacheDSWorkDir");
|
||||||
|
|
||||||
if(tempDirectory == null) {
|
if(apacheWorkDir == null) {
|
||||||
tempDirectory = System.getProperty("java.io.tmpdir");
|
apacheWorkDir = System.getProperty("java.io.tmpdir" + File.separator + "apacheds-work");
|
||||||
}
|
}
|
||||||
|
|
||||||
File workingDir = new File(tempDirectory + File.separator + "apacheds-work");
|
File workingDir = new File(apacheWorkDir);
|
||||||
|
|
||||||
// Delete any previous contents (often not compatible between apache-ds versions).
|
// Delete any previous contents (often not compatible between apache-ds versions).
|
||||||
deleteDir(workingDir);
|
deleteDir(workingDir);
|
||||||
|
11
pom.xml
11
pom.xml
@ -1,6 +1,4 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<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">
|
||||||
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">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.acegisecurity</groupId>
|
<groupId>org.acegisecurity</groupId>
|
||||||
<artifactId>acegi-security-parent</artifactId>
|
<artifactId>acegi-security-parent</artifactId>
|
||||||
@ -250,6 +248,13 @@
|
|||||||
<exclude>**/Abstract*</exclude>
|
<exclude>**/Abstract*</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
<forkMode>once</forkMode>
|
<forkMode>once</forkMode>
|
||||||
|
<systemProperties>
|
||||||
|
<!-- The working directory for the embedded apache Ldap test server -->
|
||||||
|
<property>
|
||||||
|
<name>apacheDSWorkDir</name>
|
||||||
|
<value>${basedir}/target/apacheds-work</value>
|
||||||
|
</property>
|
||||||
|
</systemProperties>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user