| <?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> |
| <packaging>jar</packaging> |
| <name>Apache Log4j OSGi tests</name> |
| <description>The Apache Log4j OSGi tests</description> |
| <properties> |
| <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> |
| <spifly.version>1.3.7</spifly.version> |
| </properties> |
| <dependencies> |
| <dependency> |
| <groupId>javax.inject</groupId> |
| <artifactId>javax.inject</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.osgi</groupId> |
| <artifactId>org.osgi.core</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-1.2-api</artifactId> |
| <scope>test</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-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> |
| <version>${spifly.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.felix</groupId> |
| <artifactId>org.apache.felix.framework</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.tycho</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> |
| |
| <!-- |
| ~ 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-compiler-plugin</artifactId> |
| <configuration> |
| <!-- |
| ~ Modules that contain `log4j-core` plugins, must be compiled with: |
| ~ |
| ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor |
| --> |
| <annotationProcessorPaths combine.children="append"> |
| <path> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-core</artifactId> |
| <version>${project.version}</version> |
| </path> |
| </annotationProcessorPaths> |
| </configuration> |
| </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>org.osgi:org.osgi.core</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> |
| </configuration> |
| </plugin> |
| |
| <!-- Exclude `felix-cache` from `apache-rat-plugin` checks --> |
| <plugin> |
| <groupId>org.apache.rat</groupId> |
| <artifactId>apache-rat-plugin</artifactId> |
| <configuration> |
| <excludes combine.children="append"> |
| <exclude>felix-cache/**/*</exclude> |
| </excludes> |
| </configuration> |
| </plugin> |
| |
| </plugins> |
| </build> |
| |
| <profiles> |
| |
| <!-- Fixes incompatible with Java 8 --> |
| <profile> |
| |
| <id>java8-incompat-fixes</id> |
| |
| <!-- CI uses Java 8 for running tests. |
| Hence, we assume CI=Java8 and apply our changes elsewhere. |
| |
| One might think why not activate using `<jdk>[16,)` instead? |
| This doesn't work, since the match is not against "the JDK running tests", but "the JDK running Maven". |
| These two JDKs can differ due to Maven Toolchains. |
| See `java8-tests` profile in `/pom.xml` for details. --> |
| <activation> |
| <property> |
| <name>!env.CI</name> |
| </property> |
| </activation> |
| |
| <!-- Illegal access is disabled by default in Java 16 due to JEP-396. |
| We are relaxing it for tests. --> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <configuration> |
| <argLine>--add-opens java.base/java.net=ALL-UNNAMED</argLine> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| |
| </profile> |
| |
| </profiles> |
| |
| </project> |