Fix test failure caused by expired certificate.
diff --git a/modules/rampart-integration/pom.xml b/modules/rampart-integration/pom.xml
index 0abc876..a4b818b 100644
--- a/modules/rampart-integration/pom.xml
+++ b/modules/rampart-integration/pom.xml
@@ -396,10 +396,31 @@
</executions>
</plugin-->
<plugin>
+ <groupId>com.github.veithen.alta</groupId>
+ <artifactId>alta-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-properties</goal>
+ </goals>
+ <configuration>
+ <name>aspectjweaver</name>
+ <value>%file%</value>
+ <artifacts>
+ <artifact>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjweaver</artifactId>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Add the Xerces/Xalan versions expected by OpenSAML to the boot classpath so that the build succeeds on older 1.5 JDKs -->
- <argLine>${jacoco.surefireArgLine} -Xbootclasspath/p:${project.build.directory}/endorsed/xml-apis.jar${path.separator}${project.build.directory}/endorsed/xercesImpl.jar${path.separator}${project.build.directory}/endorsed/resolver.jar${path.separator}${project.build.directory}/endorsed/serializer.jar${path.separator}${project.build.directory}/endorsed/xalan.jar</argLine>
+ <argLine>${jacoco.surefireArgLine} -Xbootclasspath/p:${project.build.directory}/endorsed/xml-apis.jar${path.separator}${project.build.directory}/endorsed/xercesImpl.jar${path.separator}${project.build.directory}/endorsed/resolver.jar${path.separator}${project.build.directory}/endorsed/serializer.jar${path.separator}${project.build.directory}/endorsed/xalan.jar -javaagent:${aspectjweaver}</argLine>
</configuration>
</plugin>
<plugin>
@@ -449,6 +470,12 @@
</exclusions>
</dependency>
<dependency>
+ <groupId>org.apache.rampart</groupId>
+ <artifactId>rampart-testutils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
<version>${axis2.version}</version>
diff --git a/modules/rampart-tests/pom.xml b/modules/rampart-tests/pom.xml
index 105f633..5901b3f 100644
--- a/modules/rampart-tests/pom.xml
+++ b/modules/rampart-tests/pom.xml
@@ -34,17 +34,10 @@
<packaging>jar</packaging>
<name>Rampart - Test Suite</name>
- <properties>
- <aspectj.version>1.8.2</aspectj.version>
- </properties>
-
<build>
<testSourceDirectory>src/test/java</testSourceDirectory>
<testResources>
<testResource>
- <directory>src/test/resources</directory>
- </testResource>
- <testResource>
<directory>test-resources</directory>
<includes>
<include>**/*.properties</include>
@@ -63,7 +56,6 @@
<plugin>
<groupId>com.github.veithen.alta</groupId>
<artifactId>alta-maven-plugin</artifactId>
- <version>0.6.2</version>
<executions>
<execution>
<goals>
@@ -76,7 +68,6 @@
<artifact>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
- <version>${aspectj.version}</version>
</artifact>
</artifacts>
</configuration>
@@ -109,6 +100,12 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.rampart</groupId>
+ <artifactId>rampart-testutils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
@@ -121,11 +118,5 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>${aspectj.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/modules/rampart-testutils/pom.xml b/modules/rampart-testutils/pom.xml
new file mode 100644
index 0000000..8f21704
--- /dev/null
+++ b/modules/rampart-testutils/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.rampart</groupId>
+ <artifactId>rampart-project</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>rampart-testutils</artifactId>
+ <packaging>jar</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/modules/rampart-tests/src/test/java/org/apache/rampart/FakeValidationDateAspect.java b/modules/rampart-testutils/src/main/java/org/apache/rampart/testutils/FakeValidationDateAspect.java
similarity index 97%
rename from modules/rampart-tests/src/test/java/org/apache/rampart/FakeValidationDateAspect.java
rename to modules/rampart-testutils/src/main/java/org/apache/rampart/testutils/FakeValidationDateAspect.java
index 469e3e8..da89b43 100644
--- a/modules/rampart-tests/src/test/java/org/apache/rampart/FakeValidationDateAspect.java
+++ b/modules/rampart-testutils/src/main/java/org/apache/rampart/testutils/FakeValidationDateAspect.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.rampart;
+package org.apache.rampart.testutils;
import java.security.cert.CertificateExpiredException;
import java.security.cert.CertificateNotYetValidException;
diff --git a/modules/rampart-tests/src/test/resources/META-INF/aop.xml b/modules/rampart-testutils/src/main/resources/META-INF/aop.xml
similarity index 92%
rename from modules/rampart-tests/src/test/resources/META-INF/aop.xml
rename to modules/rampart-testutils/src/main/resources/META-INF/aop.xml
index 6ef0d9a..735ef2d 100644
--- a/modules/rampart-tests/src/test/resources/META-INF/aop.xml
+++ b/modules/rampart-testutils/src/main/resources/META-INF/aop.xml
@@ -19,7 +19,7 @@
-->
<aspectj>
<aspects>
- <aspect name="org.apache.rampart.FakeValidationDateAspect"/>
+ <aspect name="org.apache.rampart.testutils.FakeValidationDateAspect"/>
</aspects>
<weaver options="-showWeaveInfo">
<include within="org.apache.rampart..*"/>
diff --git a/pom.xml b/pom.xml
index 0e7b7e4..560d031 100644
--- a/pom.xml
+++ b/pom.xml
@@ -194,6 +194,11 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
</plugin>
+ <plugin>
+ <groupId>com.github.veithen.alta</groupId>
+ <artifactId>alta-maven-plugin</artifactId>
+ <version>0.6.2</version>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
@@ -554,6 +559,17 @@
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
+
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>1.8.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjweaver</artifactId>
+ <version>1.8.2</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -608,6 +624,7 @@
<module>modules/rampart-trust-mar</module>
<module>modules/rampart-integration</module>
<module>modules/rampart-samples</module> <!-- Compile sample codes -->
+ <module>modules/rampart-testutils</module>
<module>modules/distribution</module>
<module>code-coverage</module>
</modules>