| <?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.logging.log4j</groupId> |
| <artifactId>log4j</artifactId> |
| <version>${revision}</version> |
| <relativePath>../log4j-parent</relativePath> |
| </parent> |
| |
| <artifactId>log4j-osgi-test</artifactId> |
| |
| <name>Apache Log4j OSGi tests</name> |
| <description>The Apache Log4j OSGi tests</description> |
| |
| <properties> |
| <log4j.docgen.skip>true</log4j.docgen.skip> |
| <module.name>org.apache.logging.log4j.osgi</module.name> |
| <bnd.baseline.skip>true</bnd.baseline.skip> |
| <maven.deploy.skip>true</maven.deploy.skip> |
| <maven.install.skip>true</maven.install.skip> |
| <sign.skip>true</sign.skip> |
| |
| <spotbugs.skip>true</spotbugs.skip> |
| |
| <!-- Fix the name of the package with `PluginService`, since it is also used in the code --> |
| <log4jPluginPackageForTests>org.apache.logging.log4j.osgi_test</log4jPluginPackageForTests> |
| |
| <!-- Dependency versions --> |
| <spifly.version>1.3.7</spifly.version> |
| <logback.version>1.5.12</logback.version> |
| </properties> |
| |
| <dependencyManagement> |
| <dependencies> |
| |
| <dependency> |
| <groupId>ch.qos.logback</groupId> |
| <artifactId>logback-classic</artifactId> |
| <version>${logback.version}</version> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.aries.spifly</groupId> |
| <artifactId>org.apache.aries.spifly.dynamic.bundle</artifactId> |
| <version>${spifly.version}</version> |
| </dependency> |
| |
| </dependencies> |
| </dependencyManagement> |
| |
| <dependencies> |
| |
| <dependency> |
| <groupId>javax.inject</groupId> |
| <artifactId>javax.inject</artifactId> |
| <version>1</version> |
| <scope>provided</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-api</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-api-test</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-core</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-plugins</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-to-jul</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-to-slf4j</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.junit.jupiter</groupId> |
| <artifactId>junit-jupiter-engine</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.junit.vintage</groupId> |
| <artifactId>junit-vintage-engine</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>ch.qos.logback</groupId> |
| <artifactId>logback-classic</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.aries.spifly</groupId> |
| <artifactId>org.apache.aries.spifly.dynamic.bundle</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.felix</groupId> |
| <artifactId>org.apache.felix.framework</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.eclipse.platform</groupId> |
| <artifactId>org.eclipse.osgi</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.ops4j.pax.exam</groupId> |
| <artifactId>pax-exam</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.ops4j.pax.exam</groupId> |
| <artifactId>pax-exam-container-native</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.ops4j.pax.exam</groupId> |
| <artifactId>pax-exam-junit4</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.ops4j.pax.exam</groupId> |
| <artifactId>pax-exam-link-assembly</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.ops4j.pax.exam</groupId> |
| <artifactId>pax-exam-spi</artifactId> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| |
| <testResources> |
| <testResource> |
| <!-- Enable variable interpolation in resources --> |
| <filtering>true</filtering> |
| <directory>src/test/resources</directory> |
| </testResource> |
| </testResources> |
| |
| <plugins> |
| |
| <!-- Disable randomisation of the package used by `PluginService`, |
| since it also must be referenced in the test code. --> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <version>3.6.0</version> |
| <executions> |
| <execution> |
| <id>define-log4jPluginPackageForTests</id> |
| <phase>none</phase> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- |
| ~ Unban Logback. |
| --> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-enforcer-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>ban-logging-dependencies</id> |
| <configuration> |
| <rules> |
| <bannedDependencies> |
| <includes> |
| <include>ch.qos.logback:*:*:*:test</include> |
| </includes> |
| </bannedDependencies> |
| </rules> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.ops4j.pax.exam</groupId> |
| <artifactId>exam-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <goals> |
| <goal>generate-link-files</goal> |
| </goals> |
| <phase>generate-test-resources</phase> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-resources-plugin</artifactId> |
| <configuration> |
| <!-- Property files must be encoded in ISO-8859-1 --> |
| <propertiesEncoding>ISO-8859-1</propertiesEncoding> |
| </configuration> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <configuration> |
| <classpathDependencyExcludes> |
| <exclude>org.osgi:org.osgi.framework</exclude> |
| </classpathDependencyExcludes> |
| <systemPropertyVariables> |
| <!-- PAX logging has a copy of Log4j2 API--> |
| <pax.exam.logging>false</pax.exam.logging> |
| <java.protocol.handler.pkgs>org.ops4j.pax.url</java.protocol.handler.pkgs> |
| <!-- Used in `osgi.properties --> |
| <felix.cache.rootdir>${project.build.directory}</felix.cache.rootdir> |
| </systemPropertyVariables> |
| <!-- Illegal access is disabled by default in Java 16 due to JEP-396. |
| We are relaxing it for tests. --> |
| <argLine>--add-opens java.base/java.net=ALL-UNNAMED</argLine> |
| </configuration> |
| <executions> |
| <!-- Split the Felix and Equinox tests to prevent classpath conflicts. |
| Both frameworks contain e.g. the `org.apache.felix.resolver` package. --> |
| <execution> |
| <id>default-test</id> |
| <phase>none</phase> |
| </execution> |
| <execution> |
| <id>test-equinox</id> |
| <goals> |
| <goal>test</goal> |
| </goals> |
| <configuration> |
| <classpathDependencyExcludes combine.children="append"> |
| <exclude>org.apache.felix:org.apache.felix.framework</exclude> |
| </classpathDependencyExcludes> |
| <excludes> |
| <exclude>org.apache.logging.log4j.osgi.tests.FelixLoadApiBundleTest</exclude> |
| </excludes> |
| </configuration> |
| </execution> |
| <execution> |
| <id>test-felix</id> |
| <goals> |
| <goal>test</goal> |
| </goals> |
| <configuration> |
| <classpathDependencyExcludes combine.children="append"> |
| <exclude>org.eclipse.platform:org.eclipse.osgi</exclude> |
| </classpathDependencyExcludes> |
| <excludes> |
| <exclude>org.apache.logging.log4j.osgi.tests.EquinoxLoadApiBundleTest</exclude> |
| </excludes> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| </plugins> |
| </build> |
| |
| </project> |