<?xml version="1.0" encoding="UTF-8"?>

<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>

	<groupId>com.neko233</groupId>
	<artifactId>jprotobuf</artifactId>
	<version>2.4.22</version>

	<name>jprotobuf</name>
	<description>A useful utility library for java programmer using google protobuf.</description>
	<url>https://github.com/SolarisNeko/neko233-jprotobuf-kotlin/</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<java.version>1.8</java.version>
		<junit.version>4.13.1</junit.version>
		<auto.value.version>1.0</auto.value.version>
	</properties>

	<developers>
		<developer>
			<name>SolarisNeko</name>
			<url>https://github.com/SolarisNeko</url>
		</developer>
	</developers>

	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/SolarisNeko/neko233-jprotobuf-kotlin/issues</url>
	</issueManagement>

	<scm>
		<connection>scm:git:git://github.com/SolarisNeko/neko233-jprotobuf-kotlin.git</connection>
		<developerConnection>scm:git:git@github.com:SolarisNeko/neko233-jprotobuf-kotlin.git</developerConnection>
		<url>https://github.com/SolarisNeko/neko233-jprotobuf-kotlin</url>
	</scm>

	<licenses>
		<license>
			<name>Apache 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<organization>
		<name>com.neko233</name>
		<url>www.neko233.com</url>
	</organization>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.google.protobuf</groupId>
			<artifactId>protobuf-java</artifactId>
			<version>3.21.7</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.google.auto.value</groupId>
			<artifactId>auto-value</artifactId>
			<version>${auto.value.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.baidu</groupId>
			<artifactId>jprotobuf-protoparser</artifactId>
			<version>1.0.1</version>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.26</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.7</version>
		</dependency>
		<!-- <dependency> <groupId>com.google.googlejavaformat</groupId> <artifactId>google-java-format</artifactId> 
			<version>1.3</version> </dependency> -->
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>com.baidu</groupId>
				<artifactId>jprotobuf-precompile-plugin</artifactId>
				<version>2.2.8</version>
				<configuration>
					<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
					<filterClassPackage>com.baidu</filterClassPackage>
				</configuration>
				<executions>
					<execution>
						<phase>compile</phase>
						<goals>
							<goal>precompile</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
					<archive>
						<manifest>
							<mainClass>com.baidu.bjf.remoting.protobuf.command.Main</mainClass>
						</manifest>
					</archive>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.12.4</version>
				<executions>
					<execution>
						<id>default-test</id>
						<phase>test</phase>
						<goals>
							<goal>test</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1</version>
				<configuration>
					<attach>true</attach>
				</configuration>
				<executions>
					<execution>
						<phase>compile</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9.1</version>
				<configuration>
					<aggregate>true</aggregate>
				</configuration>
				<executions>
					<execution>
						<phase>compile</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<additionalparam>-Xdoclint:none</additionalparam>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.0</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			
<!--			<plugin>-->
<!--				<artifactId>maven-deploy-plugin</artifactId>-->
<!--				<version>2.8.2</version>-->
<!--				<executions>-->
<!--					<execution>-->
<!--						<id>default-deploy</id>-->
<!--						<phase>deploy</phase>-->
<!--						<goals>-->
<!--							<goal>deploy</goal>-->
<!--						</goals>-->
<!--					</execution>-->
<!--				</executions>-->
<!--			</plugin>-->

			<!--   central发布插件    -->
			<plugin>
				<groupId>org.sonatype.central</groupId>
				<artifactId>central-publishing-maven-plugin</artifactId>
				<version>0.4.0</version>
				<extensions>true</extensions>
				<configuration>
					<publishingServerId>mavenCenter</publishingServerId>
					<tokenAuth>true</tokenAuth>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>