<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>

	<artifactId>de.rcenvironment.modules.repository.intermediate</artifactId>
	<name>RCE Module ${project.artifactId}</name>
	<packaging>eclipse-repository</packaging>

	<parent>
		<groupId>de.rcenvironment</groupId>
		<artifactId>de.rcenvironment.maven.parent.productModule</artifactId>
		<version>1.0.0</version>
		<relativePath>../../parent/productModule</relativePath>
	</parent>

	<build>
		<plugins>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-p2-repository-plugin</artifactId>
				<configuration>
					<includeAllDependencies>true</includeAllDependencies>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>verify-absence-of-legacy-commons-logging</id>
						<phase>package</phase>
						<configuration>
							<tasks>
								<!-- Validates that a certain legacy JAR is not present in the build's repository.
									This JAR is included in standard RCP repository scopes as a transitive dependency 
									of one or more Eclipse RCP feature(s). Besides potentially containing security 
									issues, this bundle is particularly problematic because other bundles may 
									be wired to it as their log output receiver, leading to log messages being 
									lost outside our logging setup (MANTIS ID 0017862). The solution for this is our
									"org.apache.commons.logging.placeholder" bundle, which should have been provided
									by the "rce-third-party" repository. (misc_ro, Nov 2022) -->
								<available file="${project.build.directory}/repository/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar"
									property="isLegacyCommonsLoggingJarPresent" />
								<fail if="isLegacyCommonsLoggingJarPresent" 
									message="org.apache.commons.logging_1.1.1.v201101211721.jar should not be present in the build's repository" />
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
					<execution>
						<id>generate-version-file</id>
						<phase>package</phase>
						<configuration>
							<tasks>
								<!-- Generate a VERSION file inside the repository directory -->
								<echo file="${project.build.directory}/repository/VERSION" message="${qualifiedVersion}"/>
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>
