<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You 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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.apache</groupId>
        <artifactId>apache</artifactId>
        <version>21</version>
    </parent>

    <groupId>org.apache.dubbo</groupId>
    <artifactId>dubbo-compiler</artifactId>
    <version>0.0.1</version>

    <packaging>jar</packaging>

    <properties>
        <maven_compiler_version>3.6.0</maven_compiler_version>
        <maven_jar_version>3.0.2</maven_jar_version>
        <maven_source_version>3.0.1</maven_source_version>
        <maven_javadoc_version>3.0.1</maven_javadoc_version>
        <java_source_version>1.8</java_source_version>
        <java_target_version>1.8</java_target_version>
        <file_encoding>UTF-8</file_encoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.salesforce.servicelibs</groupId>
            <artifactId>grpc-contrib</artifactId>
            <version>0.8.1</version>
        </dependency>
        <dependency>
            <groupId>com.salesforce.servicelibs</groupId>
            <artifactId>jprotoc</artifactId>
            <version>0.9.1</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven_compiler_version}</version>
                <configuration>
                    <compilerArgument>-proc:none</compilerArgument>
                    <fork>true</fork>
                    <source>${java_source_version}</source>
                    <target>${java_target_version}</target>
                    <encoding>${file_encoding}</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven_jar_version}</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>org.apache.dubbo.gen.grpc.DubboGrpcGenerator</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <!-- Optional, used to build directly executable packages (without using 'java -jar'),
            for example 'artifactId-1.0.0-osx-x86_64.exe', 'artifactId-1.0.0-osx-x86_64.exe' -->
            <plugin>
                <groupId>com.salesforce.servicelibs</groupId>
                <artifactId>canteen-maven-plugin</artifactId>
                <version>1.0.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>bootstrap</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <properties>
                <log4j2_version>2.17.2</log4j2_version>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven_source_version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven_javadoc_version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <goals>
                                    <goal>jar</goal>
                                    <goal>aggregate</goal>
                                </goals>
                                <configuration>
                                    <additionalDependencies>
                                        <additionalDependency>
                                            <groupId>org.apache.logging.log4j</groupId>
                                            <artifactId>log4j-api</artifactId>
                                            <version>${log4j2_version}</version>
                                        </additionalDependency>
                                        <additionalDependency>
                                            <groupId>org.apache.logging.log4j</groupId>
                                            <artifactId>log4j-core</artifactId>
                                            <version>${log4j2_version}</version>
                                        </additionalDependency>
                                    </additionalDependencies>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <show>public</show>
                            <charset>UTF-8</charset>
                            <encoding>UTF-8</encoding>
                            <docencoding>UTF-8</docencoding>
                            <links>
                                <link>http://docs.oracle.com/javase/8/docs/api</link>
                            </links>
                            <doclint>none</doclint>
                            <excludePackageNames>
                                org.apache.dubbo.demo,org.apache.dubbo.demo.*
                            </excludePackageNames>
                            <doctitle>Apache Dubbo ${project.version} API</doctitle>
                            <windowtitle>Apache Dubbo ${project.version} API</windowtitle>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <name>dubbo-compiler</name>
    <description>Dubbo customized RPC stub compiler.</description>
    <url>https://github.com/apache/dubbo</url>
    <inceptionYear>2011</inceptionYear>
    <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/apache/dubbo</url>
        <connection>scm:git:https://github.com/apache/dubbo.git</connection>
        <developerConnection>scm:git:https://github.com/apache/dubbo.git</developerConnection>
        <tag>HEAD</tag>
    </scm>
    <mailingLists>
        <mailingList>
            <name>Development List</name>
            <subscribe>dev-subscribe@dubbo.apache.org</subscribe>
            <unsubscribe>dev-unsubscribe@dubbo.apache.org</unsubscribe>
            <post>dev@dubbo.apache.org</post>
        </mailingList>
        <mailingList>
            <name>Commits List</name>
            <subscribe>commits-subscribe@dubbo.apache.org</subscribe>
            <unsubscribe>commits-unsubscribe@dubbo.apache.org</unsubscribe>
            <post>commits@dubbo.apache.org</post>
        </mailingList>
        <mailingList>
            <name>Issues List</name>
            <subscribe>issues-subscribe@dubbo.apache.org</subscribe>
            <unsubscribe>issues-unsubscribe@dubbo.apache.org</unsubscribe>
            <post>issues@dubbo.apache.org</post>
        </mailingList>
    </mailingLists>
    <developers>
        <developer>
            <id>dubbo.io</id>
            <name>The Dubbo Project Contributors</name>
            <email>dev-subscribe@dubbo.apache.org</email>
            <url>http://dubbo.apache.org/</url>
        </developer>
    </developers>

    <organization>
        <name>The Apache Software Foundation</name>
        <url>http://www.apache.org/</url>
    </organization>

    <issueManagement>
        <system>Github Issues</system>
        <url>https://github.com/apache/dubbo/issues</url>
    </issueManagement>
</project>
