Skip to content

Commit 2749470

Browse files
authored
Merge pull request #12 from weiguoz/release
Add several tools for release
2 parents 935cd02 + 9305d35 commit 2749470

File tree

4 files changed

+142
-10
lines changed

4 files changed

+142
-10
lines changed

.travis.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@ sudo: false
33
cache:
44
directories:
55
- $HOME/.m2
6-
76
env:
87
- JDK=oraclejdk8
98
dist: trusty
109
before_script:
1110
- jdk_switcher use $JDK
1211

13-
script:
14-
- mvn clean verify --batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true
12+
install: mvn clean verify -Dgpg.skip
13+
14+
# TODO(weiguo) not tested yet
15+
deploy:
16+
provider: script
17+
script: "mvn --settings .travis/settings.xml deploy -P gpg"
18+
skip_cleanup: true
19+
on:
20+
tags: true

.travis/settings.xml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
6+
<pluginGroups>
7+
</pluginGroups>
8+
9+
<proxies>
10+
</proxies>
11+
<servers>
12+
<server>
13+
<id>sonatype_snapshots</id>
14+
<username>${env.SONATYPE_USR}</username>
15+
<password>${env.SONATYPE_PSWD}</password>
16+
</server>
17+
<server>
18+
<id>sonatype_releases</id>
19+
<username>${env.SONATYPE_USR}</username>
20+
<password>${env.SONATYPE_PSWD}</password>
21+
</server>
22+
</servers>
23+
<mirrors>
24+
</mirrors>
25+
<profiles>
26+
<profile>
27+
<id>gpg</id>
28+
<properties>
29+
<gpg.executable>gpg</gpg.executable>
30+
<gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
31+
<gpg.passphrase>${env.GPG_PSWD}</gpg.passphrase>
32+
</properties>
33+
</profile>
34+
</profiles>
35+
36+
<activeProfiles>
37+
<activeProfile>gpg</activeProfile>
38+
</activeProfiles>
39+
</settings>

pom.xml

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
<groupId>org.sqlflow</groupId>
88
<artifactId>jsqlflow</artifactId>
99
<packaging>jar</packaging>
10-
<version>1.0-SNAPSHOT</version>
10+
<version>0.0.1</version>
1111
<name>jsqlflow</name>
12+
<description>SQLFlow client</description>
1213
<url>https://github.com/sql-machine-learning/jsqlflow</url>
1314

1415
<properties>
@@ -19,6 +20,7 @@
1920
<maven.compiler.target>1.8</maven.compiler.target>
2021
<maven.compiler.source>1.8</maven.compiler.source>
2122
</properties>
23+
2224
<dependencies>
2325
<dependency>
2426
<groupId>io.grpc</groupId>
@@ -69,7 +71,21 @@
6971
<version>1.6.2</version>
7072
</extension>
7173
</extensions>
74+
7275
<plugins>
76+
<plugin>
77+
<groupId>org.apache.maven.plugins</groupId>
78+
<artifactId>maven-javadoc-plugin</artifactId>
79+
<executions>
80+
<execution>
81+
<id>attach-javadocs</id>
82+
<goals>
83+
<goal>jar</goal>
84+
</goals>
85+
</execution>
86+
</executions>
87+
</plugin>
88+
7389
<plugin>
7490
<groupId>org.xolstice.maven.plugins</groupId>
7591
<artifactId>protobuf-maven-plugin</artifactId>
@@ -90,6 +106,7 @@
90106
</execution>
91107
</executions>
92108
</plugin>
109+
93110
<plugin>
94111
<groupId>org.apache.maven.plugins</groupId>
95112
<artifactId>maven-enforcer-plugin</artifactId>
@@ -108,6 +125,81 @@
108125
</execution>
109126
</executions>
110127
</plugin>
128+
129+
<plugin>
130+
<groupId>org.sonatype.plugins</groupId>
131+
<artifactId>nexus-staging-maven-plugin</artifactId>
132+
<version>1.6.8</version>
133+
<extensions>true</extensions>
134+
<configuration>
135+
<serverId>sonatype_releases</serverId>
136+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
137+
<autoReleaseAfterClose>false</autoReleaseAfterClose>
138+
</configuration>
139+
</plugin>
140+
141+
<plugin>
142+
<groupId>org.apache.maven.plugins</groupId>
143+
<artifactId>maven-source-plugin</artifactId>
144+
<version>3.2.0</version>
145+
<executions>
146+
<execution>
147+
<id>attach-sources</id>
148+
<goals>
149+
<goal>jar-no-fork</goal>
150+
</goals>
151+
</execution>
152+
</executions>
153+
</plugin>
154+
155+
<plugin>
156+
<groupId>org.apache.maven.plugins</groupId>
157+
<artifactId>maven-gpg-plugin</artifactId>
158+
<version>1.6</version>
159+
<executions>
160+
<execution>
161+
<id>gpg</id>
162+
<phase>verify</phase>
163+
<goals>
164+
<goal>sign</goal>
165+
</goals>
166+
</execution>
167+
</executions>
168+
</plugin>
111169
</plugins>
112170
</build>
171+
172+
<licenses>
173+
<license>
174+
<name>The Apache Software License, Version 2.0</name>
175+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
176+
<distribution>repo</distribution>
177+
</license>
178+
</licenses>
179+
180+
<scm>
181+
<url>https://github.com/sql-machine-learning/jsqlflow/tree/develop</url>
182+
</scm>
183+
184+
<developers>
185+
<developer>
186+
<name>weiguoz</name>
187+
<email>[email protected]</email>
188+
<organization>http://sqlflow.org/</organization>
189+
<timezone>+8</timezone>
190+
</developer>
191+
</developers>
192+
193+
<distributionManagement>
194+
<repository>
195+
<id>sonatype_releases</id>
196+
<name>Nexus Release Repository</name>
197+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
198+
</repository>
199+
<snapshotRepository>
200+
<id>sonatype_snapshots</id>
201+
<name>Nexus Snapshot Repository</name>
202+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
203+
</snapshotRepository>
204+
</distributionManagement>
113205
</project>

src/main/java/org/sqlflow/client/SQLFlow.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,7 @@ public interface SQLFlow {
3232
* Submit a task to SQLFlow server. This method return immediately.
3333
*
3434
* @param session: specify dbConnStr(datasource), user Id ...
35-
* <p>datasource == maxcomputer
36-
* maxcompute://{accesskey_id}:{accesskey_secret}@{endpoint}?curr_project={curr_project}&scheme={scheme}
37-
* <p>datasource == mysql
38-
* mysql://{username}:{password}@tcp({address})/{dbname}[?param1=value1&...&paramN=valueN]
39-
* <p>datasource == hive
40-
* hive://user:password@ip:port/dbname[?auth=<auth_mechanism>&session.<cfg_key1>=<cfg_value1>...&session<cfg_keyN>=valueN]
35+
* mysql://root:root@tcp(localhost)/iris
4136
* @param sql: sql program.
4237
* <p>Example: "SELECT * FROM iris.test; SELECT * FROM iris.iris TO TRAIN DNNClassifier
4338
* COLUMN..." *

0 commit comments

Comments
 (0)