<!--

    Copyright © 2023 JAdaptive Limited (support@jadaptive.com)

    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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.sshtools</groupId>
    <artifactId>jini</artifactId>
   	<version>0.5.5</version>
    <name>Jini - Java INI file reader and writer</name>
    <packaging>pom</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<build.projectProperties>${basedir}/jadaptive.build.properties</build.projectProperties>
		<build.userProperties>${user.home}/.jadaptive.build.properties</build.userProperties>
		<build.quietProperties>true</build.quietProperties>
    </properties>
    <developers>
        <developer>
            <id>brett</id>
            <email>brett@logonbox.com</email>
        </developer>
    </developers>
    <organization>
        <name>JAdaptive</name>
        <url>https://jadaptive.com</url>
    </organization>
    <inceptionYear>2023</inceptionYear>
    <url>https://github.com/sshtools/jini</url>
    <description>
        Read and write INI type files.
    </description>
    <licenses>
        <license>
            <name>Apache License Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/sshtools/jini</url>
        <connection>scm:git:https://github.com/sshtools/jini.git</connection>
    </scm>
    <modules>
        <module>lib</module>
        <module>prefs</module>
        <module>schema</module>
        <module>config</module>
        <module>serialization</module>
    </modules>
    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.9.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
		 	<plugin>
          		<groupId>org.sonatype.central</groupId>
          		<artifactId>central-publishing-maven-plugin</artifactId>
        	</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>properties-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>initialize</phase>
						<goals>
							<goal>read-project-properties</goal>
						</goals>
						<configuration>
							<quiet>${build.quietProperties}</quiet>
							<files>
								<file>${build.projectProperties}</file>
								<file>${build.userProperties}</file>
							</files>
						</configuration>
					</execution>
				</executions>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<release>11</release>
					<testRelease>11</testRelease>
				</configuration>
			</plugin>
			
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <excludes>
                        <exclude>**/INI$LinkedCaseInsensitiveMap*</exclude>
                    </excludes>
                </configuration>
            </plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
						<phase>package</phase>
					</execution>
				</executions>
			</plugin>
        </plugins>
        <pluginManagement>
            <plugins>
			 	<plugin>
	          		<groupId>org.sonatype.central</groupId>
	          		<artifactId>central-publishing-maven-plugin</artifactId>
	          		<version>0.8.0</version>
	          		<extensions>true</extensions>
	          		<configuration>
	            		<publishingServerId>central-sshtools</publishingServerId>
	          		</configuration>
	        	</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>properties-maven-plugin</artifactId>
    				<version>1.2.1</version>
				</plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.10</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M8</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
					<version>3.3.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.11.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
					<version>3.3.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ant-plugin</artifactId>
                    <version>2.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
    				<version>3.6.3</version>
                    <executions>
                        <execution>
                            <id>javadoc-jar</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
       					<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                        <encoding>UTF-8</encoding>
                        <detectJavaApiLink>false</detectJavaApiLink>
                        <source>11</source>
                        <doclint>none</doclint>
                        <sourcepath>src/main/java</sourcepath>
                        <includeDependencySources>false</includeDependencySources>
                        <dependencySourceIncludes>
                            <dependencySourceInclude>com.sshtools:*</dependencySourceInclude>
                        </dependencySourceIncludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
					<version>3.1.0</version>
                    <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>
                    <version>2.3</version>
                    <configuration>
                        <header>src/templates/APACHE-2.txt</header>
                        <properties>
                            <owner>JAdaptive Limited</owner>
                            <email>support@jadaptive.com</email>
                        </properties>
                        <excludes>
                            <exclude>**/README</exclude>
                            <exclude>src/test/resources/**</exclude>
                            <exclude>src/main/resources/**</exclude>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                                <goal>format</goal>
                                <goal>remove</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <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>org.sonatype.central</groupId>
		          		<artifactId>central-publishing-maven-plugin</artifactId>
			        </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
        </plugins>
    </reporting>
</project>
