|
2 | 2 |
|
3 | 3 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
4 | 4 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
5 | | - <modelVersion>4.0.0</modelVersion> |
6 | 5 |
|
7 | | - <groupId>io.singularitynet</groupId> |
| 6 | + <parent> |
| 7 | + <groupId>io.singularitynet</groupId> |
| 8 | + <artifactId>snet-sdk-java-pom</artifactId> |
| 9 | + <version>1.0-SNAPSHOT</version> |
| 10 | + </parent> |
| 11 | + |
| 12 | + <modelVersion>4.0.0</modelVersion> |
8 | 13 | <artifactId>snet-sdk-java-example</artifactId> |
9 | | - <version>1.0-SNAPSHOT</version> |
| 14 | + <packaging>jar</packaging> |
10 | 15 |
|
11 | 16 | <name>snet-sdk-java-example</name> |
12 | 17 | <description>SingularityNet Java SDK usage example</description> |
13 | 18 | <!-- TODO: add link to the SDK tutorial --> |
14 | 19 | <url>http://dev.singularitynet.io</url> |
15 | 20 |
|
16 | | - <properties> |
17 | | - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
18 | | - <maven.compiler.source>1.8</maven.compiler.source> |
19 | | - <maven.compiler.target>1.8</maven.compiler.target> |
20 | | - |
21 | | - <!-- protobuf and grpc versions --> |
22 | | - <protobuf.version>3.5.1</protobuf.version> |
23 | | - <grpc.version>1.20.0</grpc.version> |
24 | | - </properties> |
25 | | - |
26 | 21 | <dependencies> |
27 | 22 |
|
28 | 23 | <dependency> |
29 | 24 | <groupId>io.singularitynet</groupId> |
30 | 25 | <artifactId>snet-sdk-java</artifactId> |
31 | | - <version>1.0-SNAPSHOT</version> |
32 | 26 | </dependency> |
33 | 27 |
|
34 | 28 | <!-- protobuf + grpc begin --> |
35 | 29 | <dependency> |
36 | 30 | <groupId>com.google.protobuf</groupId> |
37 | 31 | <artifactId>protobuf-java</artifactId> |
38 | | - <version>${protobuf.version}</version> |
39 | 32 | </dependency> |
40 | 33 | <dependency> |
41 | 34 | <groupId>io.grpc</groupId> |
|
52 | 45 | <dependency> |
53 | 46 | <groupId>javax.annotation</groupId> |
54 | 47 | <artifactId>javax.annotation-api</artifactId> |
55 | | - <version>1.3.2</version> |
56 | 48 | </dependency> |
57 | 49 | <!-- protobuf + grpc end --> |
58 | 50 |
|
59 | 51 | <dependency> |
60 | 52 | <groupId>junit</groupId> |
61 | 53 | <artifactId>junit</artifactId> |
62 | | - <version>4.12</version> |
63 | 54 | <scope>test</scope> |
64 | 55 | </dependency> |
65 | 56 |
|
66 | 57 | </dependencies> |
67 | 58 |
|
68 | | - <dependencyManagement> |
69 | | - <dependencies> |
70 | | - <!-- resolve grpc dependency versions from grpc one--> |
71 | | - <dependency> |
72 | | - <groupId>io.grpc</groupId> |
73 | | - <artifactId>grpc-bom</artifactId> |
74 | | - <version>${grpc.version}</version> |
75 | | - <type>pom</type> |
76 | | - <scope>import</scope> |
77 | | - </dependency> |
78 | | - </dependencies> |
79 | | - </dependencyManagement> |
80 | | - |
81 | 59 | <build> |
82 | 60 |
|
83 | 61 | <extensions> |
|
89 | 67 | </extensions> |
90 | 68 |
|
91 | 69 | <plugins> |
| 70 | + |
92 | 71 | <plugin> |
93 | | - <groupId>org.codehaus.mojo</groupId> |
94 | | - <artifactId>exec-maven-plugin</artifactId> |
95 | | - <version>1.4.0</version> |
| 72 | + <groupId>io.singularitynet</groupId> |
| 73 | + <artifactId>snet-sdk-maven-plugin</artifactId> |
| 74 | + <executions> |
| 75 | + <execution> |
| 76 | + <id>example-service</id> |
| 77 | + <configuration> |
| 78 | + <orgId>snet</orgId> |
| 79 | + <serviceId>example-service</serviceId> |
| 80 | + <outputDir>${project.build.directory}/proto</outputDir> |
| 81 | + <javaPackage>io.singularitynet.service.exampleservice</javaPackage> |
| 82 | + </configuration> |
| 83 | + <goals> |
| 84 | + <goal>get</goal> |
| 85 | + </goals> |
| 86 | + </execution> |
| 87 | + <execution> |
| 88 | + <id>cntk-image-recon</id> |
| 89 | + <configuration> |
| 90 | + <orgId>snet</orgId> |
| 91 | + <serviceId>cntk-image-recon</serviceId> |
| 92 | + <outputDir>${project.build.directory}/proto</outputDir> |
| 93 | + <javaPackage>io.singularitynet.service.cntkimagerecon</javaPackage> |
| 94 | + </configuration> |
| 95 | + <goals> |
| 96 | + <goal>get</goal> |
| 97 | + </goals> |
| 98 | + </execution> |
| 99 | + </executions> |
96 | 100 | </plugin> |
97 | 101 |
|
98 | 102 | <plugin> |
99 | 103 | <groupId>org.xolstice.maven.plugins</groupId> |
100 | 104 | <artifactId>protobuf-maven-plugin</artifactId> |
101 | | - <version>0.6.1</version> |
102 | 105 | <configuration> |
103 | 106 | <!-- artifact to download binary protobuf compiler --> |
104 | 107 | <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact> |
|
108 | 111 | <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact> |
109 | 112 | <!-- to not recompile protobuf each time --> |
110 | 113 | <checkStaleness>true</checkStaleness> |
| 114 | + <protoSourceRoot>${project.build.directory}/proto</protoSourceRoot> |
111 | 115 | </configuration> |
112 | 116 | <executions> |
113 | 117 | <execution> |
|
120 | 124 | </executions> |
121 | 125 | </plugin> |
122 | 126 |
|
123 | | - </plugins> |
124 | | - |
125 | | - <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --> |
126 | | - <plugins> |
127 | | - <plugin> |
128 | | - <artifactId>maven-clean-plugin</artifactId> |
129 | | - <version>3.1.0</version> |
130 | | - </plugin> |
131 | | - <plugin> |
132 | | - <artifactId>maven-site-plugin</artifactId> |
133 | | - <version>3.7.1</version> |
134 | | - </plugin> |
135 | | - <plugin> |
136 | | - <artifactId>maven-project-info-reports-plugin</artifactId> |
137 | | - <version>3.0.0</version> |
138 | | - </plugin> |
139 | | - <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging --> |
140 | | - <plugin> |
141 | | - <artifactId>maven-resources-plugin</artifactId> |
142 | | - <version>3.0.2</version> |
143 | | - </plugin> |
144 | | - <plugin> |
145 | | - <artifactId>maven-compiler-plugin</artifactId> |
146 | | - <version>3.8.0</version> |
147 | | - </plugin> |
148 | | - <plugin> |
149 | | - <artifactId>maven-surefire-plugin</artifactId> |
150 | | - <version>2.22.1</version> |
151 | | - <configuration> |
152 | | - <trimStackTrace>false</trimStackTrace> |
153 | | - </configuration> |
154 | | - </plugin> |
155 | | - <plugin> |
156 | | - <artifactId>maven-jar-plugin</artifactId> |
157 | | - <version>3.0.2</version> |
158 | | - </plugin> |
159 | | - <plugin> |
160 | | - <artifactId>maven-install-plugin</artifactId> |
161 | | - <version>2.5.2</version> |
162 | | - </plugin> |
163 | | - <plugin> |
164 | | - <artifactId>maven-deploy-plugin</artifactId> |
165 | | - <version>2.8.2</version> |
166 | | - </plugin> |
167 | | - </plugins> |
168 | | - </pluginManagement> |
169 | | - </build> |
170 | | - |
171 | | - <reporting> |
172 | | - <plugins> |
173 | 127 | <plugin> |
174 | | - <artifactId>maven-project-info-reports-plugin</artifactId> |
| 128 | + <groupId>org.codehaus.mojo</groupId> |
| 129 | + <artifactId>exec-maven-plugin</artifactId> |
175 | 130 | </plugin> |
| 131 | + |
176 | 132 | </plugins> |
177 | | - </reporting> |
| 133 | + </build> |
| 134 | + |
178 | 135 | </project> |
0 commit comments