郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?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/xsd/maven-4.0.0.xsd">
 
    <modelVersion>4.0.0</modelVersion>
 
    <artifactId>account-rpc-api</artifactId>
    <groupId>com.gkhy.safePlatfrom</groupId>
    <version>1.0-SNAPSHOT</version>
 
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
    </properties>
 
    <dependencies>
        <dependency>
            <groupId>com.gkhy.safePlatfrom</groupId>
            <artifactId>commons</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>2.13.2</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
 
    <distributionManagement>
        <!--稳定版本的仓库地址,必须是允许上传的私服地址-->
        <repository>
            <id>nexus-gkhy-releases</id>
            <url>http://121.239.169.27:28080/repository/guotai-release/</url>
        </repository>
        <!--开发版本的仓库地址,必须是允许上传的私服地址-->
        <snapshotRepository>
            <id>nexus-gkhy-snapshots</id>
            <url>http://121.239.169.27:28080/repository/guotai-snapshot/</url>
        </snapshotRepository>
    </distributionManagement>
 
<!--    <dependencies>-->
<!--        <dependency>-->
<!--            <groupId>org.apache.dubbo</groupId>-->
<!--            <artifactId>dubbo-compiler</artifactId>-->
<!--            <version>0.0.1</version>-->
<!--        </dependency>-->
<!--    </dependencies>-->
 
    <build>
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.6.1</version>
                <configuration>
                    <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
                    <pluginId>grpc-java</pluginId>
                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
                    <outputDirectory>src/main/java</outputDirectory>
                    <clearOutputDirectory>false</clearOutputDirectory>
                </configuration>
                <!--以下为dubbo-grpc协议-->
<!--                <configuration>-->
<!--                    <protocArtifact>com.google.protobuf:protoc:3.7.1:exe:${os.detected.classifier}</protocArtifact>-->
<!--                    <pluginId>grpc-java</pluginId>-->
<!--                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>-->
<!--&lt;!&ndash;                    <outputDirectory>build/generated/source/proto/main/java</outputDirectory>&ndash;&gt;-->
<!--                    <outputDirectory>src/main/java</outputDirectory>-->
<!--                    <clearOutputDirectory>false</clearOutputDirectory>-->
<!--                    <protocPlugins>-->
<!--                        <protocPlugin>-->
<!--                            <id>dubbo</id>-->
<!--                            <groupId>org.apache.dubbo</groupId>-->
<!--                            <artifactId>dubbo-compiler</artifactId>-->
<!--                            <version>0.0.1</version>-->
<!--                            <mainClass>org.apache.dubbo.gen.dubbo.Dubbo3Generator</mainClass>-->
<!--                        </protocPlugin>-->
<!--                    </protocPlugins>-->
<!--                </configuration>-->
                <!--以上为dubbo-grpc协议-->
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>compile-custom</goal>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/main/java</source>
<!--                                <source>build/generated/source/proto/main/java</source>-->
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- 上传源码 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <configuration>
                    <attach>true</attach>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
 
</project>