<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/xsd/maven-4.0.0.xsd">
 <organization>
  	<name>Plattform GmbH</name>
  	<url>http://www.plattform-gmbh.de</url>
  </organization>
  
  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.5.5</version>
    <relativePath/> <!-- lookup parent from repository -->
  </parent>
  
  <modelVersion>4.0.0</modelVersion>
  <groupId>kos.wdc</groupId>
  <artifactId>wdc</artifactId>
  <!-- https://maven.apache.org/maven-ci-friendly.html -->
  <!-- https://www.mojohaus.org/flatten-maven-plugin/examples/example-central-version.html -->
  <version>${revision}</version>
  
  <properties>
    <skipTests>false</skipTests>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>21</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    
    <revision>0.90-SNAPSHOT</revision>
    
    <!-- Heap-Size for Tests -->
    <!-- Kann verwendet werden, um die Testfälle zu "stressen" -->
    <!-- ./mvnw -tests.maxHeap=256m .... -->
    <tests.maxHeap>2g</tests.maxHeap>
    
    <!-- Plugins -->
    <exec-maven-plugin.version>3.6.1</exec-maven-plugin.version>
  </properties>
  
  <packaging>pom</packaging>
  
  <modules>
   	<module>wdc-commons</module>
    <module>wdc-crawler3</module>
    <!-- Reihenfolge! package von *-python erstellt die Doku, die 
         dann bei wdc-rest-api wieder reinkopiert wird. 
    -->
    <module>wdc-rest-api-python</module>
    <module>wdc-rest-api</module>
    <module>wdc-dist</module>
    
    <!-- Tests -->
    
    <!-- Legacy -->
	<module>wdc-projects</module>
  </modules>
  
  <dependencies>
  	
  </dependencies>
  
  <build>
  	<plugins>
  		<plugin>
	        <groupId>org.apache.maven.plugins</groupId>
	        <artifactId>maven-surefire-plugin</artifactId>
	        <configuration>
	        	<systemProperties>
            		<wdc.baseDir>${wdc.baseDir}</wdc.baseDir>
					<wdc.restapi.authorization>${wdc.restapi.authorization}</wdc.restapi.authorization>
            	</systemProperties>
	        
			  	<skipTests>${skipTests}</skipTests>
			  	<failIfNoTests>false</failIfNoTests>
			  	<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
			  	<trimStackTrace>false</trimStackTrace>
			  	
	            <runOrder>alphabetical</runOrder>
                <forkCount>1</forkCount>
                <argLine>-Xms${tests.maxHeap} -Xmx${tests.maxHeap} -XX:+EnableDynamicAgentLoading</argLine>
			</configuration>
      </plugin>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
    	<artifactId>maven-toolchains-plugin</artifactId>
    	<version>3.2.0</version>
	    <executions>
	      	<execution>
	        	<goals>
	          		<goal>toolchain</goal>
	        	</goals>
	      	</execution>
	    </executions>
    	<configuration>
      		<toolchains>
       			<jdk><version>${maven.compiler.source}</version></jdk>
     	 	</toolchains>
    	</configuration>
      </plugin>
      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
           <!-- https://inside.java/2023/10/23/quality-heads-up/ -->
           <!-- `-proc:only`: Explicitly enable annotation processing. -->
           <compilerArgument>-proc:full</compilerArgument>
        </configuration>
       </plugin>
      
	  <plugin>
	  	<groupId>org.springframework.boot</groupId>
	    <artifactId>spring-boot-maven-plugin</artifactId>
	    <configuration>
	    	<skip>true</skip>
        </configuration>
     </plugin>
     
     <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>flatten-maven-plugin</artifactId>
      <version>1.6.0</version>
      <configuration>
        <!-- <updatePomFile>true</updatePomFile>
        <flattenMode>resolveCiFriendliesOnly</flattenMode> -->
      </configuration>
      <executions>
        <execution>
          <id>flatten</id>
          <phase>process-resources</phase>
          <goals>
            <goal>flatten</goal>
          </goals>
        </execution>
        <execution>
          <id>flatten.clean</id>
          <phase>clean</phase>
          <goals>
            <goal>clean</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
     
	  <plugin>
		<groupId>org.apache.maven.plugins</groupId>
	  		<artifactId>maven-checkstyle-plugin</artifactId>
	   		<version>3.3.1</version>
			<dependencies>
	            <dependency>
	              <groupId>com.puppycrawl.tools</groupId>
	              <artifactId>checkstyle</artifactId>
	              <version>10.15.0</version>
	            </dependency>
	          </dependencies>
	   		<configuration>
	     		<configLocation>checkstyle.xml</configLocation>
			    <consoleOutput>true</consoleOutput>
			    <failsOnError>false</failsOnError>
			    <linkXRef>false</linkXRef>
			</configuration>
		</plugin>
	</plugins>
  	<pluginManagement>
  		<plugins>
  			<plugin>
        		<groupId>org.codehaus.mojo</groupId>
       			<artifactId>exec-maven-plugin</artifactId>
       			<version>${exec-maven-plugin.version}</version>
       			<configuration>
       				<skip>true</skip>
       			</configuration>
  			</plugin>
  		
  			<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
  			<plugin>
  				<groupId>org.eclipse.m2e</groupId>
  				<artifactId>lifecycle-mapping</artifactId>
  				<version>1.0.0</version>
  				<configuration>
  					<lifecycleMappingMetadata>
  						<pluginExecutions>
  							<pluginExecution>
  								<pluginExecutionFilter>
  									<groupId>
  										org.codehaus.mojo
  									</groupId>
  									<artifactId>
  										flatten-maven-plugin
  									</artifactId>
  									<versionRange>
  										[1.1.0,)
  									</versionRange>
  									<goals>
  										<goal>flatten</goal>
  									</goals>
  								</pluginExecutionFilter>
  								<action>
  									<ignore></ignore>
  								</action>
  							</pluginExecution>
  						</pluginExecutions>
  					</lifecycleMappingMetadata>
  				</configuration>
  			</plugin>
  		</plugins>
  	</pluginManagement>
  </build>
  
  
  	<profiles>
  		<profile>
  			<id>vagrant-dev</id>
  			<activation>
  				<activeByDefault>true</activeByDefault>
  			</activation>
  			<properties>
				<wdc.baseDir>/vagrant</wdc.baseDir>
				<wdc.restapi.authorization>false</wdc.restapi.authorization>
			</properties>
  		</profile>
		
   		<!-- Warnungen für m2e ignorieren, wenn Maven direkt verwendet wird. -->
   		<!-- https://stackoverflow.com/questions/7905501/get-rid-of-pom-not-found-warning-for-org-eclipse-m2elifecycle-mapping -->
	   	<profile>
	   		<id>only-eclipse</id>
	  		<activation>
	    		<property>
	      			<name>m2e.version</name>
	    		</property>
	  		</activation>
	  		<build>
		  	<pluginManagement>
		      	<plugins>
		  			<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
		  			<plugin>
		  				<groupId>org.eclipse.m2e</groupId>
		  				<artifactId>lifecycle-mapping</artifactId>
		  				<version>1.0.0</version>
		  				<configuration>
		  					<lifecycleMappingMetadata>
		  						<pluginExecutions>
		  							<pluginExecution>
		  								<pluginExecutionFilter>
		  									<groupId>
		  										org.apache.maven.plugins
		  									</groupId>
		  									<artifactId>
		  										maven-toolchains-plugin
		  									</artifactId>
		  									<versionRange>
		  										[3.0.0,)
		  									</versionRange>
		  									<goals>
		  										<goal>toolchain</goal>
		  									</goals>
		  								</pluginExecutionFilter>
		  								<action>
		  									<ignore></ignore>
		  								</action>
		  							</pluginExecution>
		  						</pluginExecutions>
		  					</lifecycleMappingMetadata>
		  				</configuration>
		  			</plugin>
		  		</plugins>
		  	</pluginManagement>
		  </build>
	</profile>
   </profiles>
   
   	<repositories>
		<repository>
			<id>gitea</id>
			<url>https://gitea.plattform-gmbh.de/api/packages/PlattformGmbH/maven</url>
		</repository>
	</repositories>
	<distributionManagement>
		<repository>
			<id>gitea</id>
			<url>https://gitea.plattform-gmbh.de/api/packages/PlattformGmbH/maven</url>
		</repository>
		<snapshotRepository>
			<id>gitea</id>
			<url>https://gitea.plattform-gmbh.de/api/packages/PlattformGmbH/maven</url>
		</snapshotRepository>
	</distributionManagement>
</project>
