This is an automated email from the ASF dual-hosted git repository.
buhhunyx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new bc1848e cxf-services-sts-systests-itests: reorganize test dependencies
bc1848e is described below
commit bc1848e5686a87355563e50dd12abfa38c84adaa
Author: Alexey Markevich <[email protected]>
AuthorDate: Fri Jan 31 13:48:51 2020 +0300
cxf-services-sts-systests-itests: reorganize test dependencies
---
parent/pom.xml | 5 --
services/sts/systests/pom.xml | 1 -
services/sts/systests/sts-features/pom.xml | 82 ----------------------
.../sts-features/src/main/resources/features.xml | 29 --------
services/sts/systests/sts-itests/pom.xml | 7 +-
.../sts/itests/BasicSTSIntegrationTest.java | 61 +++++++---------
6 files changed, 27 insertions(+), 158 deletions(-)
diff --git a/parent/pom.xml b/parent/pom.xml
index aca81b3..3227f6c 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -1175,11 +1175,6 @@
</dependency>
<dependency>
<groupId>org.apache.cxf.services.sts.systests</groupId>
- <artifactId>cxf-services-sts-systests-features</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf.services.sts.systests</groupId>
<artifactId>cxf-services-sts-systests-osgi</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/services/sts/systests/pom.xml b/services/sts/systests/pom.xml
index 5366829..8ba059d 100644
--- a/services/sts/systests/pom.xml
+++ b/services/sts/systests/pom.xml
@@ -33,7 +33,6 @@
<module>basic</module>
<module>advanced</module>
<module>sts-osgi</module>
- <module>sts-features</module>
<module>sts-itests</module>
</modules>
</project>
diff --git a/services/sts/systests/sts-features/pom.xml
b/services/sts/systests/sts-features/pom.xml
deleted file mode 100644
index e243e70..0000000
--- a/services/sts/systests/sts-features/pom.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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>
- <groupId>org.apache.cxf.services.sts.systests</groupId>
- <artifactId>cxf-services-sts-systests-features</artifactId>
-
- <packaging>pom</packaging>
- <name>Apache CXF STS test Karaf Features</name>
- <url>https://cxf.apache.org</url>
- <parent>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-parent</artifactId>
- <version>3.4.0-SNAPSHOT</version>
- <relativePath>../../../../parent/pom.xml</relativePath>
- </parent>
- <build>
- <resources>
- <resource>
- <directory>${project.basedir}/src/main/resources</directory>
- <filtering>true</filtering>
- <includes>
- <include>**/features.xml</include>
- <include>**/*.properties</include>
- </includes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>filter</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>resources</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <phase>package</phase>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <configuration>
- <artifacts>
- <artifact>
- <file>target/classes/features.xml</file>
- <type>xml</type>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/services/sts/systests/sts-features/src/main/resources/features.xml
b/services/sts/systests/sts-features/src/main/resources/features.xml
deleted file mode 100644
index 1ce63f5..0000000
--- a/services/sts/systests/sts-features/src/main/resources/features.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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.
--->
-<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0"
name="cxf-sts-osgi">
-
<repository>mvn:org.apache.cxf.karaf/apache-cxf/${project.version}/xml/features</repository>
- <feature name="cxf-sts-service" version="${project.version}">
- <feature>aries-blueprint</feature>
- <feature>cxf</feature>
- <feature>cxf-sts</feature>
-
<bundle>mvn:${project.groupId}/cxf-services-sts-systests-osgi/${project.version}</bundle>
- <bundle
start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xerces/${cxf.xerces.bundle.version}</bundle>
- </feature>
-</features>
diff --git a/services/sts/systests/sts-itests/pom.xml
b/services/sts/systests/sts-itests/pom.xml
index 7787af3..b192b6d 100644
--- a/services/sts/systests/sts-itests/pom.xml
+++ b/services/sts/systests/sts-itests/pom.xml
@@ -45,9 +45,7 @@
</dependency>
<dependency>
<groupId>org.apache.cxf.services.sts.systests</groupId>
- <artifactId>cxf-services-sts-systests-features</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
+ <artifactId>cxf-services-sts-systests-osgi</artifactId>
</dependency>
<dependency>
@@ -157,8 +155,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
-
<org.ops4j.pax.logging.DefaultServiceLog.level>WARN</org.ops4j.pax.logging.DefaultServiceLog.level>
- <localRepository>${maven.repo.local}</localRepository>
+
<maven.repo.local>${maven.repo.local}</maven.repo.local>
</systemPropertyVariables>
</configuration>
</plugin>
diff --git
a/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/BasicSTSIntegrationTest.java
b/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/BasicSTSIntegrationTest.java
index dfcd344..c11d0e0 100644
---
a/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/BasicSTSIntegrationTest.java
+++
b/services/sts/systests/sts-itests/src/test/java/org/apache/cxf/systest/sts/itests/BasicSTSIntegrationTest.java
@@ -27,12 +27,12 @@ import org.ops4j.pax.exam.MavenUtils;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.OptionUtils;
import org.ops4j.pax.exam.karaf.container.internal.JavaVersionUtil;
-import org.ops4j.pax.exam.options.MavenArtifactUrlReference;
import org.ops4j.pax.exam.options.extra.VMOption;
import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
import org.ops4j.pax.exam.spi.reactors.PerClass;
import static org.ops4j.pax.exam.CoreOptions.maven;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
import static org.ops4j.pax.exam.CoreOptions.when;
import static
org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureConsole;
@@ -44,45 +44,34 @@ import static
org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceCo
@ExamReactorStrategy(PerClass.class)
public class BasicSTSIntegrationTest {
- // Adding apache snapshots as cxf trunk may contain snapshot dependencies
-// private static final String REPOS =
"https://repo1.maven.org/maven2@id=central,"
-// +
"https://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases";
-
@Configuration
public Option[] getConfig() {
- String port = TestUtil.getPortNumber(BasicSTSIntegrationTest.class);
- System.setProperty("BasicSTSIntegrationTest.PORT", port);
-
- String localRepository = System.getProperty("localRepository");
-
- MavenArtifactUrlReference stsFeatures = maven() //
- .groupId("org.apache.cxf.services.sts.systests") //
- .artifactId("cxf-services-sts-systests-features") //
- .versionAsInProject() //
- .type("xml");
+ final String port =
TestUtil.getPortNumber(BasicSTSIntegrationTest.class);
+ final String localRepository = System.getProperty("maven.repo.local",
"");
final Option[] basicOptions = new Option[] {
- karafDistributionConfiguration()
- .frameworkUrl(
-
maven().groupId("org.apache.karaf").artifactId("apache-karaf-minimal").versionAsInProject()
- .type("tar.gz"))
- .unpackDirectory(new File("target/paxexam/"))
- .useDeployFolder(false),
- systemProperty("java.awt.headless").value("true"),
- systemProperty("BasicSTSIntegrationTest.PORT").value(port),
-// editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
-// "org.ops4j.pax.url.mvn.repositories", REPOS),
+ karafDistributionConfiguration()
+ .frameworkUrl(maven("org.apache.karaf",
"apache-karaf-minimal").versionAsInProject().type("tar.gz"))
+ .unpackDirectory(new File("target/paxexam/"))
+ .useDeployFolder(false),
+ configureConsole().ignoreLocalConsole().ignoreRemoteShell(),
+ systemProperty("java.awt.headless").value("true"),
+ systemProperty("BasicSTSIntegrationTest.PORT").value(port),
+ editConfigurationFilePut("etc/org.ops4j.pax.web.cfg",
+ "org.osgi.service.http.port", port),
+ when(!localRepository.isEmpty())
+
.useOptions(systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepository)),
+ //DO NOT COMMIT WITH THIS LINE ENABLED!!!
+ //KarafDistributionOption.keepRuntimeFolder(),
+ //KarafDistributionOption.debugConfiguration(), // nor this
+ //KarafDistributionOption.logLevel(LogLevelOption.LogLevel.INFO),
- copy("clientKeystore.properties"),
- copy("clientstore.jks"),
- editConfigurationFilePut("etc/org.ops4j.pax.web.cfg",
- "org.osgi.service.http.port", port),
- when(localRepository != null)
-
.useOptions(editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
-
"org.ops4j.pax.url.mvn.localRepository",
- localRepository)),
- features(stsFeatures, "cxf-sts-service"),
- configureConsole().ignoreLocalConsole().ignoreRemoteShell(),
+ features(
+ maven("org.apache.cxf.karaf",
"apache-cxf").versionAsInProject().type("xml").classifier("features"),
+ "aries-blueprint", "cxf-jaxws", "cxf-sts"),
+ mavenBundle("org.apache.cxf.services.sts.systests",
"cxf-services-sts-systests-osgi").versionAsInProject(),
+ copy("clientKeystore.properties"),
+ copy("clientstore.jks")
};
if (JavaVersionUtil.getMajorVersion() >= 9) {
final String karafVersion =
MavenUtils.getArtifactVersion("org.apache.karaf", "apache-karaf-minimal");
@@ -114,7 +103,7 @@ public class BasicSTSIntegrationTest {
return basicOptions;
}
- protected static Option copy(String path) {
+ private static Option copy(String path) {
return replaceConfigurationFile(path, new File("src/test/resources/" +
path));
}