<?xml version="1.0"?>
<!-- Copyright 2005-2007 Open Source Applications Foundation Licensed 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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>net.oneandone.cosmo</groupId>
	<artifactId>cosmo-multimodule</artifactId>
	<version>7.0.2</version>
	<packaging>pom</packaging>
	<name>cosmo-multimodule</name>
	<description>CalDAV core implementation server</description>
    <url>http://1and1.github.io/foss-parent</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		
		<maven.compiler.target>17</maven.compiler.target>
		<maven.compiler.source>17</maven.compiler.source>
			
		<qxlint.report.profile>false</qxlint.report.profile>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		
		<spring.boot.version>3.3.1</spring.boot.version>		
						
		<jackrabbit.version>3.0.1</jackrabbit.version>
		<ical4j.version>3.2.14</ical4j.version>
			
		<aspectjweaver.version>1.9.22.1</aspectjweaver.version>

		<mariadb.version>3.4.0</mariadb.version>		
		<xerces.version>2.12.2</xerces.version>
		<dom4j.version>1.6.1</dom4j.version>
		<stax.version>1.0.1</stax.version>
		<woodstox.version>4.0.6</woodstox.version>
		
		<jackson.version>2.17.2</jackson.version>
		<abdera.version>1.1.3</abdera.version>
		<junit.version>5.10.3</junit.version>
		
		<!-- Deactivate checkstyle, findbugs, jacoco and pmd -->
		<checkstyle.skip>true</checkstyle.skip>
		<spotbugs.skip>true</spotbugs.skip>
		<pmd.skip>true</pmd.skip>
		<cpd.skip>true</cpd.skip>
		<enforcer.skip>true</enforcer.skip>
		<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
		<jacoco.skip>true</jacoco.skip>
		
		<!-- Overwrite for java 17 -->
                <spotbugs-maven-plugin.version>4.7.3.4</spotbugs-maven-plugin.version>
                <maven-dependency-plugin.version>3.6.0</maven-dependency-plugin.version>
                <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
                <maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
                <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
                <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
                <maven-license-plugin.version>3.0</maven-license-plugin.version>
                <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
                <maven-checkstyle-plugin.version>3.4.0</maven-checkstyle-plugin.version>
                <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
		
	</properties>

	<modules>
		<module>cosmo-api</module>
		<module>cosmo-core</module>
	</modules>

	<dependencyManagement>
		<dependencies>
			
			<dependency>
				<!-- Import dependency management from Spring Boot -->
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${spring.boot.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
						

			<!-- XML & co. -->
			<dependency>
				<groupId>dom4j</groupId>
				<artifactId>dom4j</artifactId>
				<version>${dom4j.version}</version>
				<exclusions>
					<exclusion>
						<artifactId>xml-apis</artifactId>
						<groupId>xml-apis</groupId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>stax</groupId>
				<artifactId>stax-api</artifactId>
				<version>${stax.version}</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.woodstox</groupId>
				<artifactId>wstx-asl</artifactId>
				<version>${woodstox.version}</version>
			</dependency>

			<!-- database drivers -->
			<dependency>
				<groupId>org.mariadb.jdbc</groupId>
				<artifactId>mariadb-java-client</artifactId>
				<version>${mariadb.version}</version>
			</dependency>
			
			<dependency>
			    <groupId>dev.atchison.mariaDB4j</groupId>
			    <artifactId>mariaDB4j</artifactId>
			    <scope>test</scope>
			    <version>2.7.2</version>
			</dependency>
			
			<dependency>
			    <groupId>dev.atchison.mariaDB4j</groupId>
			    <artifactId>mariaDB4j-db-linux64</artifactId>
			    <scope>test</scope>
			    <version>10.6.12</version>
			</dependency>

			<!-- ical4j related libs -->
			<dependency>
				<groupId>org.mnode.ical4j</groupId>
				<artifactId>ical4j</artifactId>
				<version>${ical4j.version}</version>
				<exclusions>
					<exclusion>
						<artifactId>commons-logging</artifactId>
						<groupId>commons-logging</groupId>
					</exclusion>
					<exclusion>
						<groupId>org.slf4j</groupId>						
						<artifactId>slf4j-log4j12</artifactId>						
					</exclusion>
					<exclusion>
					        <groupId>commons-codec</groupId>
         					<artifactId>commons-codec</artifactId>
	        			</exclusion>
				</exclusions>
			</dependency>
			
			<dependency>
				<groupId>net.oneandone</groupId>
				<artifactId>jackrabbit-webdav</artifactId>
				<version>${jackrabbit.version}</version>
				<exclusions>
				    <exclusion>
				        <groupId>commons-codec</groupId>
				        <artifactId>commons-codec</artifactId>
				    </exclusion>
				    <exclusion>
				        <groupId>org.slf4j</groupId>
				        <artifactId>jcl-over-slf4j</artifactId>
				    </exclusion>
				</exclusions>
			</dependency>
									
			<dependency>
				<groupId>org.aspectj</groupId>
				<artifactId>aspectjweaver</artifactId>
				<version>${aspectjweaver.version}</version>
			</dependency>
			
			<dependency>
				<groupId>xerces</groupId>
				<artifactId>xercesImpl</artifactId>
				<version>${xerces.version}</version>
				<exclusions>
					<exclusion>
						<artifactId>xml-apis</artifactId>
						<groupId>xml-apis</groupId>
					</exclusion>
				</exclusions>
			</dependency>

			<!-- OTHER -->

			<!-- abdera is the ATOM implementation. This library is still used for 
				parsing eTags. -->
			<dependency>
				<groupId>org.apache.abdera</groupId>
				<artifactId>abdera-core</artifactId>
				<version>${abdera.version}</version>
				<exclusions>
					<exclusion>
						<artifactId>commons-logging</artifactId>
						<groupId>commons-logging</groupId>
					</exclusion>
					<exclusion>
                        			<groupId>commons-codec</groupId>
                        			<artifactId>commons-codec</artifactId>
                    			</exclusion>
					<exclusion>
						<groupId>org.apache.geronimo.specs</groupId>
						<artifactId>geronimo-activation_1.1_spec</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.apache.geronimo.specs</groupId>
						<artifactId>geronimo-stax-api_1.0_spec</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.apache.abdera</groupId>
				<artifactId>abdera-i18n</artifactId>
				<version>${abdera.version}</version>
				<exclusions>
					<exclusion>
						<artifactId>commons-logging</artifactId>
						<groupId>commons-logging</groupId>
					</exclusion>
					<exclusion>
                        			<groupId>commons-codec</groupId>
                        			<artifactId>commons-codec</artifactId>
                    			</exclusion>
					<exclusion>
						<groupId>org.apache.geronimo.specs</groupId>
						<artifactId>geronimo-activation_1.1_spec</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
						
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-core</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-databind</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			
			<dependency>
                		<groupId>org.apache.commons</groupId>
                		<artifactId>commons-text</artifactId>
                		<version>1.12.0</version>           
            		</dependency>
           		<dependency>
                		<groupId>commons-io</groupId>
                		<artifactId>commons-io</artifactId>
                		<version>2.16.1</version>
           		</dependency>
		
			<!-- Test -->
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>

		</dependencies>
	</dependencyManagement>	

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>${maven-checkstyle-plugin.version}</version>
				<configuration>
					<failOnViolation>true</failOnViolation>
					<configLocation>checkstyle-suppressions.xml</configLocation>
				</configuration>
			</plugin>

			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>${maven-license-plugin.version}</version>
				<configuration>
					<header>${maven-license-plugin.header}</header>
					<strictCheck>false</strictCheck>
					<failIfMissing>false</failIfMissing>
					<failIfUnknown>false</failIfUnknown>
					<includes>
						<include>src/**/*.java</include>
					</includes>
					<mapping>
						<java>SLASHSTAR_STYLE</java>
					</mapping>
				</configuration>				
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<configuration>
					<doclint>none</doclint>
					<quiet>true</quiet>					
				</configuration>
			</plugin>
			
			<plugin>
			    <groupId>org.apache.maven.plugins</groupId>
			    <artifactId>maven-compiler-plugin</artifactId>
			    <version>${maven-compiler-plugin.version}</version>            
			    <configuration>
				    <!-- Needed FOR AspectJ to work when importing cosmo jars -->
				    <parameters>true</parameters>
				    <testCompilerArgument>-parameters</testCompilerArgument>                
			     </configuration>
			 </plugin>
			 <plugin>
                		<groupId>org.apache.maven.plugins</groupId>
                		<artifactId>maven-gpg-plugin</artifactId>
                		<version>${maven-gpg-plugin.version}</version>
             		</plugin>
             
		     	<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>${maven-release-plugin.version}</version>
				<inherited>true</inherited>
				<configuration>
			  	  <!-- Workaround for passphrse prompting in gpg-plugin,
			  	  http://jira.codehaus.org/browse/MRELEASE-263
			  	  http://jira.codehaus.org/browse/MGPG-9
			  	  -->
			  	  	<mavenExecutorId>forked-path</mavenExecutorId>
			    		<autoVersionSubmodules>true</autoVersionSubmodules>
				</configuration>
		    </plugin>
                     
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<configuration>
					<failOnViolation>false</failOnViolation>
					<configLocation>checkstyle-suppressions.xml</configLocation>
				</configuration>
			</plugin>			
		</plugins>
	</reporting>

	<scm>
		<developerConnection>scm:git:ssh://git@github.com/1and1/cosmo.git</developerConnection>
		<connection>scm:git:ssh://git@github.com/1and1/cosmo.git</connection>
		<url>https://github.com/1and1/</url>
		<tag>cosmo-multimodule-7.0.2</tag>
	</scm>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>danielgrigore</id>
            <name>Daniel Grigore</name>
            <organization>1 &amp; 1 Internet AG</organization>
            <organizationUrl>${project.url}</organizationUrl>
            <url>https://github.com/danielgrigore</url>
            <timezone>+1</timezone>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>   
	
		
</project>
