<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>org.thingsboard</groupId>
  <artifactId>protobuf-dynamic</artifactId>
  <packaging>jar</packaging>
  <version>1.0.2TB</version>
  <name>protobuf-dynamic</name>
  <url>https://github.com/os72/protobuf-dynamic</url>
  <description>Protocol Buffers Dynamic Schema</description>

  <parent>
	<groupId>org.sonatype.oss</groupId>
	<artifactId>oss-parent</artifactId>
	<version>9</version>
  </parent>

  <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>
  <scm>
      <connection>scm:git:git@github.com:thingsboard/protobuf-dynamic.git</connection>
      <developerConnection>scm:git:git@github.com:thingsboard/protobuf-dynamic.git</developerConnection>
      <url>git@github.com:thingsboard/protobuf-dynamic.git</url>
  </scm>
  <developers>
	<developer>
	  <id>os72</id>
	  <name>Oliver Suciu</name>
	</developer>
    <developer>
      <id>ShvaykaD</id>
      <name>Dmytro Shvaika</name>
      <email>dshvaika@thingsboard.io</email>
    </developer>
  </developers>
  <properties>
	<protobuf.version>3.11.4</protobuf.version>
	<slf4j.version>1.7.7</slf4j.version>
	<lombok.version>1.16.18</lombok.version>
	<junit.version>4.12</junit.version>
	<logback.version>1.2.3</logback.version>
  </properties>

  <dependencies>
	<!-- compile -->
	<dependency>
		<groupId>com.google.protobuf</groupId>
		<artifactId>protobuf-java</artifactId>
		<version>${protobuf.version}</version>
	</dependency>

	<!-- test -->
	<dependency>
		<groupId>junit</groupId>
		<artifactId>junit</artifactId>
		<version>${junit.version}</version>
		<scope>test</scope>
	</dependency>
	<dependency>
	  <groupId>ch.qos.logback</groupId>
	  <artifactId>logback-core</artifactId>
	  <version>${logback.version}</version>
	  <scope>test</scope>
	</dependency>
	<dependency>
	  <groupId>ch.qos.logback</groupId>
	  <artifactId>logback-classic</artifactId>
	  <version>${logback.version}</version>
	  <scope>test</scope>
	</dependency>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-api</artifactId>
		<version>${slf4j.version}</version>
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>org.projectlombok</groupId>
		<artifactId>lombok</artifactId>
		<version>${lombok.version}</version>
		<scope>test</scope>
	</dependency>
  </dependencies>

  <build>
	<plugins>
		<plugin>
			<groupId>com.github.os72</groupId>
			<artifactId>protoc-jar-maven-plugin</artifactId>
			<version>3.11.4</version>
			<executions>
				<execution>
					<phase>generate-test-sources</phase>
					<goals>
						<goal>run</goal>
					</goals>
					<configuration>
						<protocVersion>${protobuf.version}</protocVersion>
						<inputDirectories>
							<include>src/test/resources</include>
						</inputDirectories>
						<outputTargets>
							<outputTarget>
								<type>java</type>
								<addSources>none</addSources>
								<outputDirectory>src/test/java</outputDirectory>
							</outputTarget>
							<outputTarget>
								<type>descriptor</type>
								<addSources>none</addSources>
								<outputDirectory>src/test/resources</outputDirectory>
							</outputTarget>
						</outputTargets>
					</configuration>
				</execution>
			</executions>
		</plugin>
		<plugin>
		  <groupId>org.apache.maven.plugins</groupId>
		  <artifactId>maven-compiler-plugin</artifactId>
		  <version>3.0</version>
		  <configuration>
			<source>6</source>
			<target>6</target>
		  </configuration>
		</plugin>
		<plugin>
		  <groupId>org.apache.maven.plugins</groupId>
		  <artifactId>maven-jar-plugin</artifactId>
		  <configuration>
			<archive>
			  <manifestEntries>
				<Build-Id>${project.name}-${project.version}-${maven.build.timestamp}</Build-Id>
			  </manifestEntries>
			</archive>
		  </configuration>
		</plugin>
		<plugin>
		  <groupId>org.apache.maven.plugins</groupId>
		  <artifactId>maven-source-plugin</artifactId>
		  <executions>
			<execution>
			  <id>attach-sources</id>
				<goals>
				 <goal>jar</goal>
				</goals>
			</execution>
		  </executions>
		</plugin>
		<plugin>
		  <groupId>org.apache.maven.plugins</groupId>
		  <artifactId>maven-javadoc-plugin</artifactId>
		  <executions>
			<execution>
			  <id>attach-javadoc</id>
				<goals>
				 <goal>jar</goal>
				</goals>
			</execution>
		  </executions>
		</plugin>
	</plugins>
  </build>
  <distributionManagement>
      <repository>
          <id>bintray</id>
          <url>https://api.bintray.com/maven/thingsboard/thingsboard/protobuf-dynamic</url>
      </repository>
  </distributionManagement>
</project>
