Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ sudo: false
cache:
directories:
- $HOME/.m2

env:
- JDK=oraclejdk8
dist: trusty
before_script:
- jdk_switcher use $JDK

script:
- mvn clean verify --batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true
install: mvn clean verify -Dgpg.skip

# TODO(weiguo) not tested yet
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, it will fail to run the script mvn ... due to the incorrect gpg configuration.
I left an issue #13

deploy:
provider: script
script: "mvn --settings .travis/settings.xml deploy -P gpg"
skip_cleanup: true
on:
tags: true
39 changes: 39 additions & 0 deletions .travis/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
</pluginGroups>

<proxies>
</proxies>
<servers>
<server>
<id>sonatype_snapshots</id>
<username>${env.SONATYPE_USR}</username>
<password>${env.SONATYPE_PSWD}</password>
</server>
<server>
<id>sonatype_releases</id>
<username>${env.SONATYPE_USR}</username>
<password>${env.SONATYPE_PSWD}</password>
</server>
</servers>
<mirrors>
</mirrors>
<profiles>
<profile>
<id>gpg</id>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
<gpg.passphrase>${env.GPG_PSWD}</gpg.passphrase>
</properties>
</profile>
</profiles>

<activeProfiles>
<activeProfile>gpg</activeProfile>
</activeProfiles>
</settings>
94 changes: 93 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
<groupId>org.sqlflow</groupId>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just confusion about the groupId field, should it be sqlfow.org ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<artifactId>jsqlflow</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<version>0.0.1</version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe the version start from 0.1.0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.
The pb is being iterated. Let's update the version to 0.1.0 when the protocol is stabled.

<name>jsqlflow</name>
<description>SQLFlow client</description>
<url>https://github.com/sql-machine-learning/jsqlflow</url>

<properties>
Expand All @@ -19,6 +20,7 @@
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>

<dependencies>
<dependency>
<groupId>io.grpc</groupId>
Expand Down Expand Up @@ -69,7 +71,21 @@
<version>1.6.2</version>
</extension>
</extensions>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
Expand All @@ -90,6 +106,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
Expand All @@ -108,6 +125,81 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype_releases</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>gpg</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<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>
<url>https://github.com/sql-machine-learning/jsqlflow/tree/develop</url>
</scm>

<developers>
<developer>
<name>weiguoz</name>
<email>myxjtu@gmail.com</email>
<organization>http://sqlflow.org/</organization>
<timezone>+8</timezone>
</developer>
</developers>

<distributionManagement>
<repository>
<id>sonatype_releases</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
<snapshotRepository>
<id>sonatype_snapshots</id>
<name>Nexus Snapshot Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</project>
7 changes: 1 addition & 6 deletions src/main/java/org/sqlflow/client/SQLFlow.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ public interface SQLFlow {
* Submit a task to SQLFlow server. This method return immediately.
*
* @param session: specify dbConnStr(datasource), user Id ...
* <p>datasource == maxcomputer
* maxcompute://{accesskey_id}:{accesskey_secret}@{endpoint}?curr_project={curr_project}&scheme={scheme}
* <p>datasource == mysql
* mysql://{username}:{password}@tcp({address})/{dbname}[?param1=value1&...&paramN=valueN]
* <p>datasource == hive
* hive://user:password@ip:port/dbname[?auth=<auth_mechanism>&session.<cfg_key1>=<cfg_value1>...&session<cfg_keyN>=valueN]
* mysql://root:root@tcp(localhost)/iris
* @param sql: sql program.
* <p>Example: "SELECT * FROM iris.test; SELECT * FROM iris.iris TO TRAIN DNNClassifier
* COLUMN..." *
Expand Down