You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/01/09 01:25:55 UTC

[GitHub] lanking520 closed pull request #13626: Re-organize Scala maven build

lanking520 closed pull request #13626: Re-organize Scala maven build
URL: https://github.com/apache/incubator-mxnet/pull/13626
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/Makefile b/Makefile
index 3b0057dfc96..491bc995ef6 100644
--- a/Makefile
+++ b/Makefile
@@ -18,8 +18,6 @@
 ROOTDIR = $(CURDIR)
 TPARTYDIR = $(ROOTDIR)/3rdparty
 
-SCALA_VERSION_PROFILE := scala-2.11
-
 ifeq ($(OS),Windows_NT)
 	UNAME_S := Windows
 else
@@ -408,18 +406,13 @@ PLUGIN_OBJ =
 PLUGIN_CUOBJ =
 include $(MXNET_PLUGINS)
 
-ifeq ($(UNAME_S), Windows)
-	# TODO(yizhi) currently scala package does not support windows
-	SCALA_PKG_PROFILE := windows
-else
+ifneq ($(UNAME_S), Windows)
 	ifeq ($(UNAME_S), Darwin)
 		WHOLE_ARCH= -all_load
 		NO_WHOLE_ARCH= -noall_load
-		SCALA_PKG_PROFILE := osx-x86_64
 	else
 		WHOLE_ARCH= --whole-archive
 		NO_WHOLE_ARCH= --no-whole-archive
-		SCALA_PKG_PROFILE := linux-x86_64
 	endif
 endif
 
@@ -438,7 +431,6 @@ ifeq ($(USE_CUDA), 1)
 	# Make sure to add stubs as fallback in order to be able to build
 	# without full CUDA install (especially if run without nvidia-docker)
 	LDFLAGS += -L/usr/local/cuda/lib64/stubs
-	SCALA_PKG_PROFILE := $(SCALA_PKG_PROFILE)-gpu
 	ifeq ($(USE_NCCL), 1)
 		ifneq ($(USE_NCCL_PATH), NONE)
 			CFLAGS += -I$(USE_NCCL_PATH)/include
@@ -450,7 +442,6 @@ ifeq ($(USE_CUDA), 1)
 		CFLAGS += -DMXNET_USE_NCCL=0
 	endif
 else
-	SCALA_PKG_PROFILE := $(SCALA_PKG_PROFILE)-cpu
 	CFLAGS += -DMXNET_USE_NCCL=0
 endif
 
@@ -620,80 +611,22 @@ rpkgtest:
 	Rscript -e 'res<-covr:::package_coverage("R-package");fileConn<-file(paste("r-package_coverage_",toString(runif(1)),".json"));writeLines(covr:::to_codecov(res), fileConn);close(fileConn)'
 
 scalaclean:
-	(cd $(ROOTDIR)/scala-package && \
-		mvn clean -P$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE))
-
-scalatestcompile:
-	(cd $(ROOTDIR)/scala-package && \
-		mvn test-compile -P$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE) -Dcxx="$(CXX)" \
-		    -Dbuild.platform="$(SCALA_PKG_PROFILE)" \
-			-Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)" \
-			-Dcurrent_libdir="$(ROOTDIR)/lib" \
-			-Dlddeps="$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a")
+	(cd $(ROOTDIR)/scala-package && mvn clean)
 
 scalapkg:
-	(cd $(ROOTDIR)/scala-package && \
-		mvn package $(MAVEN_ARGS) -P$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE) -Dcxx="$(CXX)" \
-		    -Dbuild.platform="$(SCALA_PKG_PROFILE)" \
-			-Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)" \
-			-Dcurrent_libdir="$(ROOTDIR)/lib" \
-			-Dlddeps="$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a")
+	(cd $(ROOTDIR)/scala-package && mvn install -DskipTests)
+
+scalainstall:
+	(cd $(ROOTDIR)/scala-package && mvn install)
 
 scalaunittest:
-	(cd $(ROOTDIR)/scala-package && \
-		mvn integration-test $(MAVEN_ARGS) -P$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE),unittest -Dcxx="$(CXX)" \
-			-Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)" \
-			-Dlddeps="$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a" $(SCALA_TEST_ARGS))
+	(cd $(ROOTDIR)/scala-package && mvn install)
 
 scalaintegrationtest:
-	(cd $(ROOTDIR)/scala-package && \
-		mvn integration-test $(MAVEN_ARGS) -P$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE),integrationtest -Dcxx="$(CXX)" \
-			-Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)" \
-			-Dlddeps="$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a" $(SCALA_TEST_ARGS))
-
-scalainstall:
-	(cd $(ROOTDIR)/scala-package && \
-		mvn install $(MAVEN_ARGS) -P$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE) -DskipTests=true -Dcxx="$(CXX)" \
-		    -Dbuild.platform="$(SCALA_PKG_PROFILE)" \
-			-Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)" \
-			-Dlddeps="$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a")
-
-scalarelease-dryrun:
-	(cd $(ROOTDIR)/scala-package && \
-		mvn release:clean release:prepare -DdryRun=true -DautoVersionSubmodules=true \
-		-Papache-release,$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE) \
-		-Darguments=""-Dbuild\.platform=\""$(SCALA_PKG_PROFILE)\""\ -DskipTests=true\ -Dcflags=\""$(CFLAGS)\""\ -Dcxx=\""$(CXX)\""\ -Dldflags=\""$(LDFLAGS)\""\ -Dlddeps=\""$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a\"""")
-
-scalarelease-prepare:
-	(cd $(ROOTDIR)/scala-package && \
-		mvn release:clean release:prepare -DautoVersionSubmodules=true \
-		-Papache-release,$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE) \
-		-Darguments=""-Dbuild\.platform=\""$(SCALA_PKG_PROFILE)\""\ -DskipTests=true\ -Dcflags=\""$(CFLAGS)\""\ -Dcxx=\""$(CXX)\""\ -Dldflags=\""$(LDFLAGS)\""\ -Dlddeps=\""$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a\"""")
-
-scalarelease-perform:
-	(cd $(ROOTDIR)/scala-package && \
-		mvn release:perform -DautoVersionSubmodules=true \
-		-Papache-release,$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE) \
-		-Darguments=""-Dbuild\.platform=\""$(SCALA_PKG_PROFILE)\""\ -DskipTests=true\ -Dcflags=\""$(CFLAGS)\""\ -Dcxx=\""$(CXX)\""\ -Dldflags=\""$(LDFLAGS)\""\ -Dlddeps=\""$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a\"""")
-
-scaladeploy:
-	(cd $(ROOTDIR)/scala-package && \
-		mvn deploy $(MAVEN_ARGS) -Papache-release,$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE) \-DskipTests=true -Dcxx="$(CXX)" \
-		    -Dbuild.platform="$(SCALA_PKG_PROFILE)" \
-			-Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)" \
-			-Dlddeps="$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a")
-
-scaladeploylocal:
-	(cd $(ROOTDIR)/scala-package && \
-		mvn deploy $(MAVEN_ARGS) -Papache-release,deployLocal,$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE) \-DskipTests=true -Dcxx="$(CXX)" \
-		  -DaltDeploymentRepository=snapshot-repo::default::file:local-snapshot \
-		  -Dgpg.skip \
-		  -Dbuild.platform="$(SCALA_PKG_PROFILE)" \
-			-Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)" \
-			-Dlddeps="$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a")
+	(cd $(ROOTDIR)/scala-package && mvn integration-test -DskipTests=false)
 
 jnilint:
-	3rdparty/dmlc-core/scripts/lint.py mxnet-jnicpp cpp scala-package/native/src
+	3rdparty/dmlc-core/scripts/lint.py mxnet-jnicpp cpp scala-package/native/src --exclude_path scala-package/native/src/main/native/org_apache_mxnet_native_c_api.h
 
 rclean:
 	$(RM) -r R-package/src/image_recordio.h R-package/NAMESPACE R-package/man R-package/R/mxnet_generated.R \
diff --git a/contrib/clojure-package/project.clj b/contrib/clojure-package/project.clj
index 12a0504e02d..c4428ce6eff 100644
--- a/contrib/clojure-package/project.clj
+++ b/contrib/clojure-package/project.clj
@@ -29,7 +29,7 @@
                  ;[org.apache.mxnet/mxnet-full_2.11-linux-x86_64-gpu "1.2.1"]
 
                  ;;; CI
-                 [org.apache.mxnet/mxnet-full_2.11-linux-x86_64-cpu "1.5.0-SNAPSHOT"]
+                 [org.apache.mxnet/mxnet-full_2.11 "INTERNAL"]
 
                  [org.clojure/tools.logging "0.4.0"]
                  [org.apache.logging.log4j/log4j-core "2.8.1"]
diff --git a/docs/mxdoc.py b/docs/mxdoc.py
index d4f379b3e84..58e603ed017 100644
--- a/docs/mxdoc.py
+++ b/docs/mxdoc.py
@@ -113,9 +113,9 @@ def build_scala_docs(app):
     scala_doc_sources = 'find . -type f -name "*.scala" | egrep \"\.\/core|\.\/infer\" | egrep -v \"\/javaapi\"  | egrep -v \"Suite\"'
     scala_doc_classpath = ':'.join([
         '`find native -name "*.jar" | grep "target/lib/" | tr "\\n" ":" `',
-        '`find macros -name "*-SNAPSHOT.jar" | tr "\\n" ":" `',
-        '`find core -name "*-SNAPSHOT.jar" | tr "\\n" ":" `',
-        '`find infer -name "*-SNAPSHOT.jar" | tr "\\n" ":" `'
+        '`find macros -name "*-INTERNAL.jar" | tr "\\n" ":" `',
+        '`find core -name "*-INTERNAL.jar" | tr "\\n" ":" `',
+        '`find infer -name "*-INTERNAL.jar" | tr "\\n" ":" `'
     ])
     # There are unresolvable errors on mxnet 1.2.x. We are ignoring those errors while aborting the ci on newer versions
     scala_ignore_errors = '; exit 0' if '1.2.' in _BUILD_VER else ''
@@ -135,9 +135,9 @@ def build_java_docs(app):
     java_doc_sources = 'find . -type f -name "*.scala" | egrep \"\.\/core|\.\/infer\" | egrep \"\/javaapi\" | egrep -v \"Suite\"'
     java_doc_classpath = ':'.join([
         '`find native -name "*.jar" | grep "target/lib/" | tr "\\n" ":" `',
-        '`find macros -name "*-SNAPSHOT.jar" | tr "\\n" ":" `',
-        '`find core -name "*-SNAPSHOT.jar" | tr "\\n" ":" `',
-        '`find infer -name "*-SNAPSHOT.jar" | tr "\\n" ":" `'
+        '`find macros -name "*-INTERNAL.jar" | tr "\\n" ":" `',
+        '`find core -name "*-INTERNAL.jar" | tr "\\n" ":" `',
+        '`find infer -name "*-INTERNAL.jar" | tr "\\n" ":" `'
     ])
     _run_cmd('cd {}; scaladoc `{}` -classpath {} -feature -deprecation'
              .format(java_path, java_doc_sources, java_doc_classpath))
diff --git a/scala-package/.gitignore b/scala-package/.gitignore
index f75826b2928..bf60e7bef0c 100644
--- a/scala-package/.gitignore
+++ b/scala-package/.gitignore
@@ -1,10 +1,10 @@
 .flattened-pom.xml
 core/src/main/scala/org/apache/mxnet/NDArrayAPIBase.scala
 core/src/main/scala/org/apache/mxnet/NDArrayBase.scala
+core/src/main/scala/org/apache/mxnet/NDArrayRandomAPIBase.scala
 core/src/main/scala/org/apache/mxnet/javaapi/NDArrayBase.scala
 core/src/main/scala/org/apache/mxnet/SymbolAPIBase.scala
 core/src/main/scala/org/apache/mxnet/SymbolBase.scala
-core/src/main/scala/org/apache/mxnet/NDArrayRandomAPIBase.scala
 core/src/main/scala/org/apache/mxnet/SymbolRandomAPIBase.scala
 examples/scripts/infer/images/
 examples/scripts/infer/models/
diff --git a/scala-package/README.md b/scala-package/README.md
index 06ce6930fa4..3859e5f3224 100644
--- a/scala-package/README.md
+++ b/scala-package/README.md
@@ -10,7 +10,7 @@ The MXNet Scala/Java Package brings flexible and efficient GPU/CPU computing and
 - The Scala/Java Inferece APIs provides an easy out of the box solution for loading pre-trained MXNet models and running inference on them.
   
 Pre-Built Maven Packages
-------------
+------------------------
 
 ### Stable ###
 
@@ -114,30 +114,51 @@ Also, add the dependency which corresponds to your platform to the ```dependenci
 **Note:** ```<version>[1.5.0,)<\version>``` indicates that we will fetch packages with version 1.5.0 or higher. This will always ensure that the pom.xml is able to fetch the latest and greatest jar files from Maven Snapshot repository.
 
 Build From Source
-------------
+-----------------
 
-Checkout the [Installation Guide](http://mxnet.incubator.apache.org/install/index.html) contains instructions to install mxnet package and build it from source.
-If you have built MXNet from source and are looking to setup Scala from that point, you may simply run the following from the MXNet source root:
+Checkout the [Installation Guide](http://mxnet.incubator.apache.org/install/index.html) contains instructions to install mxnet package and build it from source. Scala maven build assume you already have a ``lib/libmxnet.so`` file.
+If you have built MXNet from source and are looking to setup Scala from that point, you may simply run the following from the MXNet source root, Scala build will detect your platform (OSX/Linux) and libmxnet.so flavor (CPU/GPU):
 
 ```bash
-make scalapkg
+cd scala-package
+mvn install
 ```
 
 You can also run the unit tests and integration tests on the Scala Package by :
 
 ```bash
-make scalaunittest
-make scalaintegrationtest
+cd scala-package
+mvn integration-test -DskipTests=false
 ```
 
 Or run a subset of unit tests, for e.g.,
 
 ```bash
-make SCALA_TEST_ARGS=-Dsuites=org.apache.mxnet.NDArraySuite scalaunittest
+cd scala-package
+mvn -Dsuites=org.apache.mxnet.NDArraySuite integration-test
 ```
 
 If everything goes well, you will find jars for `assembly`, `core` and `example` modules.
-Also it produces the native library in `native/{your-architecture}/target`, which you can use to cooperate with the `core` module.
+Also it produces the native library in `native/target`, which you can use to cooperate with the `core` module.
+
+Deploy to repository
+--------------------
+
+By default, `maven deploy` will deploy artifacts to local file system, you can file then in: ``scala-package/deploy/target/repo`` folder.
+
+For nightly build in CI, a snapshot build will be uploaded to apache repository with follow command:
+
+```bash
+cd scala-package
+mvn deploy -Pnightly
+```
+
+Use following command to deploy release build (push artifacts to apache staging repository):
+
+```bash
+cd scala-package
+mvn deploy -Pstaging
+```
 
 Examples & Usage
 -------
@@ -175,3 +196,7 @@ More details about JVM Memory Management are available [here](https://github.com
 License
 -------
 MXNet Scala Package is licensed under [Apache-2](https://github.com/apache/incubator-mxnet/blob/master/scala-package/LICENSE) license.
+
+MXNet uses some 3rd party softwares. Following 3rd party license files are bundled inside Scala jar file:
+* cub/LICENSE.TXT
+* mkldnn/external/mklml_mac_2019.0.1.20180928/license.txt
diff --git a/scala-package/assembly/linux-x86_64-cpu/pom.xml b/scala-package/assembly/linux-x86_64-cpu/pom.xml
deleted file mode 100644
index 1658f36e6bb..00000000000
--- a/scala-package/assembly/linux-x86_64-cpu/pom.xml
+++ /dev/null
@@ -1,131 +0,0 @@
-<?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>
-  <parent>
-    <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-full-parent_2.11</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>mxnet-full_2.11-linux-x86_64-cpu</artifactId>
-  <name>MXNet Scala Package - Full Linux-x86_64 CPU-only</name>
-  <packaging>jar</packaging>
-
-  <properties>
-    <MXNET_DIR>${project.parent.parent.basedir}/..</MXNET_DIR>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-core_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>libmxnet-scala-linux-x86_64-cpu</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-      <type>so</type>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-infer_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>flatten-maven-plugin</artifactId>
-        <!--<version>1.1.0-SNAPSHOT</version>-->
-        <configuration>
-          <pomElements>
-            <dependencies>remove</dependencies>
-          </pomElements>
-        </configuration>
-        <executions>
-          <!-- enable flattening -->
-          <execution>
-            <id>flatten</id>
-            <phase>process-resources</phase>
-            <goals>
-              <goal>flatten</goal>
-            </goals>
-          </execution>
-          <!-- ensure proper cleanup -->
-          <execution>
-            <id>flatten.clean</id>
-            <phase>clean</phase>
-            <goals>
-              <goal>clean</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <inherited>false</inherited>
-        <configuration>
-          <skip>false</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>binary-jar</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <appendAssemblyId>false</appendAssemblyId>
-              <descriptors>
-                <descriptor>src/main/assembly/assembly.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-          <execution>
-            <id>sources-jar</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <appendAssemblyId>true</appendAssemblyId>
-              <classifier>sources</classifier>
-              <descriptors>
-                <descriptor>${project.parent.basedir}/src/source.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-          <execution>
-            <id>javadoc-jar</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <appendAssemblyId>true</appendAssemblyId>
-              <classifier>javadoc</classifier>
-              <descriptors>
-                <descriptor>${project.parent.basedir}/src/javadoc.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/scala-package/assembly/linux-x86_64-cpu/src/main/assembly/assembly.xml b/scala-package/assembly/linux-x86_64-cpu/src/main/assembly/assembly.xml
deleted file mode 100644
index f4c2017c824..00000000000
--- a/scala-package/assembly/linux-x86_64-cpu/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<assembly>
-  <id>full</id>
-  <formats>
-    <format>jar</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <dependencySets>
-    <dependencySet>
-      <includes>
-        <include>*:*:jar</include>
-      </includes>
-      <outputDirectory>/</outputDirectory>
-      <useProjectArtifact>true</useProjectArtifact>
-      <unpack>true</unpack>
-      <scope>runtime</scope>
-    </dependencySet>
-    <dependencySet>
-      <outputDirectory>lib/native</outputDirectory>
-      <outputFileNameMapping>libmxnet-scala.so</outputFileNameMapping>
-      <unpack>false</unpack>
-      <useProjectArtifact>false</useProjectArtifact>
-      <useStrictFiltering>false</useStrictFiltering>
-      <includes>
-        <include>org.apache.mxnet:libmxnet-scala-linux-x86_64-cpu:so</include>
-      </includes>
-    </dependencySet>
-  </dependencySets>
-  <files>
-    <file>
-      <source>${MXNET_DIR}/lib/libmxnet.so</source>
-      <outputDirectory>lib/native</outputDirectory>
-    </file>
-  </files>
-</assembly>
diff --git a/scala-package/assembly/linux-x86_64-gpu/pom.xml b/scala-package/assembly/linux-x86_64-gpu/pom.xml
deleted file mode 100644
index c80515e7b10..00000000000
--- a/scala-package/assembly/linux-x86_64-gpu/pom.xml
+++ /dev/null
@@ -1,131 +0,0 @@
-<?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>
-  <parent>
-    <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-full-parent_2.11</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>mxnet-full_2.11-linux-x86_64-gpu</artifactId>
-  <name>MXNet Scala Package - Full Linux-x86_64 GPU</name>
-  <packaging>jar</packaging>
-
-  <properties>
-    <MXNET_DIR>${project.parent.parent.basedir}/..</MXNET_DIR>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-core_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>libmxnet-scala-linux-x86_64-gpu</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-      <type>so</type>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-infer_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>flatten-maven-plugin</artifactId>
-        <!--<version>1.1.0-SNAPSHOT</version>-->
-        <configuration>
-          <pomElements>
-            <dependencies>remove</dependencies>
-          </pomElements>
-        </configuration>
-        <executions>
-          <!-- enable flattening -->
-          <execution>
-            <id>flatten</id>
-            <phase>process-resources</phase>
-            <goals>
-              <goal>flatten</goal>
-            </goals>
-          </execution>
-          <!-- ensure proper cleanup -->
-          <execution>
-            <id>flatten.clean</id>
-            <phase>clean</phase>
-            <goals>
-              <goal>clean</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <inherited>false</inherited>
-        <configuration>
-          <skip>false</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>binary-jar</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <appendAssemblyId>false</appendAssemblyId>
-              <descriptors>
-                <descriptor>src/main/assembly/assembly.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-          <execution>
-            <id>sources-jar</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <appendAssemblyId>true</appendAssemblyId>
-              <classifier>sources</classifier>
-              <descriptors>
-                <descriptor>${project.parent.basedir}/src/source.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-          <execution>
-            <id>javadoc-jar</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <appendAssemblyId>true</appendAssemblyId>
-              <classifier>javadoc</classifier>
-              <descriptors>
-                <descriptor>${project.parent.basedir}/src/javadoc.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/scala-package/assembly/linux-x86_64-gpu/src/main/assembly/assembly.xml b/scala-package/assembly/linux-x86_64-gpu/src/main/assembly/assembly.xml
deleted file mode 100644
index 2aca64bdf1a..00000000000
--- a/scala-package/assembly/linux-x86_64-gpu/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<assembly>
-  <id>full</id>
-  <formats>
-    <format>jar</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <dependencySets>
-    <dependencySet>
-      <includes>
-        <include>*:*:jar</include>
-      </includes>
-      <outputDirectory>/</outputDirectory>
-      <useProjectArtifact>true</useProjectArtifact>
-      <unpack>true</unpack>
-      <scope>runtime</scope>
-    </dependencySet>
-    <dependencySet>
-      <outputDirectory>lib/native</outputDirectory>
-      <outputFileNameMapping>libmxnet-scala.so</outputFileNameMapping>
-      <unpack>false</unpack>
-      <useProjectArtifact>false</useProjectArtifact>
-      <useStrictFiltering>false</useStrictFiltering>
-      <includes>
-        <include>org.apache.mxnet:libmxnet-scala-linux-x86_64-gpu:so</include>
-      </includes>
-    </dependencySet>
-  </dependencySets>
-  <files>
-    <file>
-      <source>${MXNET_DIR}/lib/libmxnet.so</source>
-      <outputDirectory>lib/native</outputDirectory>
-    </file>
-  </files>
-</assembly>
diff --git a/scala-package/assembly/osx-x86_64-cpu/pom.xml b/scala-package/assembly/osx-x86_64-cpu/pom.xml
deleted file mode 100644
index 62979a140fd..00000000000
--- a/scala-package/assembly/osx-x86_64-cpu/pom.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?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>
-  <parent>
-    <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-full-parent_2.11</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>mxnet-full_2.11-osx-x86_64-cpu</artifactId>
-  <name>MXNet Scala Package - Full OSX-x86_64 CPU-only</name>
-  <packaging>jar</packaging>
-
-  <properties>
-    <MXNET_DIR>${project.parent.parent.basedir}/..</MXNET_DIR>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-core_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>libmxnet-scala-osx-x86_64-cpu</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-      <type>jnilib</type>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-infer_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>flatten-maven-plugin</artifactId>
-        <!--<version>1.1.0-SNAPSHOT</version>-->
-        <configuration>
-          <pomElements>
-            <dependencies>remove</dependencies>
-          </pomElements>
-        </configuration>
-        <executions>
-          <!-- enable flattening -->
-          <execution>
-            <id>flatten</id>
-            <phase>process-resources</phase>
-            <goals>
-              <goal>flatten</goal>
-            </goals>
-          </execution>
-          <!-- ensure proper cleanup -->
-          <execution>
-            <id>flatten.clean</id>
-            <phase>clean</phase>
-            <goals>
-              <goal>clean</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <inherited>false</inherited>
-        <configuration>
-          <skip>false</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>binary-jar</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <appendAssemblyId>false</appendAssemblyId>
-              <descriptors>
-                <descriptor>src/main/assembly/assembly.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-          <execution>
-            <id>sources-jar</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <appendAssemblyId>true</appendAssemblyId>
-              <classifier>sources</classifier>
-              <descriptors>
-                <descriptor>${project.parent.basedir}/src/source.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-          <execution>
-            <id>javadoc-jar</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <appendAssemblyId>true</appendAssemblyId>
-              <classifier>javadoc</classifier>
-              <descriptors>
-                <descriptor>${project.parent.basedir}/src/javadoc.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/scala-package/assembly/osx-x86_64-cpu/src/main/assembly/assembly.xml b/scala-package/assembly/osx-x86_64-cpu/src/main/assembly/assembly.xml
deleted file mode 100644
index e9bc3728fcd..00000000000
--- a/scala-package/assembly/osx-x86_64-cpu/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<assembly>
-  <id>full</id>
-  <formats>
-    <format>jar</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <dependencySets>
-    <dependencySet>
-      <includes>
-        <include>*:*:jar</include>
-      </includes>
-      <outputDirectory>/</outputDirectory>
-      <useProjectArtifact>true</useProjectArtifact>
-      <unpack>true</unpack>
-      <scope>runtime</scope>
-    </dependencySet>
-    <dependencySet>
-      <outputDirectory>lib/native</outputDirectory>
-      <outputFileNameMapping>libmxnet-scala.jnilib</outputFileNameMapping>
-      <unpack>false</unpack>
-      <useProjectArtifact>false</useProjectArtifact>
-      <useStrictFiltering>false</useStrictFiltering>
-      <includes>
-        <include>org.apache.mxnet:libmxnet-scala-osx-x86_64-cpu:jnilib</include>
-      </includes>
-    </dependencySet>
-  </dependencySets>
-  <files>
-    <file>
-      <source>${MXNET_DIR}/lib/libmxnet.so</source>
-      <outputDirectory>lib/native</outputDirectory>
-    </file>
-  </files>
-</assembly>
diff --git a/scala-package/assembly/pom.xml b/scala-package/assembly/pom.xml
index c1d1a3b8e72..00aa8682f8f 100644
--- a/scala-package/assembly/pom.xml
+++ b/scala-package/assembly/pom.xml
@@ -5,106 +5,109 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-parent_2.11</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <artifactId>mxnet-parent</artifactId>
+    <version>INTERNAL</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
-  <artifactId>mxnet-full-parent_2.11</artifactId>
-  <name>MXNet Scala Package - Full Parent</name>
+  <artifactId>mxnet-full_2.11</artifactId>
+  <name>Assembly Scala Package</name>
   <packaging>pom</packaging>
 
+  <properties>
+    <MXNET_DIR>${project.parent.basedir}/..</MXNET_DIR>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.mxnet</groupId>
+      <artifactId>mxnet-core</artifactId>
+      <version>INTERNAL</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.mxnet</groupId>
+      <artifactId>libmxnet-scala</artifactId>
+      <version>INTERNAL</version>
+      <type>${libtype}</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.mxnet</groupId>
+      <artifactId>mxnet-infer</artifactId>
+      <version>INTERNAL</version>
+    </dependency>
+  </dependencies>
+
   <profiles>
     <profile>
-      <id>osx-x86_64-cpu</id>
-      <modules>
-        <module>osx-x86_64-cpu</module>
-      </modules>
-    </profile>
-    <profile>
-      <id>linux-x86_64-cpu</id>
-      <modules>
-        <module>linux-x86_64-cpu</module>
-      </modules>
-    </profile>
-    <profile>
-      <id>linux-x86_64-gpu</id>
-      <modules>
-        <module>linux-x86_64-gpu</module>
-      </modules>
-    </profile>
-    <profile>
-      <id>release</id>
+      <id>staging</id>
       <build>
         <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-deploy-plugin</artifactId>
-            <configuration>
-              <skip>true</skip>
-            </configuration>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-source-plugin</artifactId>
-            <executions>
-              <execution>
-                <phase>package</phase>
-                <goals>
-                  <goal>jar-no-fork</goal>
-                </goals>
-                <configuration>
-                  <includePom>true</includePom>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-javadoc-plugin</artifactId>
-            <executions>
-              <execution>
-                <phase>package</phase>
-                <goals>
-                  <goal>jar</goal>
-                </goals>
-                <configuration>
-                  <includeDependencySources>true</includeDependencySources>
-                  <dependencySourceExcludes>
-                    <dependencySourceExclude>commons-codec:*</dependencySourceExclude>
-                    <dependencySourceExclude>org.scala-lang:*</dependencySourceExclude>
-                    <dependencySourceExclude>log4j:*</dependencySourceExclude>
-                    <dependencySourceExclude>org.slf4j:*</dependencySourceExclude>
-                  </dependencySourceExcludes>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-gpg-plugin</artifactId>
+            <version>1.6</version>
             <executions>
               <execution>
                 <id>sign-artifacts</id>
-                <phase>verify</phase>
+                <phase>deploy</phase>
                 <goals>
                   <goal>sign</goal>
                 </goals>
               </execution>
             </executions>
           </plugin>
-          <plugin>
-            <groupId>org.sonatype.plugins</groupId>
-            <artifactId>nexus-staging-maven-plugin</artifactId>
-            <extensions>true</extensions>
-            <configuration>
-              <serverId>ossrh</serverId>
-              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
-              <autoReleaseAfterClose>true</autoReleaseAfterClose>
-            </configuration>
-          </plugin>
         </plugins>
       </build>
     </profile>
   </profiles>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>binary-jar</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              <appendAssemblyId>false</appendAssemblyId>
+              <descriptors>
+                <descriptor>src/main/assembly/assembly.xml</descriptor>
+              </descriptors>
+            </configuration>
+          </execution>
+          <execution>
+            <id>sources-jar</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              <appendAssemblyId>true</appendAssemblyId>
+              <descriptors>
+                <descriptor>src/main/assembly/source.xml</descriptor>
+              </descriptors>
+            </configuration>
+          </execution>
+          <execution>
+            <id>javadoc-jar</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              <appendAssemblyId>true</appendAssemblyId>
+              <descriptors>
+                <descriptor>src/main/assembly/javadoc.xml</descriptor>
+              </descriptors>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>
diff --git a/scala-package/assembly/src/javadoc.xml b/scala-package/assembly/src/javadoc.xml
deleted file mode 100644
index 9d0be80e769..00000000000
--- a/scala-package/assembly/src/javadoc.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<assembly>
-    <id>bundle</id>
-    <formats>
-        <format>jar</format>
-    </formats>
-    <includeBaseDirectory>false</includeBaseDirectory>
-
-    <moduleSets>
-        <moduleSet>
-            <!-- Collect javadoc -->
-            <includes>
-                <!--Please put your module defs here-->
-                <include>org.apache.mxnet:mxnet-core_${scala.binary.version}</include>
-            </includes>
-            <useAllReactorProjects>true</useAllReactorProjects>
-            <binaries>
-                <includeDependencies>false</includeDependencies>
-                <attachmentClassifier>javadoc</attachmentClassifier>
-                <outputDirectory>/</outputDirectory>
-                <unpack>true</unpack>
-            </binaries>
-        </moduleSet>
-    </moduleSets>
-</assembly>
\ No newline at end of file
diff --git a/scala-package/assembly/src/main/assembly/assembly.xml b/scala-package/assembly/src/main/assembly/assembly.xml
new file mode 100644
index 00000000000..7525df883da
--- /dev/null
+++ b/scala-package/assembly/src/main/assembly/assembly.xml
@@ -0,0 +1,57 @@
+<assembly>
+  <id>full</id>
+  <formats>
+    <format>jar</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <dependencySets>
+    <dependencySet>
+      <includes>
+        <include>*:*:jar</include>
+      </includes>
+      <excludes>
+        <exclude>org.scala-lang:*</exclude>
+        <exclude>org.scala-lang.modules:*</exclude>
+      </excludes>
+      <outputDirectory>/</outputDirectory>
+      <useProjectArtifact>true</useProjectArtifact>
+      <unpack>true</unpack>
+      <scope>runtime</scope>
+    </dependencySet>
+    <dependencySet>
+      <outputDirectory>lib/native</outputDirectory>
+      <outputFileNameMapping>libmxnet-scala.${libtype}</outputFileNameMapping>
+      <unpack>false</unpack>
+      <useProjectArtifact>false</useProjectArtifact>
+      <useStrictFiltering>false</useStrictFiltering>
+      <includes>
+        <include>org.apache.mxnet:libmxnet-scala:${libtype}</include>
+      </includes>
+    </dependencySet>
+  </dependencySets>
+  <fileSets>
+    <fileSet>
+      <directory>${MXNET_DIR}/lib</directory>
+      <includes>
+        <include>libmxnet.so</include>
+        <include>libgfortran.so.3</include>
+        <include>libquadmath.so.0</include>
+        <include>libiomp5.so</include>
+        <include>libiomp5.dylib</include>
+        <include>libmklml_intel.so</include>
+        <include>libmklml.dylib</include>
+        <include>libmkldnn.so.0</include>
+        <include>libmkldnn.0.dylib</include>
+      </includes>
+      <outputDirectory>lib/native</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>${MXNET_DIR}/3rdparty</directory>
+      <includes>
+        <include>cub/LICENSE.TXT</include>
+        <include>mkldnn/external/mklml_mac_2019.0.1.20180928/license.txt</include>
+      </includes>
+      <outputDirectory>/</outputDirectory>
+    </fileSet>
+  </fileSets>
+</assembly>
diff --git a/scala-package/assembly/src/main/assembly/javadoc.xml b/scala-package/assembly/src/main/assembly/javadoc.xml
new file mode 100644
index 00000000000..8f30a261811
--- /dev/null
+++ b/scala-package/assembly/src/main/assembly/javadoc.xml
@@ -0,0 +1,15 @@
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+  <id>bundle</id>
+  <formats>
+    <format>jar</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <fileSets>
+    <fileSet>
+      <directory>${rootdir}/core/target/site/scaladocs</directory>
+      <outputDirectory>/</outputDirectory>
+    </fileSet>
+  </fileSets>
+</assembly>
diff --git a/scala-package/assembly/src/main/assembly/source.xml b/scala-package/assembly/src/main/assembly/source.xml
new file mode 100644
index 00000000000..87fcde360c4
--- /dev/null
+++ b/scala-package/assembly/src/main/assembly/source.xml
@@ -0,0 +1,19 @@
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+  <id>src</id>
+  <!--This is the source jar generation config-->
+  <formats>
+    <format>jar</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <fileSets>
+    <fileSet>
+      <directory>${rootdir}/core/src/main/scala</directory>
+      <includes>
+        <include>**\/*.scala</include>
+      </includes>
+      <outputDirectory>/</outputDirectory>
+    </fileSet>
+  </fileSets>
+</assembly>
diff --git a/scala-package/assembly/src/source.xml b/scala-package/assembly/src/source.xml
deleted file mode 100644
index 0cbdcadf8d8..00000000000
--- a/scala-package/assembly/src/source.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
-  <id>src</id>
-  <!--This is the source jar generation config-->
-  <formats>
-    <format>jar</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <moduleSets>
-    <moduleSet>
-      <useAllReactorProjects>true</useAllReactorProjects>
-      <includes>
-        <!--Please put your module defs here-->
-        <include>org.apache.mxnet:mxnet-core_${scala.binary.version}</include>
-      </includes>
-      <sources>
-        <includeModuleDirectory>false</includeModuleDirectory>
-        <fileSets>
-          <fileSet>
-            <!--This helps clean the directory from src/main/scala/org/ -> org/-->
-            <directory>src/main/scala</directory>
-            <includes>
-              <include>**\/*.scala</include>
-            </includes>
-            <outputDirectory>/</outputDirectory>
-          </fileSet>
-        </fileSets>
-      </sources>
-    </moduleSet>
-  </moduleSets>
-</assembly>
\ No newline at end of file
diff --git a/scala-package/core/pom.xml b/scala-package/core/pom.xml
index 976383f2e7d..8a54890ac94 100644
--- a/scala-package/core/pom.xml
+++ b/scala-package/core/pom.xml
@@ -5,55 +5,70 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-parent_2.11</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <artifactId>mxnet-parent</artifactId>
+    <version>INTERNAL</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
-  <properties>
-    <skipTests>true</skipTests>
-    <MXNET_DIR>${project.parent.basedir}/..</MXNET_DIR>
-  </properties>
-
-  <artifactId>mxnet-core_2.11</artifactId>
+  <artifactId>mxnet-core</artifactId>
   <name>MXNet Scala Package - Core</name>
 
-  <profiles>
-    <profile>
-      <id>unittest</id>
-      <properties>
-        <skipTests>false</skipTests>
-      </properties>
-    </profile>
-    <profile>
-      <id>osx-x86_64-cpu</id>
-      <properties>
-        <platform>osx-x86_64-cpu</platform>
-      </properties>
-    </profile>
-    <profile>
-      <id>linux-x86_64-cpu</id>
-      <properties>
-        <platform>linux-x86_64-cpu</platform>
-      </properties>
-    </profile>
-    <profile>
-      <id>linux-x86_64-gpu</id>
-      <properties>
-        <platform>linux-x86_64-gpu</platform>
-      </properties>
-    </profile>
-  </profiles>
-
   <build>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>native-maven-plugin</artifactId>
+        <extensions>true</extensions>
+        <executions>
+          <execution>
+            <id>javah</id>
+            <phase>verify</phase>
+            <configuration>
+              <javahProvider>default</javahProvider>
+              <javahOutputDirectory>${project.build.directory}/custom-javah</javahOutputDirectory>
+              <workingDirectory>${basedir}</workingDirectory>
+              <javahOutputFileName>org_apache_mxnet_native_c_api.h</javahOutputFileName>
+              <javahClassNames>
+                <javahClassName>org.apache.mxnet.LibInfo</javahClassName>
+              </javahClassNames>
+            </configuration>
+            <goals>
+              <goal>javah</goal>
+            </goals>
+          </execution>
+        </executions>
       </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.6.0</version>
+        <executions>
+          <execution>
+            <id>verify-javah</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>diff</executable>
+              <commandlineArgs>${project.build.directory}/custom-javah/org_apache_mxnet_native_c_api.h ${project.parent.basedir}/native/src/main/native/org_apache_mxnet_native_c_api.h</commandlineArgs>
+            </configuration>
+          </execution>
+          <execution>
+            <id>apidoc-generation</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>java</executable>
+              <workingDirectory>${project.parent.basedir}</workingDirectory>
+              <commandlineArgs>-classpath %classpath:${rootdir}/init/target/classes:${rootdir}/macros/target/classes -Djava.library.path=${rootdir}/native/target org.apache.mxnet.APIDocGenerator ${rootdir}/core/src/main/scala/org/apache/mxnet/</commandlineArgs>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
@@ -69,18 +84,35 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-clean-plugin</artifactId>
+        <version>3.1.0</version>
+        <configuration>
+          <filesets>
+            <fileset>
+              <directory>src/main/scala/org/apache/mxnet</directory>
+              <includes>
+                <include>NDArrayAPIBase.scala</include>
+                <include>NDArrayBase.scala</include>
+                <include>NDArrayRandomAPIBase.scala</include>
+                <include>javaapi/NDArrayBase.scala</include>
+                <include>SymbolAPIBase.scala</include>
+                <include>SymbolRandomAPIBase.scala</include>
+              </includes>
+              <followSymlinks>false</followSymlinks>
+            </fileset>
+          </filesets>
+        </configuration>
+      </plugin>
       <plugin>
         <groupId>org.scalatest</groupId>
         <artifactId>scalatest-maven-plugin</artifactId>
         <configuration>
-          <skipTests>${skipTests}</skipTests>
           <argLine>
-            -Djava.library.path=${project.parent.basedir}/native/${platform}/target \
+            -Djava.library.path=${project.parent.basedir}/native/target \
             -Dlog4j.configuration=file://${project.basedir}/src/test/resources/log4j.properties
           </argLine>
-          <environmentVariables>
-            <LD_LIBRARY_PATH>${MXNET_DIR}/lib</LD_LIBRARY_PATH>
-          </environmentVariables>
         </configuration>
       </plugin>
       <plugin>
@@ -89,13 +121,8 @@
         <version>2.22.0</version>
         <configuration>
           <argLine>
-            -Djava.library.path=${project.parent.basedir}/native/${platform}/target
+            -Djava.library.path=${project.parent.basedir}/native/target
           </argLine>
-          <skipTests>${skipTests}</skipTests>
-          <forkMode>always</forkMode>
-          <environmentVariables>
-            <LD_LIBRARY_PATH>${MXNET_DIR}/lib</LD_LIBRARY_PATH>
-          </environmentVariables>
         </configuration>
       </plugin>
       <plugin>
@@ -107,14 +134,14 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-init_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
+      <artifactId>mxnet-macros</artifactId>
+      <version>INTERNAL</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-macros_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
+      <artifactId>mxnet-scala-init</artifactId>
+      <version>INTERNAL</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
diff --git a/scala-package/core/src/main/scala/org/apache/mxnet/Base.scala b/scala-package/core/src/main/scala/org/apache/mxnet/Base.scala
index bb9518d51f1..ed7aff602f6 100644
--- a/scala-package/core/src/main/scala/org/apache/mxnet/Base.scala
+++ b/scala-package/core/src/main/scala/org/apache/mxnet/Base.scala
@@ -67,6 +67,8 @@ private[mxnet] object Base {
           "Consider installing the library somewhere in the path " +
           "(for Windows: PATH, for Linux: LD_LIBRARY_PATH), " +
           "or specifying by Java cmd option -Djava.library.path=[lib path].")
+        logger.warn("LD_LIBRARY_PATH=" + System.getenv("LD_LIBRARY_PATH"))
+        logger.warn("java.library.path=" + System.getProperty("java.library.path"))
         NativeLibraryLoader.loadLibrary("mxnet-scala")
     }
   } catch {
@@ -87,35 +89,8 @@ private[mxnet] object Base {
 
   @throws(classOf[UnsatisfiedLinkError])
   private def tryLoadLibraryOS(libname: String): Unit = {
-    try {
-      logger.info(s"Try loading $libname from native path.")
-      System.loadLibrary(libname)
-    } catch {
-      case e: UnsatisfiedLinkError =>
-        val os = System.getProperty("os.name")
-        // ref: http://lopica.sourceforge.net/os.html
-        if (os.startsWith("Linux")) {
-          tryLoadLibraryXPU(libname, "linux-x86_64")
-        } else if (os.startsWith("Mac")) {
-          tryLoadLibraryXPU(libname, "osx-x86_64")
-        } else {
-          // TODO(yizhi) support windows later
-          throw new UnsatisfiedLinkError()
-        }
-    }
-  }
-
-  @throws(classOf[UnsatisfiedLinkError])
-  private def tryLoadLibraryXPU(libname: String, arch: String): Unit = {
-    try {
-      // try gpu first
-      logger.info(s"Try loading $libname-$arch-gpu from native path.")
-      System.loadLibrary(s"$libname-$arch-gpu")
-    } catch {
-      case e: UnsatisfiedLinkError =>
-        logger.info(s"Try loading $libname-$arch-cpu from native path.")
-        System.loadLibrary(s"$libname-$arch-cpu")
-    }
+    logger.info(s"Try loading $libname from native path.")
+    System.loadLibrary(libname)
   }
 
   // helper function definitions
diff --git a/scala-package/core/src/main/scala/org/apache/mxnet/util/NativeLibraryLoader.scala b/scala-package/core/src/main/scala/org/apache/mxnet/util/NativeLibraryLoader.scala
index 2ce893b478e..1e6d9c4f9fc 100644
--- a/scala-package/core/src/main/scala/org/apache/mxnet/util/NativeLibraryLoader.scala
+++ b/scala-package/core/src/main/scala/org/apache/mxnet/util/NativeLibraryLoader.scala
@@ -85,8 +85,16 @@ private[mxnet] object NativeLibraryLoader {
       }
     logger.debug(s"Attempting to load $loadLibname")
     val libFileInJar = libPathInJar + loadLibname
-    saveLibraryToTemp("libmxnet.so", "/lib/native/libmxnet.so")
-    val tempfile: File = saveLibraryToTemp(libname, libFileInJar)
+    saveLibraryToTemp("libmxnet.so", "/lib/native/libmxnet.so", true)
+    saveLibraryToTemp("libgfortran.so.3", "/lib/native/libgfortran.so.3", false)
+    saveLibraryToTemp("libquadmath.so.0", "/lib/native/libquadmath.so.0", false)
+    saveLibraryToTemp("libiomp5.so", "/lib/native/libiomp5.so", false)
+    saveLibraryToTemp("libiomp5.dylib", "/lib/native/libiomp5.dylib", false)
+    saveLibraryToTemp("libmklml_intel.so", "/lib/native/libmklml_intel.so", false)
+    saveLibraryToTemp("libmklml.dylib", "/lib/native/libmklml.dylib", false)
+    saveLibraryToTemp("libmkldnn.so.0", "/lib/native/libmkldnn.so.0", false)
+    saveLibraryToTemp("libmkldnn.0.dylib", "/lib/native/libmkldnn.0.dylib", false)
+    val tempfile: File = saveLibraryToTemp(libname, libFileInJar, true)
 
     loadLibraryFromFile(libname, tempfile)
   }
@@ -134,29 +142,34 @@ private[mxnet] object NativeLibraryLoader {
     *
     * @param libname name of the library (just used in constructing the library name)
     * @param resource String resource path in the jar file
+    * @param required true if library is required
     */
-  private def saveLibraryToTemp(libname: String, resource: String): File = {
+  private def saveLibraryToTemp(libname: String, resource: String, required: Boolean): File = {
     try {
       val is: InputStream = getClass.getResourceAsStream(resource)
       if (is == null) {
-        throw new UnsatisfiedLinkError(s"Couldn't find the resource $resource")
-      }
-
-      val tempfile: File = new File(_tempDir, libname)
-      val os: OutputStream = new FileOutputStream(tempfile)
-      logger.debug("tempfile.getPath() = {}", tempfile.getPath)
-      val savedTime: Long = System.currentTimeMillis
-      val buf: Array[Byte] = new Array[Byte](8192)
-      var len: Int = is.read(buf)
-      while (len > 0) {
-        os.write(buf, 0, len)
-        len = is.read(buf)
+        if (required) {
+          throw new UnsatisfiedLinkError(s"Couldn't find the resource $resource")
+        } else {
+          null
+        }
+      } else {
+        val tempfile: File = new File(_tempDir, libname)
+        val os: OutputStream = new FileOutputStream(tempfile)
+        logger.debug("tempfile.getPath() = {}", tempfile.getPath)
+        val savedTime: Long = System.currentTimeMillis
+        val buf: Array[Byte] = new Array[Byte](8192)
+        var len: Int = is.read(buf)
+        while (len > 0) {
+          os.write(buf, 0, len)
+          len = is.read(buf)
+        }
+        os.close()
+        is.close()
+        val seconds: Double = (System.currentTimeMillis - savedTime).toDouble / 1e3
+        logger.debug(s"Copying $libname took $seconds seconds.")
+        tempfile
       }
-      os.close()
-      is.close()
-      val seconds: Double = (System.currentTimeMillis - savedTime).toDouble / 1e3
-      logger.debug(s"Copying $libname took $seconds seconds.")
-      tempfile
     } catch {
       case io: IOException =>
         throw new UnsatisfiedLinkError(s"Could not create temp file for $libname")
diff --git a/scala-package/deploy/pom.xml b/scala-package/deploy/pom.xml
new file mode 100644
index 00000000000..c51aa9a9209
--- /dev/null
+++ b/scala-package/deploy/pom.xml
@@ -0,0 +1,140 @@
+<?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>
+  <parent>
+    <groupId>org.apache.mxnet</groupId>
+    <artifactId>mxnet-parent</artifactId>
+    <version>INTERNAL</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+
+  <artifactId>mxnet-deployment</artifactId>
+  <version>${revision}</version>
+  <name>MXNet Scala Package - Full ${platform}-only</name>
+  <packaging>pom</packaging>
+  <description>
+    Scala Package for Apache MXNet (Incubating) - flexible and efficient library for deep learning.
+  </description>
+
+  <properties>
+    <ARTIFACT_ID>mxnet-full_2.11-${platform}-${flavor}</ARTIFACT_ID>
+    <revision>1.5.0-SNAPSHOT</revision>
+    <repositoryId>apache.snapshots.https</repositoryId>
+    <repo_url>file://${project.build.directory}/repo</repo_url>
+    <deploy_asc_types/>
+    <deploy_asc_classifers/>
+    <deploy_asc_files/>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.mxnet</groupId>
+      <artifactId>mxnet-full_2.11</artifactId>
+      <version>INTERNAL</version>
+    </dependency>
+  </dependencies>
+
+  <profiles>
+    <profile>
+      <id>staging</id>
+      <properties>
+        <revision>1.5.0</revision>
+        <repositoryId>apache.releases.https</repositoryId>
+        <repo_url>https://repository.apache.org/content/repositories/staging</repo_url>
+        <deploy_asc_types>jar.asc,asc,asc</deploy_asc_types>
+        <deploy_asc_classifers>,sources.jar,javadoc.jar</deploy_asc_classifers>
+        <deploy_asc_files>
+          ../assembly/target/mxnet-full_2.11-INTERNAL.jar.asc,../assembly/target/mxnet-full_2.11-INTERNAL-src.jar.asc,../assembly/target/mxnet-full_2.11-INTERNAL-bundle.jar.asc
+        </deploy_asc_files>
+      </properties>
+    </profile>
+    <profile>
+      <id>nightly</id>
+      <properties>
+        <repositoryId>apache.snapshots.https</repositoryId>
+        <repo_url>https://repository.apache.org/content/repositories/snapshots</repo_url>
+      </properties>
+    </profile>
+  </profiles>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <attach>false</attach>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>com.google.code.maven-replacer-plugin</groupId>
+        <artifactId>replacer</artifactId>
+        <version>1.5.3</version>
+        <executions>
+          <execution>
+            <phase>deploy</phase>
+            <goals>
+              <goal>replace</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <file>${basedir}/src/main/deploy/deploy.xml</file>
+          <outputFile>${project.build.directory}/deploy.xml</outputFile>
+          <replacements>
+            <replacement>
+              <token>DESCRIPTION</token>
+              <value>${project.description}</value>
+            </replacement>
+            <replacement>
+              <token>ARTIFACT_ID</token>
+              <value>${ARTIFACT_ID}</value>
+            </replacement>
+            <replacement>
+              <token>PROJECT_VERSION</token>
+              <value>${project.version}</value>
+            </replacement>
+            <replacement>
+              <token>SCALA_VERSION</token>
+              <value>${scala.version}</value>
+            </replacement>
+          </replacements>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>deploy-file</id>
+            <phase>deploy</phase>
+            <goals>
+              <goal>deploy-file</goal>
+            </goals>
+            <configuration>
+              <description>${project.description}</description>
+              <repositoryId>${repositoryId}</repositoryId>
+              <url>${repo_url}</url>
+              <groupId>${project.groupId}</groupId>
+              <artifactId>${ARTIFACT_ID}</artifactId>
+              <version>${project.version}</version>
+              <packaging>jar</packaging>
+              <pomFile>${project.build.directory}/deploy.xml</pomFile>
+              <file>${rootdir}/assembly/target/mxnet-full_2.11-INTERNAL.jar</file>
+              <sources>${rootdir}/assembly/target/mxnet-full_2.11-INTERNAL-src.jar</sources>
+              <javadoc>${rootdir}/assembly/target/mxnet-full_2.11-INTERNAL-bundle.jar</javadoc>
+              <types>${deploy_asc_types}</types>
+              <classifiers>${deploy_asc_classifers}</classifiers>
+              <files>${deploy_asc_files}</files>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/scala-package/deploy/src/main/deploy/deploy.xml b/scala-package/deploy/src/main/deploy/deploy.xml
new file mode 100644
index 00000000000..97ba5f0ceb4
--- /dev/null
+++ b/scala-package/deploy/src/main/deploy/deploy.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+    xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.mxnet</groupId>
+  <artifactId>ARTIFACT_ID</artifactId>
+  <version>PROJECT_VERSION</version>
+  <description>DESCRIPTION</description>
+  <dependencies>
+    <dependency>
+      <groupId>org.scala-lang</groupId>
+      <artifactId>scala-library</artifactId>
+      <version>SCALA_VERSION</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.scala-lang</groupId>
+      <artifactId>scala-reflect</artifactId>
+      <version>SCALA_VERSION</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.scala-lang.modules</groupId>
+      <artifactId>scala-parser-combinators_2.11</artifactId>
+      <version>1.0.4</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.scala-lang</groupId>
+      <artifactId>scala-compiler</artifactId>
+      <version>SCALA_VERSION</version>
+      <scope>runtime</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/scala-package/examples/pom.xml b/scala-package/examples/pom.xml
index 3ebb39b9a67..564102a9f69 100644
--- a/scala-package/examples/pom.xml
+++ b/scala-package/examples/pom.xml
@@ -5,88 +5,18 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-parent_2.11</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <artifactId>mxnet-parent</artifactId>
+    <version>INTERNAL</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
-  <artifactId>mxnet-examples_2.11</artifactId>
+  <artifactId>mxnet-examples</artifactId>
   <name>MXNet Scala Package - Examples</name>
 
   <properties>
     <skipTests>true</skipTests>
-    <MXNET_DIR>${project.parent.basedir}/..</MXNET_DIR>
   </properties>
 
-  <profiles>
-    <profile>
-      <id>integrationtest</id>
-      <properties>
-        <skipTests>false</skipTests>
-      </properties>
-    </profile>
-    <profile>
-      <id>osx-x86_64-cpu</id>
-      <properties>
-        <platform>osx-x86_64-cpu</platform>
-      </properties>
-    </profile>
-    <profile>
-      <id>linux-x86_64-cpu</id>
-      <properties>
-        <platform>linux-x86_64-cpu</platform>
-      </properties>
-    </profile>
-    <profile>
-      <id>linux-x86_64-gpu</id>
-      <properties>
-        <platform>linux-x86_64-gpu</platform>
-      </properties>
-    </profile>
-    <profile>
-      <id>deployLocal</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-deploy-plugin</artifactId>
-            <configuration>
-              <skip>false</skip>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile>
-      <id>release</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-source-plugin</artifactId>
-            <configuration>
-              <skipSource>true</skipSource>
-            </configuration>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-gpg-plugin</artifactId>
-            <configuration>
-              <skip>true</skip>
-            </configuration>
-          </plugin>
-          <plugin>
-            <groupId>org.sonatype.plugins</groupId>
-            <artifactId>nexus-staging-maven-plugin</artifactId>
-            <configuration>
-              <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
   <build>
     <plugins>
       <plugin>
@@ -149,12 +79,9 @@
         <configuration>
           <skipTests>${skipTests}</skipTests>
           <argLine>
-            -Djava.library.path=${project.parent.basedir}/native/${platform}/target \
+            -Djava.library.path=${project.parent.basedir}/native/target \
             -Dlog4j.configuration=file://${project.basedir}/src/test/resources/log4j.properties
           </argLine>
-          <environmentVariables>
-            <LD_LIBRARY_PATH>${MXNET_DIR}/lib</LD_LIBRARY_PATH>
-          </environmentVariables>
         </configuration>
       </plugin>
       <plugin>
@@ -166,14 +93,14 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-core_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
+      <artifactId>mxnet-core</artifactId>
+      <version>INTERNAL</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-infer_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
+      <artifactId>mxnet-infer</artifactId>
+      <version>INTERNAL</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
diff --git a/scala-package/examples/scripts/module/mnist_mlp.sh b/scala-package/examples/scripts/module/mnist_mlp.sh
index 29306706dbb..e16e16e246b 100755
--- a/scala-package/examples/scripts/module/mnist_mlp.sh
+++ b/scala-package/examples/scripts/module/mnist_mlp.sh
@@ -18,7 +18,7 @@
 # under the License.
 
 ROOT_DIR=$(cd `dirname $0`/../../..; pwd)
-CLASSPATH=$ROOT_DIR/assembly/osx-x86_64-cpu/target/*:$ROOT_DIR/examples/target/*:$ROOT_DIR/examples/target/classes/lib/*
+CLASSPATH=$ROOT_DIR/assembly/osx-x86_64/target/*:$ROOT_DIR/examples/target/*:$ROOT_DIR/examples/target/classes/lib/*
 
 mkdir -p model
 java -Xmx4G -cp $CLASSPATH \
diff --git a/scala-package/examples/scripts/module/run_sequential_module.sh b/scala-package/examples/scripts/module/run_sequential_module.sh
index 9e1f30e3687..1e40d2dd83f 100644
--- a/scala-package/examples/scripts/module/run_sequential_module.sh
+++ b/scala-package/examples/scripts/module/run_sequential_module.sh
@@ -18,7 +18,7 @@
 # under the License.
 
 ROOT_DIR=$(cd `dirname $0`/../../..; pwd)
-CLASSPATH=$ROOT_DIR/assembly/linux-x86_64-cpu/target/*:$ROOT_DIR/examples/target/*:$ROOT_DIR/examples/target/classes/lib/*
+CLASSPATH=$ROOT_DIR/assembly/linux-x86_64/target/*:$ROOT_DIR/examples/target/*:$ROOT_DIR/examples/target/classes/lib/*
 
 DATA_DIR=$ROOT_DIR/core/data
 
diff --git a/scala-package/examples/scripts/run_visualization.sh b/scala-package/examples/scripts/run_visualization.sh
index 3e8f5cd784f..7f5b94fbe2b 100644
--- a/scala-package/examples/scripts/run_visualization.sh
+++ b/scala-package/examples/scripts/run_visualization.sh
@@ -19,7 +19,7 @@
 
 
 MXNET_ROOT=$(cd "$(dirname $0)/../../.."; pwd)
-CLASS_PATH=$MXNET_ROOT/scala-package/assembly/linux-x86_64-cpu/target/*:$MXNET_ROOT/scala-package/examples/target/*:$MXNET_ROOT/scala-package/examples/target/classes/lib/*
+CLASS_PATH=$MXNET_ROOT/scala-package/assembly/assembly/target/*:$MXNET_ROOT/scala-package/examples/target/*:$MXNET_ROOT/scala-package/examples/target/classes/lib/*
 
 # please install the Graphviz library
 # if you are using ubuntu, use the following command:
diff --git a/scala-package/infer/pom.xml b/scala-package/infer/pom.xml
index fb5cf370a00..68b76c8b65a 100644
--- a/scala-package/infer/pom.xml
+++ b/scala-package/infer/pom.xml
@@ -2,106 +2,63 @@
 <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>
-    <parent>
-        <artifactId>mxnet-parent_2.11</artifactId>
-        <groupId>org.apache.mxnet</groupId>
-        <version>1.5.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>mxnet-parent</artifactId>
+    <groupId>org.apache.mxnet</groupId>
+    <version>INTERNAL</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
 
-    <artifactId>mxnet-infer_2.11</artifactId>
-    <name>MXNet Scala Package - Inference</name>
+  <artifactId>mxnet-infer</artifactId>
+  <name>MXNet Scala Package - Inference</name>
 
-    <properties>
-        <skipTests>true</skipTests>
-        <MXNET_DIR>${project.parent.basedir}/..</MXNET_DIR>
-    </properties>
-
-    <profiles>
-        <profile>
-            <id>unittest</id>
-            <properties>
-                <skipTests>false</skipTests>
-            </properties>
-        </profile>
-        <profile>
-            <id>osx-x86_64-cpu</id>
-            <properties>
-                <platform>osx-x86_64-cpu</platform>
-            </properties>
-        </profile>
-        <profile>
-            <id>linux-x86_64-cpu</id>
-            <properties>
-                <platform>linux-x86_64-cpu</platform>
-            </properties>
-        </profile>
-        <profile>
-            <id>linux-x86_64-gpu</id>
-            <properties>
-                <platform>linux-x86_64-gpu</platform>
-            </properties>
-        </profile>
-    </profiles>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>META-INF/*.SF</exclude>
-                        <exclude>META-INF/*.DSA</exclude>
-                        <exclude>META-INF/*.RSA</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.scalatest</groupId>
-                <artifactId>scalatest-maven-plugin</artifactId>
-                <configuration>
-                    <skipTests>${skipTests}</skipTests>
-                    <argLine>
-                        -Djava.library.path=${project.parent.basedir}/native/${platform}/target \
-                        -Dlog4j.configuration=file://${project.basedir}/src/test/resources/log4j.properties
-                    </argLine>
-                    <environmentVariables>
-                        <LD_LIBRARY_PATH>${MXNET_DIR}/lib</LD_LIBRARY_PATH>
-                    </environmentVariables>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.scalastyle</groupId>
-                <artifactId>scalastyle-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.mxnet</groupId>
-            <artifactId>mxnet-core_${scala.binary.version}</artifactId>
-            <version>1.5.0-SNAPSHOT</version>
-            <scope>provided</scope>
-        </dependency>
-        <!-- https://mvnrepository.com/artifact/org.mockito/mockito-all -->
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-all</artifactId>
-            <version>1.10.19</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>META-INF/*.SF</exclude>
+            <exclude>META-INF/*.DSA</exclude>
+            <exclude>META-INF/*.RSA</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.scalatest</groupId>
+        <artifactId>scalatest-maven-plugin</artifactId>
+        <configuration>
+          <argLine>
+            -Djava.library.path=${project.parent.basedir}/native/target \
+            -Dlog4j.configuration=file://${project.basedir}/src/test/resources/log4j.properties
+          </argLine>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.scalastyle</groupId>
+        <artifactId>scalastyle-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.mxnet</groupId>
+      <artifactId>mxnet-core</artifactId>
+      <version>INTERNAL</version>
+      <scope>provided</scope>
+    </dependency>
+    <!-- https://mvnrepository.com/artifact/org.mockito/mockito-all -->
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <version>1.10.19</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
 </project>
diff --git a/scala-package/init-native/linux-x86_64/pom.xml b/scala-package/init-native/linux-x86_64/pom.xml
deleted file mode 100644
index 242f2f3d562..00000000000
--- a/scala-package/init-native/linux-x86_64/pom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-<?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>
-  <parent>
-    <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-scala-init-native-parent</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>libmxnet-init-scala-linux-x86_64</artifactId>
-  <name>MXNet Scala Package - Initializer Native Linux-x86_64</name>
-  <url>http://maven.apache.org</url>
-
-  <packaging>so</packaging>
-
-  <properties>
-    <MXNET_DIR>${project.parent.parent.basedir}/..</MXNET_DIR>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-init_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-      <type>jar</type>
-      <scope>compile</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>native-maven-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <!--  trigger javah -->
-          <javahOS>linux</javahOS>
-          <compilerProvider>generic-classic</compilerProvider>
-          <compilerExecutable>${cxx}</compilerExecutable>
-          <linkerExecutable>${cxx}</linkerExecutable>
-          <sources>
-            <source>
-              <directory>../src/main/native</directory>
-              <fileNames>
-                <fileName>org_apache_mxnet_init_native_c_api.cc</fileName>
-              </fileNames>
-            </source>
-          </sources>
-          <compilerStartOptions>
-            <compilerStartOption>-std=c++0x</compilerStartOption>
-          </compilerStartOptions>
-          <compilerEndOptions>
-            <compilerEndOption>-I${MXNET_DIR}/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/dmlc-core/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/mshadow</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/dlpack/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/tvm/nnvm/include</compilerEndOption>
-            <compilerEndOption>-DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</compilerEndOption>
-            <compilerEndOption>-O3 -DNDEBUG=1 -fPIC -msse3 -mf16c</compilerEndOption>
-            <compilerEndOption>-Wall -Wsign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs</compilerEndOption>
-          </compilerEndOptions>
-          <linkerStartOptions>
-            <linkerStartOption>-shared</linkerStartOption>
-          </linkerStartOptions>
-          <linkerMiddleOptions>
-            <linkerMiddleOption>-Wl,--whole-archive</linkerMiddleOption>
-            <linkerMiddleOption>-Wl,--no-whole-archive -pthread -lm -fopenmp -lrt</linkerMiddleOption>
-          </linkerMiddleOptions>
-          <linkerEndOptions>
-            <linkerEndOption>-Wl,-rpath=${dollar}ORIGIN -lmxnet -L${MXNET_DIR}/lib</linkerEndOption>
-          </linkerEndOptions>
-        </configuration>
-
-        <executions>
-          <execution>
-            <id>javah</id>
-            <phase>generate-sources</phase>
-            <configuration>
-              <javahProvider>default</javahProvider>
-              <javahOutputDirectory>${project.build.directory}/custom-javah</javahOutputDirectory>
-              <workingDirectory>${basedir}</workingDirectory>
-              <javahOutputFileName>org_apache_mxnet_init_native_c_api.h</javahOutputFileName>
-              <javahClassNames>
-                <javahClassName>org.apache.mxnet.init.LibInfo</javahClassName>
-              </javahClassNames>
-            </configuration>
-            <goals>
-              <goal>javah</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>exec-maven-plugin</artifactId>
-        <version>1.6.0</version>
-        <executions>
-          <execution>
-            <id>link-native-lib</id>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>ln</executable>
-              <commandlineArgs>-sf ${MXNET_DIR}/lib/libmxnet.so ${project.build.directory}/libmxnet.so</commandlineArgs>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/scala-package/init-native/osx-x86_64/pom.xml b/scala-package/init-native/osx-x86_64/pom.xml
deleted file mode 100644
index 1c3966f477e..00000000000
--- a/scala-package/init-native/osx-x86_64/pom.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?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>
-  <parent>
-    <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-scala-init-native-parent</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>libmxnet-init-scala-osx-x86_64</artifactId>
-  <name>MXNet Scala Package - Initializer Native OSX-x86_64</name>
-  <url>http://maven.apache.org</url>
-
-  <packaging>jnilib</packaging>
-
-  <properties>
-    <MXNET_DIR>${project.parent.parent.basedir}/..</MXNET_DIR>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-init_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-      <type>jar</type>
-      <scope>compile</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>native-maven-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <!--  trigger javah -->
-          <javahOS>darwin</javahOS>
-          <compilerProvider>generic-classic</compilerProvider>
-          <compilerExecutable>${cxx}</compilerExecutable>
-          <linkerExecutable>${cxx}</linkerExecutable>
-          <sources>
-            <source>
-              <directory>../src/main/native</directory>
-              <fileNames>
-                <fileName>org_apache_mxnet_init_native_c_api.cc</fileName>
-              </fileNames>
-            </source>
-          </sources>
-          <compilerStartOptions>
-            <compilerStartOption>-std=c++0x</compilerStartOption>
-          </compilerStartOptions>
-          <compilerEndOptions>
-            <compilerEndOption>-I${MXNET_DIR}/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/dmlc-core/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/mshadow</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/dlpack/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/tvm/nnvm/include</compilerEndOption>
-            <compilerEndOption>-DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</compilerEndOption>
-            <compilerEndOption>-g -O0 -fPIC -msse3 -mf16c</compilerEndOption>
-            <compilerEndOption>-Wall -Wsign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs</compilerEndOption>
-          </compilerEndOptions>
-          <linkerStartOptions>
-            <linkerStartOption>-shared</linkerStartOption>
-          </linkerStartOptions>
-          <linkerMiddleOptions>
-            <linkerMiddleOption>-framework JavaVM</linkerMiddleOption>
-            <linkerMiddleOption>-Wl,-exported_symbol,_Java_*</linkerMiddleOption>
-            <linkerMiddleOption>-Wl,-x</linkerMiddleOption>
-          </linkerMiddleOptions>
-          <linkerEndOptions>
-            <linkerEndOption>-lmxnet -L${MXNET_DIR}/lib</linkerEndOption>
-          </linkerEndOptions>
-        </configuration>
-
-        <executions>
-          <execution>
-            <id>javah</id>
-            <phase>generate-sources</phase>
-            <configuration>
-              <javahProvider>default</javahProvider>
-              <javahOutputDirectory>${project.build.directory}/custom-javah</javahOutputDirectory>
-              <workingDirectory>${basedir}</workingDirectory>
-              <javahOutputFileName>org_apache_mxnet_init_native_c_api.h</javahOutputFileName>
-              <javahClassNames>
-                <javahClassName>org.apache.mxnet.init.LibInfo</javahClassName>
-              </javahClassNames>
-            </configuration>
-            <goals>
-              <goal>javah</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>exec-maven-plugin</artifactId>
-        <version>1.6.0</version>
-        <executions>
-          <execution>
-            <id>post-native-build</id>
-            <phase>package</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>install_name_tool</executable>
-              <commandlineArgs>-change @rpath/libmxnet.so @loader_path/libmxnet.so ${project.build.directory}/${artifactId}.jnilib</commandlineArgs>
-            </configuration>
-          </execution>
-          <execution>
-            <id>link-native-lib</id>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>ln</executable>
-              <commandlineArgs>-sf ${MXNET_DIR}/lib/libmxnet.so ${project.build.directory}/libmxnet.so</commandlineArgs>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/scala-package/init-native/pom.xml b/scala-package/init-native/pom.xml
index bed216e4503..1721f8cbd40 100644
--- a/scala-package/init-native/pom.xml
+++ b/scala-package/init-native/pom.xml
@@ -5,46 +5,170 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-parent_2.11</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <artifactId>mxnet-parent</artifactId>
+    <version>INTERNAL</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
-  <artifactId>mxnet-scala-init-native-parent</artifactId>
-  <name>MXNet Scala Package - Initializer Native Parent</name>
-  <packaging>pom</packaging>
+  <artifactId>libmxnet-init-scala</artifactId>
+  <name>MXNet Scala Package - Initializer Native</name>
+
+  <properties>
+    <MXNET_DIR>${project.parent.basedir}/..</MXNET_DIR>
+  </properties>
+
+  <packaging>${libtype}</packaging>
 
   <profiles>
     <profile>
-      <id>osx-x86_64-cpu</id>
-      <modules>
-        <module>osx-x86_64</module>
-      </modules>
-    </profile>
-    <profile>
-      <id>linux-x86_64-cpu</id>
-      <modules>
-        <module>linux-x86_64</module>
-      </modules>
+      <id>osx-x86_64</id>
+      <activation>
+        <os><family>mac</family></os>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>native-maven-plugin</artifactId>
+            <extensions>true</extensions>
+            <configuration>
+              <javahOS>darwin</javahOS>
+              <compilerProvider>generic-classic</compilerProvider>
+              <compilerExecutable>${cxx}</compilerExecutable>
+              <linkerExecutable>${cxx}</linkerExecutable>
+              <sources>
+                <source>
+                  <directory>src/main/native</directory>
+                  <fileNames>
+                    <fileName>org_apache_mxnet_init_native_c_api.cc</fileName>
+                  </fileNames>
+                </source>
+              </sources>
+              <compilerStartOptions>
+                <compilerStartOption>-std=c++0x</compilerStartOption>
+              </compilerStartOptions>
+              <compilerEndOptions>
+                <compilerEndOption>-I${MXNET_DIR}/include</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/dmlc-core/include</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/mshadow</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/dlpack/include</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/tvm/nnvm/include</compilerEndOption>
+                <compilerEndOption>-DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</compilerEndOption>
+                <compilerEndOption>-g -O0 -fPIC -msse3 -mf16c</compilerEndOption>
+                <compilerEndOption>-Wall -Wsign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs</compilerEndOption>
+              </compilerEndOptions>
+              <linkerStartOptions>
+                <linkerStartOption>-shared</linkerStartOption>
+              </linkerStartOptions>
+              <linkerMiddleOptions>
+                <linkerMiddleOption>-framework JavaVM</linkerMiddleOption>
+                <linkerMiddleOption>-Wl,-exported_symbol,_Java_*</linkerMiddleOption>
+                <linkerMiddleOption>-Wl,-x</linkerMiddleOption>
+              </linkerMiddleOptions>
+              <linkerEndOptions>
+                <linkerEndOption>-lmxnet -L${MXNET_DIR}/lib</linkerEndOption>
+              </linkerEndOptions>
+            </configuration>
+          </plugin>
+
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>exec-maven-plugin</artifactId>
+            <version>1.6.0</version>
+            <executions>
+              <execution>
+                <id>post-native-build</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>exec</goal>
+                </goals>
+                <configuration>
+                  <executable>install_name_tool</executable>
+                  <commandlineArgs>-add_rpath @loader_path ${project.build.directory}/${project.artifactId}.jnilib</commandlineArgs>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
     </profile>
     <profile>
-      <id>linux-x86_64-gpu</id>
-      <modules>
-        <module>linux-x86_64</module>
-      </modules>
+      <id>linux-x86_64</id>
+      <activation>
+        <os>
+          <family>unix</family>
+          <name>Linux</name>
+        </os>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>native-maven-plugin</artifactId>
+            <extensions>true</extensions>
+            <configuration>
+              <javahOS>linux</javahOS>
+              <compilerProvider>generic-classic</compilerProvider>
+              <compilerExecutable>${cxx}</compilerExecutable>
+              <linkerExecutable>${cxx}</linkerExecutable>
+              <sources>
+                <source>
+                  <directory>src/main/native</directory>
+                  <fileNames>
+                    <fileName>org_apache_mxnet_init_native_c_api.cc</fileName>
+                  </fileNames>
+                </source>
+              </sources>
+              <compilerStartOptions>
+                <compilerStartOption>-std=c++0x</compilerStartOption>
+              </compilerStartOptions>
+              <compilerEndOptions>
+                <compilerEndOption>-I${MXNET_DIR}/include</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/dmlc-core/include</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/mshadow</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/dlpack/include</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/tvm/nnvm/include</compilerEndOption>
+                <compilerEndOption>-DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</compilerEndOption>
+                <compilerEndOption>-O3 -DNDEBUG=1 -fPIC -msse3 -mf16c</compilerEndOption>
+                <compilerEndOption>-Wall -Wsign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs</compilerEndOption>
+              </compilerEndOptions>
+              <linkerStartOptions>
+                <linkerStartOption>-shared</linkerStartOption>
+              </linkerStartOptions>
+              <linkerMiddleOptions>
+                <linkerMiddleOption>-Wl,--whole-archive</linkerMiddleOption>
+                <linkerMiddleOption>-Wl,--no-whole-archive -pthread -lm -fopenmp -lrt</linkerMiddleOption>
+              </linkerMiddleOptions>
+              <linkerEndOptions>
+                <linkerEndOption>-Wl,-rpath=${dollar}ORIGIN -lmxnet -L${MXNET_DIR}/lib</linkerEndOption>
+              </linkerEndOptions>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
     </profile>
   </profiles>
 
   <build>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.6.0</version>
+        <executions>
+          <execution>
+            <id>link-native-lib</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>bash</executable>
+              <commandlineArgs>-c 'ln -sf ${MXNET_DIR}/lib/* ${project.build.directory}/'</commandlineArgs>
+            </configuration>
+          </execution>
+        </executions>
       </plugin>
     </plugins>
   </build>
-
 </project>
diff --git a/scala-package/init-native/src/main/native/org_apache_mxnet_init_native_c_api.h b/scala-package/init-native/src/main/native/org_apache_mxnet_init_native_c_api.h
new file mode 100644
index 00000000000..6ff6ae6a107
--- /dev/null
+++ b/scala-package/init-native/src/main/native/org_apache_mxnet_init_native_c_api.h
@@ -0,0 +1,45 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_apache_mxnet_init_LibInfo */
+
+#ifndef _Included_org_apache_mxnet_init_LibInfo
+#define _Included_org_apache_mxnet_init_LibInfo
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_apache_mxnet_init_LibInfo
+ * Method:    mxSymbolListAtomicSymbolCreators
+ * Signature: (Lscala/collection/mutable/ListBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_init_LibInfo_mxSymbolListAtomicSymbolCreators
+  (JNIEnv *, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_init_LibInfo
+ * Method:    mxSymbolGetAtomicSymbolInfo
+ * Signature: (JLorg/apache/mxnet/init/Base/RefString;Lorg/apache/mxnet/init/Base/RefString;Lorg/apache/mxnet/init/Base/RefInt;Lscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;Lorg/apache/mxnet/init/Base/RefString;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_init_LibInfo_mxSymbolGetAtomicSymbolInfo
+  (JNIEnv *, jobject, jlong, jobject, jobject, jobject, jobject, jobject, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_init_LibInfo
+ * Method:    mxListAllOpNames
+ * Signature: (Lscala/collection/mutable/ListBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_init_LibInfo_mxListAllOpNames
+  (JNIEnv *, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_init_LibInfo
+ * Method:    nnGetOpHandle
+ * Signature: (Ljava/lang/String;Lorg/apache/mxnet/init/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_init_LibInfo_nnGetOpHandle
+  (JNIEnv *, jobject, jstring, jobject);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/scala-package/init/pom.xml b/scala-package/init/pom.xml
index 4278df6f2e7..a0bb6be384b 100644
--- a/scala-package/init/pom.xml
+++ b/scala-package/init/pom.xml
@@ -5,65 +5,62 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-parent_2.11</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
-<!--  <relativePath>../pom.xml</relativePath>-->
+    <artifactId>mxnet-parent</artifactId>
+    <version>INTERNAL</version>
+    <relativePath>../pom.xml</relativePath>
   </parent>
 
-  <artifactId>mxnet-init_2.11</artifactId>
+  <artifactId>mxnet-scala-init</artifactId>
   <name>MXNet Scala Package - Initializer</name>
 
-  <profiles>
-    <profile>
-      <id>osx-x86_64-cpu</id>
-      <properties>
-        <platform>osx-x86_64-cpu</platform>
-      </properties>
-    </profile>
-    <profile>
-      <id>linux-x86_64-cpu</id>
-      <properties>
-        <platform>linux-x86_64-cpu</platform>
-      </properties>
-    </profile>
-    <profile>
-      <id>linux-x86_64-gpu</id>
-      <properties>
-        <platform>linux-x86_64-gpu</platform>
-      </properties>
-    </profile>
-    <profile>
-      <id>apache-release</id>
-   <!--Running the compile-backend inside a different profile did not work when used with apache-release profile for release-perform-->
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>exec-maven-plugin</artifactId>
-            <version>1.6.0</version>
-            <executions>
-              <execution>
-                <id>compile-mxnet-backend</id>
-                <phase>compile</phase>
-                <goals>
-                  <goal>exec</goal>
-                </goals>
-                <configuration>
-                  <executable>bash</executable>
-                  <commandlineArgs>${project.parent.basedir}/dev/compile-mxnet-backend.sh ${build.platform} ${project.parent.basedir}/../</commandlineArgs>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-deploy-plugin</artifactId>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>native-maven-plugin</artifactId>
+        <extensions>true</extensions>
+        <executions>
+          <execution>
+            <id>javah</id>
+            <phase>verify</phase>
             <configuration>
-              <skip>true</skip>
+              <javahProvider>default</javahProvider>
+              <javahOutputDirectory>${project.build.directory}/custom-javah</javahOutputDirectory>
+              <workingDirectory>${basedir}</workingDirectory>
+              <javahOutputFileName>org_apache_mxnet_init_native_c_api.h</javahOutputFileName>
+              <javahClassNames>
+                <javahClassName>org.apache.mxnet.init.LibInfo</javahClassName>
+              </javahClassNames>
             </configuration>
-          </plugin>
-        </plugins>
-      </build>
-      </profile>
-  </profiles>
+            <goals>
+              <goal>javah</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.6.0</version>
+        <executions>
+          <execution>
+            <id>verify-javah</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>diff</executable>
+              <commandlineArgs>
+                ${project.build.directory}/custom-javah/org_apache_mxnet_init_native_c_api.h
+                ${project.parent.basedir}/init-native/src/main/native/org_apache_mxnet_init_native_c_api.h
+              </commandlineArgs>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>
diff --git a/scala-package/init/src/main/scala/org/apache/mxnet/init/Base.scala b/scala-package/init/src/main/scala/org/apache/mxnet/init/Base.scala
index 7402dbd3bc1..b5a6286af1b 100644
--- a/scala-package/init/src/main/scala/org/apache/mxnet/init/Base.scala
+++ b/scala-package/init/src/main/scala/org/apache/mxnet/init/Base.scala
@@ -17,6 +17,8 @@
 
 package org.apache.mxnet.init
 
+import java.io.File
+
 object Base {
   tryLoadInitLibrary()
   val _LIB = new LibInfo
@@ -37,18 +39,22 @@ object Base {
 
   @throws(classOf[UnsatisfiedLinkError])
   private def tryLoadInitLibrary(): Unit = {
-    var baseDir = System.getProperty("user.dir") + "/init-native"
-    // TODO(lanKing520) Update this to use relative path to the MXNet director.
-    // TODO(lanking520) baseDir = sys.env("MXNET_BASEDIR") + "/scala-package/init-native"
-    if (System.getenv().containsKey("MXNET_BASEDIR")) {
-      baseDir = sys.env("MXNET_BASEDIR")
+    var userDir : File = new File(System.getProperty("user.dir"))
+    var nativeDir : File = new File(userDir, "init-native")
+    if (!nativeDir.exists()) {
+      nativeDir = new File(userDir.getParent, "init-native")
+      if (!nativeDir.exists()) {
+        throw new IllegalStateException("scala-init should be executed inside scala-package folder")
+      }
     }
+    val baseDir = nativeDir.getAbsolutePath
+
     val os = System.getProperty("os.name")
     // ref: http://lopica.sourceforge.net/os.html
     if (os.startsWith("Linux")) {
-      System.load(s"$baseDir/linux-x86_64/target/libmxnet-init-scala-linux-x86_64.so")
+      System.load(s"$baseDir/target/libmxnet-init-scala.so")
     } else if (os.startsWith("Mac")) {
-      System.load(s"$baseDir/osx-x86_64/target/libmxnet-init-scala-osx-x86_64.jnilib")
+      System.load(s"$baseDir/target/libmxnet-init-scala.jnilib")
     } else {
       // TODO(yizhi) support windows later
       throw new UnsatisfiedLinkError()
diff --git a/scala-package/macros/pom.xml b/scala-package/macros/pom.xml
index cd56060b4b3..52dfde181d7 100644
--- a/scala-package/macros/pom.xml
+++ b/scala-package/macros/pom.xml
@@ -5,63 +5,20 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-parent_2.11</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <artifactId>mxnet-parent</artifactId>
+    <version>INTERNAL</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
-  <artifactId>mxnet-macros_2.11</artifactId>
+  <artifactId>mxnet-macros</artifactId>
   <name>MXNet Scala Package - Macros</name>
 
-  <profiles>
-    <profile>
-      <id>unittest</id>
-      <properties>
-        <skiptest>false</skiptest>
-      </properties>
-    </profile>
-    <profile>
-      <id>integrationtest</id>
-      <properties>
-        <skiptest>true</skiptest>
-      </properties>
-    </profile>
-    <profile>
-      <id>osx-x86_64-cpu</id>
-      <properties>
-        <platform>osx-x86_64</platform>
-        <libtype>jnilib</libtype>
-      </properties>
-    </profile>
-    <profile>
-      <id>linux-x86_64-cpu</id>
-      <properties>
-        <platform>linux-x86_64</platform>
-        <libtype>so</libtype>
-      </properties>
-    </profile>
-    <profile>
-      <id>linux-x86_64-gpu</id>
-      <properties>
-        <platform>linux-x86_64</platform>
-        <libtype>so</libtype>
-      </properties>
-    </profile>
-  </profiles>
-
   <dependencies>
     <dependency>
       <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-init_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>libmxnet-init-scala-${platform}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
+      <artifactId>mxnet-scala-init</artifactId>
+      <version>INTERNAL</version>
       <scope>provided</scope>
-      <type>${libtype}</type>
     </dependency>
     <dependency>
       <groupId>commons-io</groupId>
@@ -70,16 +27,8 @@
     </dependency>
   </dependencies>
 
-
   <build>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
@@ -95,39 +44,15 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>exec-maven-plugin</artifactId>
-        <version>1.6.0</version>
-        <executions>
-          <execution>
-            <id>apidoc-generation</id>
-            <phase>package</phase>
-            <goals>
-              <goal>java</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <additionalClasspathElements>
-            <additionalClasspathElement>${project.parent.basedir}/init/target/classes</additionalClasspathElement>
-          </additionalClasspathElements>
-          <arguments>
-            <argument>${project.parent.basedir}/core/src/main/scala/org/apache/mxnet/</argument>
-          </arguments>
-          <mainClass>org.apache.mxnet.APIDocGenerator</mainClass>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.scalatest</groupId>
         <artifactId>scalatest-maven-plugin</artifactId>
         <configuration>
-          <skipTests>${skiptest}</skipTests>
           <environmentVariables>
             <MXNET_BASEDIR>${project.parent.basedir}/init-native</MXNET_BASEDIR>
           </environmentVariables>
           <argLine>
-            -Djava.library.path=${project.parent.basedir}/native/${platform}/target \
+            -Djava.library.path=${project.parent.basedir}/native/target \
             -Dlog4j.configuration=file://${project.basedir}/src/test/resources/log4j.properties
           </argLine>
         </configuration>
@@ -138,5 +63,4 @@
       </plugin>
     </plugins>
   </build>
-
 </project>
diff --git a/scala-package/macros/src/main/scala/org/apache/mxnet/APIDocGenerator.scala b/scala-package/macros/src/main/scala/org/apache/mxnet/APIDocGenerator.scala
index 97cd18a5b33..ede16f73d2a 100644
--- a/scala-package/macros/src/main/scala/org/apache/mxnet/APIDocGenerator.scala
+++ b/scala-package/macros/src/main/scala/org/apache/mxnet/APIDocGenerator.scala
@@ -255,21 +255,21 @@ private[mxnet] object APIDocGenerator extends GeneratorBase with RandomHelpers {
 
     val finalStr =
       s"""/*
-         |* 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.
-         |*/
+         | * 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.
+         | */
          |
          |$packageDef
          |
diff --git a/scala-package/mxnet-demo/java-demo/Makefile b/scala-package/mxnet-demo/java-demo/Makefile
index e4698bbcea3..4f2b5e93897 100644
--- a/scala-package/mxnet-demo/java-demo/Makefile
+++ b/scala-package/mxnet-demo/java-demo/Makefile
@@ -16,7 +16,7 @@
 # under the License.
 
 SCALA_VERSION_PROFILE := 2.11
-MXNET_VERSION := [1.4.0-SNAPSHOT,\)
+MXNET_VERSION := [1.5.0-SNAPSHOT,\)
 
 ifeq ($(OS),Windows_NT)
 	UNAME_S := Windows
diff --git a/scala-package/mxnet-demo/java-demo/README.md b/scala-package/mxnet-demo/java-demo/README.md
index 54a56baf79e..ca2828ae405 100644
--- a/scala-package/mxnet-demo/java-demo/README.md
+++ b/scala-package/mxnet-demo/java-demo/README.md
@@ -12,7 +12,7 @@ You can use the following instruction as an alternative to achieve the same resu
 User are required to use `mvn package` to build the package,
  which are shown below:
 ```Bash
-export SCALA_VERSION_PROFILE=2.11 MXNET_VERSION=1.4.0-SNAPSHOT
+export SCALA_VERSION_PROFILE=2.11 MXNET_VERSION=1.5.0-SNAPSHOT
 export SCALA_PKG_PROFILE=
 mvn package -Dmxnet.profile=$SCALA_PKG_PROFILE \
 		-Dmxnet.scalaprofile=$SCALA_VERSION_PROFILE \
@@ -87,5 +87,5 @@ sudo apt install libopencv-imgcodecs3.4
 
 Is there any other version available?
 
-You can find nightly release version from [here](https://repository.apache.org/#nexus-search;gav~org.apache.mxnet~~1.4.0-SNAPSHOT~~).
+You can find nightly release version from [here](https://repository.apache.org/#nexus-search;gav~org.apache.mxnet~~1.5.0-SNAPSHOT~~).
 Please keep the same version in the Makefile or [above version](https://repository.apache.org/#nexus-search;gav~org.apache.mxnet~~~~) to run this demo.
diff --git a/scala-package/mxnet-demo/scala-demo/pom.xml b/scala-package/mxnet-demo/scala-demo/pom.xml
index 8fc30e78cac..a908487cd21 100644
--- a/scala-package/mxnet-demo/scala-demo/pom.xml
+++ b/scala-package/mxnet-demo/scala-demo/pom.xml
@@ -4,7 +4,7 @@
          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>
     <groupId>Demo</groupId>
-    <artifactId>mxnet-scala-demo_2.11</artifactId>
+    <artifactId>mxnet-scala-demo</artifactId>
     <version>1.0-SNAPSHOT</version>
     <name>MXNet Scala Demo</name>
     <packaging>pom</packaging>
diff --git a/scala-package/native/README.md b/scala-package/native/README.md
index cb6dd3890dd..c87b064fff0 100644
--- a/scala-package/native/README.md
+++ b/scala-package/native/README.md
@@ -6,7 +6,11 @@ MXNet Scala JNI is a thin wrapper layer of underlying libmxnet.so.
 JNI native code requires a header file that matches the java/scala interface,
 this file is usually generated with javah.
 
-In our case, jni_helper_func.h is generated and will be used to compile native code.
+In our case, org_apache_mxnet_native_c.h is generated and will be used to compile native code.
+
+To improve build performance, we check in generated org_apache_mxnet_native_c.h file.
+And we added a check to detect mismatch with Scala code and generated header. The checker will
+make sure we won't forget to update org_apache_mxnet_native_c.h file.
 
 
 ## Linker options
diff --git a/scala-package/native/linux-x86_64-cpu/pom.xml b/scala-package/native/linux-x86_64-cpu/pom.xml
deleted file mode 100644
index 7cfd01a4ef7..00000000000
--- a/scala-package/native/linux-x86_64-cpu/pom.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?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>
-  <parent>
-    <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-scala-native-parent</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>libmxnet-scala-linux-x86_64-cpu</artifactId>
-  <name>MXNet Scala Package - Native Linux-x86_64 CPU-only</name>
-  <url>http://maven.apache.org</url>
-
-  <packaging>so</packaging>
-
-  <properties>
-    <MXNET_DIR>${project.parent.parent.basedir}/..</MXNET_DIR>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-core_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-      <type>jar</type>
-      <scope>compile</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>native-maven-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <!--  trigger javah -->
-          <javahOS>linux</javahOS>
-          <compilerProvider>generic-classic</compilerProvider>
-          <compilerExecutable>${cxx}</compilerExecutable>
-          <linkerExecutable>${cxx}</linkerExecutable>
-          <sources>
-            <source>
-              <directory>../src/main/native</directory>
-              <fileNames>
-                <fileName>org_apache_mxnet_native_c_api.cc</fileName>
-              </fileNames>
-            </source>
-          </sources>
-          <compilerStartOptions>
-            <compilerStartOption>-std=c++0x</compilerStartOption>
-          </compilerStartOptions>
-          <compilerEndOptions>
-            <compilerEndOption>-I${MXNET_DIR}/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/dmlc-core/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/mshadow</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/dlpack/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/tvm/nnvm/include</compilerEndOption>
-            <compilerEndOption>-DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</compilerEndOption>
-            <compilerEndOption>-O3 -DNDEBUG=1 -fPIC -msse3 -mf16c</compilerEndOption>
-            <compilerEndOption>-Wall -Wsign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs</compilerEndOption>
-          </compilerEndOptions>
-          <linkerStartOptions>
-            <linkerStartOption>-shared</linkerStartOption>
-          </linkerStartOptions>
-          <linkerEndOptions>
-            <linkerEndOption>-Wl,-rpath=${dollar}ORIGIN -lmxnet -L${MXNET_DIR}/lib</linkerEndOption>
-          </linkerEndOptions>
-        </configuration>
-
-        <executions>
-          <execution>
-            <id>javah</id>
-            <phase>generate-sources</phase>
-            <configuration>
-              <javahProvider>default</javahProvider>
-              <javahOutputDirectory>${project.build.directory}/custom-javah</javahOutputDirectory>
-              <workingDirectory>${basedir}</workingDirectory>
-              <javahOutputFileName>org_apache_mxnet_native_c_api.h</javahOutputFileName>
-              <javahClassNames>
-                <javahClassName>org.apache.mxnet.LibInfo</javahClassName>
-              </javahClassNames>
-            </configuration>
-            <goals>
-              <goal>javah</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/scala-package/native/linux-x86_64-gpu/pom.xml b/scala-package/native/linux-x86_64-gpu/pom.xml
deleted file mode 100644
index 668f330b5ff..00000000000
--- a/scala-package/native/linux-x86_64-gpu/pom.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?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>
-  <parent>
-    <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-scala-native-parent</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>libmxnet-scala-linux-x86_64-gpu</artifactId>
-  <name>MXNet Scala Package - Native Linux-x86_64 GPU</name>
-  <url>http://maven.apache.org</url>
-
-  <packaging>so</packaging>
-
-  <properties>
-    <MXNET_DIR>${project.parent.parent.basedir}/..</MXNET_DIR>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-core_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-      <type>jar</type>
-      <scope>compile</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>native-maven-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <!--  trigger javah -->
-          <javahOS>linux</javahOS>
-          <compilerProvider>generic-classic</compilerProvider>
-          <compilerExecutable>${cxx}</compilerExecutable>
-          <linkerExecutable>${cxx}</linkerExecutable>
-          <sources>
-            <source>
-              <directory>../src/main/native</directory>
-              <fileNames>
-                <fileName>org_apache_mxnet_native_c_api.cc</fileName>
-              </fileNames>
-            </source>
-          </sources>
-          <compilerStartOptions>
-            <compilerStartOption>-std=c++0x</compilerStartOption>
-          </compilerStartOptions>
-          <compilerEndOptions>
-            <compilerEndOption>-I${MXNET_DIR}/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/dmlc-core/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/mshadow</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/dlpack/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/tvm/nnvm/include</compilerEndOption>
-            <compilerEndOption>-DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</compilerEndOption>
-            <compilerEndOption>-O3 -DNDEBUG=1 -fPIC -msse3 -mf16c</compilerEndOption>
-            <compilerEndOption>-Wall -Wsign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs</compilerEndOption>
-          </compilerEndOptions>
-          <linkerStartOptions>
-            <linkerStartOption>-shared</linkerStartOption>
-          </linkerStartOptions>
-          <linkerEndOptions>
-            <linkerEndOption>-Wl,-rpath=${dollar}ORIGIN -lmxnet -L${MXNET_DIR}/lib</linkerEndOption>
-          </linkerEndOptions>
-        </configuration>
-
-        <executions>
-          <execution>
-            <id>javah</id>
-            <phase>generate-sources</phase>
-            <configuration>
-              <javahProvider>default</javahProvider>
-              <javahOutputDirectory>${project.build.directory}/custom-javah</javahOutputDirectory>
-              <workingDirectory>${basedir}</workingDirectory>
-              <javahOutputFileName>org_apache_mxnet_native_c_api.h</javahOutputFileName>
-              <javahClassNames>
-                <javahClassName>org.apache.mxnet.LibInfo</javahClassName>
-              </javahClassNames>
-            </configuration>
-            <goals>
-              <goal>javah</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/scala-package/native/osx-x86_64-cpu/pom.xml b/scala-package/native/osx-x86_64-cpu/pom.xml
deleted file mode 100644
index f6f90cdcdb5..00000000000
--- a/scala-package/native/osx-x86_64-cpu/pom.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?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>
-  <parent>
-    <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-scala-native-parent</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>libmxnet-scala-osx-x86_64-cpu</artifactId>
-  <name>MXNet Scala Package - Native OSX-x86_64 CPU-only</name>
-  <url>http://maven.apache.org</url>
-
-  <packaging>jnilib</packaging>
-
-  <properties>
-    <MXNET_DIR>${project.parent.parent.basedir}/..</MXNET_DIR>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-core_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
-      <type>jar</type>
-      <scope>compile</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>native-maven-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <!--  trigger javah -->
-          <javahOS>darwin</javahOS>
-          <compilerProvider>generic-classic</compilerProvider>
-          <compilerExecutable>${cxx}</compilerExecutable>
-          <linkerExecutable>${cxx}</linkerExecutable>
-          <sources>
-            <source>
-              <directory>../src/main/native</directory>
-              <fileNames>
-                <fileName>org_apache_mxnet_native_c_api.cc</fileName>
-              </fileNames>
-            </source>
-          </sources>
-          <compilerStartOptions>
-            <compilerStartOption>-std=c++0x</compilerStartOption>
-          </compilerStartOptions>
-          <compilerEndOptions>
-            <compilerEndOption>-I${MXNET_DIR}/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/dmlc-core/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/mshadow</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/dlpack/include</compilerEndOption>
-            <compilerEndOption>-I${MXNET_DIR}/3rdparty/tvm/nnvm/include</compilerEndOption>
-            <compilerEndOption>-DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</compilerEndOption>
-            <compilerEndOption>-g -O0 -fPIC -msse3 -mf16c</compilerEndOption>
-            <compilerEndOption>-Wall -Wsign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs</compilerEndOption>
-          </compilerEndOptions>
-          <linkerStartOptions>
-            <linkerStartOption>-shared</linkerStartOption>
-          </linkerStartOptions>
-          <linkerMiddleOptions>
-            <linkerMiddleOption>-framework JavaVM</linkerMiddleOption>
-            <linkerMiddleOption>-Wl,-exported_symbol,_Java_*</linkerMiddleOption>
-            <linkerMiddleOption>-Wl,-x</linkerMiddleOption>
-          </linkerMiddleOptions>
-          <linkerEndOptions>
-            <linkerEndOption>-Wl,-install_name,libmxnet-scala.jnilib -lmxnet -L${MXNET_DIR}/lib</linkerEndOption>
-          </linkerEndOptions>
-        </configuration>
-
-        <executions>
-          <execution>
-            <id>javah</id>
-            <phase>generate-sources</phase>
-            <configuration>
-              <javahProvider>default</javahProvider>
-              <javahOutputDirectory>${project.build.directory}/custom-javah</javahOutputDirectory>
-              <workingDirectory>${basedir}</workingDirectory>
-              <javahOutputFileName>org_apache_mxnet_native_c_api.h</javahOutputFileName>
-              <javahClassNames>
-                <javahClassName>org.apache.mxnet.LibInfo</javahClassName>
-              </javahClassNames>
-            </configuration>
-            <goals>
-              <goal>javah</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>exec-maven-plugin</artifactId>
-        <version>1.6.0</version>
-        <executions>
-          <execution>
-            <id>post-native-build</id>
-            <phase>package</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>install_name_tool</executable>
-              <commandlineArgs>-change @rpath/libmxnet.so @loader_path/libmxnet.so ${project.build.directory}/${artifactId}.jnilib</commandlineArgs>
-            </configuration>
-          </execution>
-          <execution>
-            <id>link-native-lib</id>
-            <phase>generate-resources</phase>
-            <goals>
-                <goal>exec</goal>
-            </goals>
-            <configuration>
-                <executable>ln</executable>
-                <commandlineArgs>-sf ${MXNET_DIR}/lib/libmxnet.so ${project.build.directory}/libmxnet.so</commandlineArgs>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/scala-package/native/pom.xml b/scala-package/native/pom.xml
index 2f6425d2110..7b776d5b517 100644
--- a/scala-package/native/pom.xml
+++ b/scala-package/native/pom.xml
@@ -5,46 +5,165 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-parent_2.11</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <artifactId>mxnet-parent</artifactId>
+    <version>INTERNAL</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
-  <artifactId>mxnet-scala-native-parent</artifactId>
-  <name>MXNet Scala Package - Native Parent</name>
-  <packaging>pom</packaging>
+  <artifactId>libmxnet-scala</artifactId>
+  <name>MXNet Scala Package - Native</name>
+  <packaging>${libtype}</packaging>
+
+  <properties>
+    <MXNET_DIR>${project.parent.basedir}/..</MXNET_DIR>
+  </properties>
 
   <profiles>
     <profile>
-      <id>osx-x86_64-cpu</id>
-      <modules>
-        <module>osx-x86_64-cpu</module>
-      </modules>
-    </profile>
-    <profile>
-      <id>linux-x86_64-cpu</id>
-      <modules>
-        <module>linux-x86_64-cpu</module>
-      </modules>
+      <id>osx-x86_64</id>
+      <activation>
+        <os><family>mac</family></os>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>native-maven-plugin</artifactId>
+            <extensions>true</extensions>
+            <configuration>
+              <javahOS>darwin</javahOS>
+              <compilerProvider>generic-classic</compilerProvider>
+              <compilerExecutable>${cxx}</compilerExecutable>
+              <linkerExecutable>${cxx}</linkerExecutable>
+              <sources>
+                <source>
+                  <directory>src/main/native</directory>
+                  <fileNames>
+                    <fileName>org_apache_mxnet_native_c_api.cc</fileName>
+                  </fileNames>
+                </source>
+              </sources>
+              <compilerStartOptions>
+                <compilerStartOption>-std=c++0x</compilerStartOption>
+              </compilerStartOptions>
+              <compilerEndOptions>
+                <compilerEndOption>-I${MXNET_DIR}/include</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/dmlc-core/include</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/mshadow</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/dlpack/include</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/tvm/nnvm/include</compilerEndOption>
+                <compilerEndOption>-DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</compilerEndOption>
+                <compilerEndOption>-g -O0 -fPIC -msse3 -mf16c</compilerEndOption>
+                <compilerEndOption>-Wall -Wsign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs</compilerEndOption>
+              </compilerEndOptions>
+              <linkerStartOptions>
+                <linkerStartOption>-shared</linkerStartOption>
+              </linkerStartOptions>
+              <linkerMiddleOptions>
+                <linkerMiddleOption>-framework JavaVM</linkerMiddleOption>
+                <linkerMiddleOption>-Wl,-exported_symbol,_Java_*</linkerMiddleOption>
+                <linkerMiddleOption>-Wl,-x</linkerMiddleOption>
+              </linkerMiddleOptions>
+              <linkerEndOptions>
+                <linkerEndOption>-Wl,-install_name,libmxnet-scala.jnilib -lmxnet -L${MXNET_DIR}/lib</linkerEndOption>
+              </linkerEndOptions>
+            </configuration>
+          </plugin>
+
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>exec-maven-plugin</artifactId>
+            <version>1.6.0</version>
+            <executions>
+              <execution>
+                <id>post-native-build</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>exec</goal>
+                </goals>
+                <configuration>
+                  <executable>install_name_tool</executable>
+                  <commandlineArgs>-add_rpath @loader_path ${project.build.directory}/${project.artifactId}.jnilib</commandlineArgs>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
     </profile>
     <profile>
-      <id>linux-x86_64-gpu</id>
-      <modules>
-        <module>linux-x86_64-gpu</module>
-      </modules>
+      <id>linux-x86_64</id>
+      <activation>
+        <os>
+          <family>unix</family>
+          <name>Linux</name>
+        </os>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>native-maven-plugin</artifactId>
+            <extensions>true</extensions>
+            <configuration>
+              <javahOS>linux</javahOS>
+              <compilerProvider>generic-classic</compilerProvider>
+              <compilerExecutable>${cxx}</compilerExecutable>
+              <linkerExecutable>${cxx}</linkerExecutable>
+              <sources>
+                <source>
+                  <directory>src/main/native</directory>
+                  <fileNames>
+                    <fileName>org_apache_mxnet_native_c_api.cc</fileName>
+                  </fileNames>
+                </source>
+              </sources>
+              <compilerStartOptions>
+                <compilerStartOption>-std=c++0x</compilerStartOption>
+              </compilerStartOptions>
+              <compilerEndOptions>
+                <compilerEndOption>-I${MXNET_DIR}/include</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/dmlc-core/include</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/mshadow</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/dlpack/include</compilerEndOption>
+                <compilerEndOption>-I${MXNET_DIR}/3rdparty/tvm/nnvm/include</compilerEndOption>
+                <compilerEndOption>-DMSHADOW_USE_MKL=0 -DMSHADOW_USE_CUDA=0</compilerEndOption>
+                <compilerEndOption>-O3 -DNDEBUG=1 -fPIC -msse3 -mf16c</compilerEndOption>
+                <compilerEndOption>-Wall -Wsign-compare -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs</compilerEndOption>
+              </compilerEndOptions>
+              <linkerStartOptions>
+                <linkerStartOption>-shared</linkerStartOption>
+              </linkerStartOptions>
+              <linkerEndOptions>
+                <linkerEndOption>-Wl,-rpath=${dollar}ORIGIN -lmxnet -L${MXNET_DIR}/lib</linkerEndOption>
+              </linkerEndOptions>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
     </profile>
   </profiles>
 
   <build>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.6.0</version>
+        <executions>
+          <execution>
+            <id>link-native-lib</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <executable>bash</executable>
+              <commandlineArgs>-c 'ln -sf ${MXNET_DIR}/lib/* ${project.build.directory}/'</commandlineArgs>
+            </configuration>
+          </execution>
+        </executions>
       </plugin>
     </plugins>
   </build>
-
 </project>
diff --git a/scala-package/native/src/main/native/org_apache_mxnet_native_c_api.cc b/scala-package/native/src/main/native/org_apache_mxnet_native_c_api.cc
index 17d166eac34..d684c6d1356 100644
--- a/scala-package/native/src/main/native/org_apache_mxnet_native_c_api.cc
+++ b/scala-package/native/src/main/native/org_apache_mxnet_native_c_api.cc
@@ -33,6 +33,7 @@
 #include <functional>
 #include <string>
 #include <unordered_map>
+#include <vector>
 #include "jni_helper_func.h"
 
 JavaVM *_jvm;
diff --git a/scala-package/native/src/main/native/org_apache_mxnet_native_c_api.h b/scala-package/native/src/main/native/org_apache_mxnet_native_c_api.h
new file mode 100644
index 00000000000..40230ac6daa
--- /dev/null
+++ b/scala-package/native/src/main/native/org_apache_mxnet_native_c_api.h
@@ -0,0 +1,853 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_apache_mxnet_LibInfo */
+
+#ifndef _Included_org_apache_mxnet_LibInfo
+#define _Included_org_apache_mxnet_LibInfo
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    nativeLibInit
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_nativeLibInit
+  (JNIEnv *, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxGetLastError
+ * Signature: ()Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_org_apache_mxnet_LibInfo_mxGetLastError
+  (JNIEnv *, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxListAllOpNames
+ * Signature: (Lscala/collection/mutable/ListBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxListAllOpNames
+  (JNIEnv *, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    nnGetOpHandle
+ * Signature: (Ljava/lang/String;Lorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_nnGetOpHandle
+  (JNIEnv *, jobject, jstring, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxImperativeInvoke
+ * Signature: (J[J[JLscala/collection/mutable/ArrayBuffer;I[Ljava/lang/String;[Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxImperativeInvoke
+  (JNIEnv *, jobject, jlong, jlongArray, jlongArray, jobject, jint, jobjectArray, jobjectArray);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArrayFree
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArrayFree
+  (JNIEnv *, jobject, jlong);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArrayCreateNone
+ * Signature: (Lorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArrayCreateNone
+  (JNIEnv *, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArrayCreateEx
+ * Signature: ([IIIIIILorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArrayCreateEx
+  (JNIEnv *, jobject, jintArray, jint, jint, jint, jint, jint, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArrayWaitAll
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArrayWaitAll
+  (JNIEnv *, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArrayWaitToRead
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArrayWaitToRead
+  (JNIEnv *, jobject, jlong);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxListFunctions
+ * Signature: (Lscala/collection/mutable/ListBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxListFunctions
+  (JNIEnv *, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxFuncDescribe
+ * Signature: (JLorg/apache/mxnet/Base/RefInt;Lorg/apache/mxnet/Base/RefInt;Lorg/apache/mxnet/Base/RefInt;Lorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxFuncDescribe
+  (JNIEnv *, jobject, jlong, jobject, jobject, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxFuncGetInfo
+ * Signature: (JLorg/apache/mxnet/Base/RefString;Lorg/apache/mxnet/Base/RefString;Lorg/apache/mxnet/Base/RefInt;Lscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxFuncGetInfo
+  (JNIEnv *, jobject, jlong, jobject, jobject, jobject, jobject, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxFuncInvoke
+ * Signature: (J[J[F[J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxFuncInvoke
+  (JNIEnv *, jobject, jlong, jlongArray, jfloatArray, jlongArray);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxFuncInvokeEx
+ * Signature: (J[J[F[JI[[B[[B)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxFuncInvokeEx
+  (JNIEnv *, jobject, jlong, jlongArray, jfloatArray, jlongArray, jint, jobjectArray, jobjectArray);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArrayGetShape
+ * Signature: (JLorg/apache/mxnet/Base/RefInt;Lscala/collection/mutable/ArrayBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArrayGetShape
+  (JNIEnv *, jobject, jlong, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArraySyncCopyToCPU
+ * Signature: (J[BI)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArraySyncCopyToCPU
+  (JNIEnv *, jobject, jlong, jbyteArray, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArraySlice
+ * Signature: (JIILorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArraySlice
+  (JNIEnv *, jobject, jlong, jint, jint, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArrayAt
+ * Signature: (JILorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArrayAt
+  (JNIEnv *, jobject, jlong, jint, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArrayReshape
+ * Signature: (JI[ILorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArrayReshape
+  (JNIEnv *, jobject, jlong, jint, jintArray, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArraySyncCopyFromCPU
+ * Signature: (J[FI)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArraySyncCopyFromCPU
+  (JNIEnv *, jobject, jlong, jfloatArray, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArrayLoad
+ * Signature: (Ljava/lang/String;Lorg/apache/mxnet/Base/RefInt;Lscala/collection/mutable/ArrayBuffer;Lorg/apache/mxnet/Base/RefInt;Lscala/collection/mutable/ArrayBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArrayLoad
+  (JNIEnv *, jobject, jstring, jobject, jobject, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArraySave
+ * Signature: (Ljava/lang/String;[J[Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArraySave
+  (JNIEnv *, jobject, jstring, jlongArray, jobjectArray);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArrayGetContext
+ * Signature: (JLorg/apache/mxnet/Base/RefInt;Lorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArrayGetContext
+  (JNIEnv *, jobject, jlong, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArraySaveRawBytes
+ * Signature: (JLscala/collection/mutable/ArrayBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArraySaveRawBytes
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArrayLoadFromRawBytes
+ * Signature: ([BLorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArrayLoadFromRawBytes
+  (JNIEnv *, jobject, jbyteArray, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNDArrayGetDType
+ * Signature: (JLorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNDArrayGetDType
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxInitPSEnv
+ * Signature: ([Ljava/lang/String;[Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxInitPSEnv
+  (JNIEnv *, jobject, jobjectArray, jobjectArray);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreRunServer
+ * Signature: (JLorg/apache/mxnet/KVServerControllerCallback;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreRunServer
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreGetNumDeadNode
+ * Signature: (JILorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreGetNumDeadNode
+  (JNIEnv *, jobject, jlong, jint, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreCreate
+ * Signature: (Ljava/lang/String;Lorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreCreate
+  (JNIEnv *, jobject, jstring, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreInit
+ * Signature: (JI[I[J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreInit
+  (JNIEnv *, jobject, jlong, jint, jintArray, jlongArray);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreInitEx
+ * Signature: (JI[Ljava/lang/String;[J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreInitEx
+  (JNIEnv *, jobject, jlong, jint, jobjectArray, jlongArray);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStorePush
+ * Signature: (JI[I[JI)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStorePush
+  (JNIEnv *, jobject, jlong, jint, jintArray, jlongArray, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStorePushEx
+ * Signature: (JI[Ljava/lang/String;[JI)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStorePushEx
+  (JNIEnv *, jobject, jlong, jint, jobjectArray, jlongArray, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStorePull
+ * Signature: (JI[I[JI)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStorePull
+  (JNIEnv *, jobject, jlong, jint, jintArray, jlongArray, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStorePullEx
+ * Signature: (JI[Ljava/lang/String;[JI)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStorePullEx
+  (JNIEnv *, jobject, jlong, jint, jobjectArray, jlongArray, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreSetUpdater
+ * Signature: (JLorg/apache/mxnet/MXKVStoreUpdater;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreSetUpdater
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreIsWorkerNode
+ * Signature: (Lorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreIsWorkerNode
+  (JNIEnv *, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreGetType
+ * Signature: (JLorg/apache/mxnet/Base/RefString;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreGetType
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreSendCommmandToServers
+ * Signature: (JILjava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreSendCommmandToServers
+  (JNIEnv *, jobject, jlong, jint, jstring);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreBarrier
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreBarrier
+  (JNIEnv *, jobject, jlong);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreGetGroupSize
+ * Signature: (JLorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreGetGroupSize
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreGetRank
+ * Signature: (JLorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreGetRank
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreSetBarrierBeforeExit
+ * Signature: (JI)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreSetBarrierBeforeExit
+  (JNIEnv *, jobject, jlong, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxKVStoreFree
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxKVStoreFree
+  (JNIEnv *, jobject, jlong);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxListDataIters
+ * Signature: (Lscala/collection/mutable/ListBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxListDataIters
+  (JNIEnv *, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxDataIterCreateIter
+ * Signature: (J[Ljava/lang/String;[Ljava/lang/String;Lorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxDataIterCreateIter
+  (JNIEnv *, jobject, jlong, jobjectArray, jobjectArray, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxDataIterGetIterInfo
+ * Signature: (JLorg/apache/mxnet/Base/RefString;Lorg/apache/mxnet/Base/RefString;Lscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxDataIterGetIterInfo
+  (JNIEnv *, jobject, jlong, jobject, jobject, jobject, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxDataIterFree
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxDataIterFree
+  (JNIEnv *, jobject, jlong);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxDataIterBeforeFirst
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxDataIterBeforeFirst
+  (JNIEnv *, jobject, jlong);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxDataIterNext
+ * Signature: (JLorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxDataIterNext
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxDataIterGetLabel
+ * Signature: (JLorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxDataIterGetLabel
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxDataIterGetData
+ * Signature: (JLorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxDataIterGetData
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxDataIterGetIndex
+ * Signature: (JLscala/collection/mutable/ListBuffer;Lorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxDataIterGetIndex
+  (JNIEnv *, jobject, jlong, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxDataIterGetPadNum
+ * Signature: (JLorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxDataIterGetPadNum
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxExecutorOutputs
+ * Signature: (JLscala/collection/mutable/ArrayBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxExecutorOutputs
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxExecutorFree
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxExecutorFree
+  (JNIEnv *, jobject, jlong);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxExecutorForward
+ * Signature: (JI)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxExecutorForward
+  (JNIEnv *, jobject, jlong, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxExecutorBackward
+ * Signature: (J[J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxExecutorBackward
+  (JNIEnv *, jobject, jlong, jlongArray);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxExecutorPrint
+ * Signature: (JLorg/apache/mxnet/Base/RefString;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxExecutorPrint
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxExecutorSetMonitorCallback
+ * Signature: (JLorg/apache/mxnet/MXMonitorCallback;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxExecutorSetMonitorCallback
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolListAtomicSymbolCreators
+ * Signature: (Lscala/collection/mutable/ListBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolListAtomicSymbolCreators
+  (JNIEnv *, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolGetAtomicSymbolInfo
+ * Signature: (JLorg/apache/mxnet/Base/RefString;Lorg/apache/mxnet/Base/RefString;Lorg/apache/mxnet/Base/RefInt;Lscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;Lorg/apache/mxnet/Base/RefString;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolGetAtomicSymbolInfo
+  (JNIEnv *, jobject, jlong, jobject, jobject, jobject, jobject, jobject, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolCreateAtomicSymbol
+ * Signature: (J[Ljava/lang/String;[Ljava/lang/String;Lorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolCreateAtomicSymbol
+  (JNIEnv *, jobject, jlong, jobjectArray, jobjectArray, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolSetAttr
+ * Signature: (JLjava/lang/String;Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolSetAttr
+  (JNIEnv *, jobject, jlong, jstring, jstring);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolListAttrShallow
+ * Signature: (JLorg/apache/mxnet/Base/RefInt;Lscala/collection/mutable/ArrayBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolListAttrShallow
+  (JNIEnv *, jobject, jlong, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolListAttr
+ * Signature: (JLorg/apache/mxnet/Base/RefInt;Lscala/collection/mutable/ArrayBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolListAttr
+  (JNIEnv *, jobject, jlong, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolCompose
+ * Signature: (JLjava/lang/String;[Ljava/lang/String;[J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolCompose
+  (JNIEnv *, jobject, jlong, jstring, jobjectArray, jlongArray);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolCreateVariable
+ * Signature: (Ljava/lang/String;Lorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolCreateVariable
+  (JNIEnv *, jobject, jstring, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolGetAttr
+ * Signature: (JLjava/lang/String;Lorg/apache/mxnet/Base/RefString;Lorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolGetAttr
+  (JNIEnv *, jobject, jlong, jstring, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolListArguments
+ * Signature: (JLscala/collection/mutable/ArrayBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolListArguments
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolCopy
+ * Signature: (JLorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolCopy
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolListAuxiliaryStates
+ * Signature: (JLscala/collection/mutable/ArrayBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolListAuxiliaryStates
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolListOutputs
+ * Signature: (JLscala/collection/mutable/ArrayBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolListOutputs
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolCreateGroup
+ * Signature: ([JLorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolCreateGroup
+  (JNIEnv *, jobject, jlongArray, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolPrint
+ * Signature: (JLorg/apache/mxnet/Base/RefString;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolPrint
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolGetInternals
+ * Signature: (JLorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolGetInternals
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolInferType
+ * Signature: (J[Ljava/lang/String;[ILscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;Lorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolInferType
+  (JNIEnv *, jobject, jlong, jobjectArray, jintArray, jobject, jobject, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolInferShape
+ * Signature: (JI[Ljava/lang/String;[I[ILscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;Lscala/collection/mutable/ListBuffer;Lorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolInferShape
+  (JNIEnv *, jobject, jlong, jint, jobjectArray, jintArray, jintArray, jobject, jobject, jobject, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolGetOutput
+ * Signature: (JILorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolGetOutput
+  (JNIEnv *, jobject, jlong, jint, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolSaveToJSON
+ * Signature: (JLorg/apache/mxnet/Base/RefString;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolSaveToJSON
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolCreateFromJSON
+ * Signature: (Ljava/lang/String;Lorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolCreateFromJSON
+  (JNIEnv *, jobject, jstring, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxExecutorBindX
+ * Signature: (JIII[Ljava/lang/String;[I[II[J[J[I[JLorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxExecutorBindX
+  (JNIEnv *, jobject, jlong, jint, jint, jint, jobjectArray, jintArray, jintArray, jint, jlongArray, jlongArray, jintArray, jlongArray, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxExecutorBindEX
+ * Signature: (JIII[Ljava/lang/String;[I[II[J[J[I[JJLorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxExecutorBindEX
+  (JNIEnv *, jobject, jlong, jint, jint, jint, jobjectArray, jintArray, jintArray, jint, jlongArray, jlongArray, jintArray, jlongArray, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolSaveToFile
+ * Signature: (JLjava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolSaveToFile
+  (JNIEnv *, jobject, jlong, jstring);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolCreateFromFile
+ * Signature: (Ljava/lang/String;Lorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolCreateFromFile
+  (JNIEnv *, jobject, jstring, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSymbolFree
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSymbolFree
+  (JNIEnv *, jobject, jlong);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxRandomSeed
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxRandomSeed
+  (JNIEnv *, jobject, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxNotifyShutdown
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxNotifyShutdown
+  (JNIEnv *, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxRecordIOWriterCreate
+ * Signature: (Ljava/lang/String;Lorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxRecordIOWriterCreate
+  (JNIEnv *, jobject, jstring, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxRecordIOReaderCreate
+ * Signature: (Ljava/lang/String;Lorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxRecordIOReaderCreate
+  (JNIEnv *, jobject, jstring, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxRecordIOWriterFree
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxRecordIOWriterFree
+  (JNIEnv *, jobject, jlong);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxRecordIOReaderFree
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxRecordIOReaderFree
+  (JNIEnv *, jobject, jlong);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxRecordIOWriterWriteRecord
+ * Signature: (JLjava/lang/String;I)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxRecordIOWriterWriteRecord
+  (JNIEnv *, jobject, jlong, jstring, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxRecordIOReaderReadRecord
+ * Signature: (JLorg/apache/mxnet/Base/RefString;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxRecordIOReaderReadRecord
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxRecordIOWriterTell
+ * Signature: (JLorg/apache/mxnet/Base/RefInt;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxRecordIOWriterTell
+  (JNIEnv *, jobject, jlong, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxRecordIOReaderSeek
+ * Signature: (JI)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxRecordIOReaderSeek
+  (JNIEnv *, jobject, jlong, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxRtcCreate
+ * Signature: (Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[J[JLjava/lang/String;Lorg/apache/mxnet/Base/RefLong;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxRtcCreate
+  (JNIEnv *, jobject, jstring, jobjectArray, jobjectArray, jlongArray, jlongArray, jstring, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxRtcPush
+ * Signature: (J[J[JIIIIII)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxRtcPush
+  (JNIEnv *, jobject, jlong, jlongArray, jlongArray, jint, jint, jint, jint, jint, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxRtcFree
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxRtcFree
+  (JNIEnv *, jobject, jlong);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxCustomOpRegister
+ * Signature: (Ljava/lang/String;Lorg/apache/mxnet/CustomOpProp;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxCustomOpRegister
+  (JNIEnv *, jobject, jstring, jobject);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSetProfilerConfig
+ * Signature: ([Ljava/lang/String;[Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSetProfilerConfig
+  (JNIEnv *, jobject, jobjectArray, jobjectArray);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxSetProfilerState
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxSetProfilerState
+  (JNIEnv *, jobject, jint);
+
+/*
+ * Class:     org_apache_mxnet_LibInfo
+ * Method:    mxDumpProfile
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL Java_org_apache_mxnet_LibInfo_mxDumpProfile
+  (JNIEnv *, jobject, jint);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/scala-package/pom.xml b/scala-package/pom.xml
index 6eb573bf3e2..1ea89801395 100644
--- a/scala-package/pom.xml
+++ b/scala-package/pom.xml
@@ -6,11 +6,12 @@
   <parent>
     <groupId>org.apache</groupId>
     <artifactId>apache</artifactId>
-     <version>19</version>
+    <version>19</version>
   </parent>
+
   <groupId>org.apache.mxnet</groupId>
-  <artifactId>mxnet-parent_2.11</artifactId>
-  <version>1.5.0-SNAPSHOT</version>
+  <artifactId>mxnet-parent</artifactId>
+  <version>INTERNAL</version>
   <name>MXNet Scala Package - Parent</name>
   <url>https://github.com/apache/incubator-mxnet/tree/master/scala-package</url>
   <description>
@@ -37,10 +38,10 @@
 
   <properties>
     <scala.version>2.11.8</scala.version>
-    <scala.binary.version>2.11</scala.binary.version>
-    <build.platform />
+    <build.platform/>
     <cxx>g++</cxx>
     <dollar>$</dollar>
+    <MXNET_DIR>${project.basedir}/..</MXNET_DIR>
   </properties>
 
   <packaging>pom</packaging>
@@ -48,46 +49,18 @@
     <module>init</module>
     <module>init-native</module>
     <module>macros</module>
-    <module>core</module>
     <module>native</module>
+    <module>core</module>
     <module>infer</module>
     <module>examples</module>
     <module>spark</module>
     <module>assembly</module>
+    <module>deploy</module>
   </modules>
 
   <profiles>
-    <profile>
-      <id>release</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>build-helper-maven-plugin</artifactId>
-            <executions>
-              <execution>
-                <phase>generate-sources</phase>
-                <goals>
-                  <goal>add-source</goal>
-                </goals>
-                <configuration>
-                  <sources>
-                    <source>${project.build.directory}/genjavadoc</source>
-                  </sources>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-
     <profile>
       <id>scala-2.11</id>
-      <properties>
-        <scala.version>2.11.8</scala.version>
-        <scala.binary.version>2.11</scala.binary.version>
-      </properties>
       <build>
         <plugins>
           <plugin>
@@ -117,31 +90,66 @@
     </profile>
 
     <profile>
-      <id>scala-2.12</id>
+      <id>osx-x86_64</id>
+      <activation>
+        <os>
+          <family>mac</family>
+        </os>
+      </activation>
+      <properties>
+        <platform>osx-x86_64</platform>
+        <libtype>jnilib</libtype>
+        <flavor>cpu</flavor>
+      </properties>
+    </profile>
+    <profile>
+      <id>linux-x86_64</id>
+      <activation>
+        <os>
+          <family>unix</family>
+          <name>Linux</name>
+        </os>
+      </activation>
       <properties>
-        <scala.version>2.12.4</scala.version>
-        <scala.binary.version>2.12</scala.binary.version>
+        <platform>linux-x86_64</platform>
+        <libtype>so</libtype>
       </properties>
+
       <build>
         <plugins>
           <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-enforcer-plugin</artifactId>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>exec-maven-plugin</artifactId>
+            <version>1.6.0</version>
             <executions>
               <execution>
-                <id>enforce-versions</id>
+                <id>init-build-flavor</id>
+                <phase>initialize</phase>
                 <goals>
-                  <goal>enforce</goal>
+                  <goal>exec</goal>
                 </goals>
                 <configuration>
-                  <rules>
-                    <bannedDependencies>
-                      <excludes combine.children="append">
-                        <exclude>*:*_2.11</exclude>
-                        <exclude>*:*_2.10</exclude>
-                      </excludes>
-                    </bannedDependencies>
-                  </rules>
+                  <executable>bash</executable>
+                  <commandlineArgs>-c 'mkdir -p ${project.build.directory}; if [[ $(ldd ${MXNET_DIR}/lib/libmxnet.so | grep libcuda.so | wc -l) == "0" ]]; then echo flavor=cpu &gt; ${project.build.directory}/flavor.properties; else echo flavor=gpu &gt; ${project.build.directory}/flavor.properties; fi'</commandlineArgs>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>properties-maven-plugin</artifactId>
+            <version>1.0.0</version>
+            <executions>
+              <execution>
+                <id>read-properties</id>
+                <phase>initialize</phase>
+                <goals>
+                  <goal>read-project-properties</goal>
+                </goals>
+                <configuration>
+                  <files>
+                    <file>${project.build.directory}/flavor.properties</file>
+                  </files>
                 </configuration>
               </execution>
             </executions>
@@ -154,19 +162,25 @@
   <build>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-release-plugin</artifactId>
-        <configuration>
-          <localCheckout>true</localCheckout>
-          <pushChanges>false</pushChanges>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
+        <groupId>org.commonjava.maven.plugins</groupId>
+        <artifactId>directory-maven-plugin</artifactId>
+        <version>0.1</version>
+        <executions>
+          <execution>
+            <id>directories</id>
+            <goals>
+              <goal>directory-of</goal>
+            </goals>
+            <phase>initialize</phase>
+            <configuration>
+              <property>rootdir</property>
+              <project>
+                <groupId>org.apache.mxnet</groupId>
+                <artifactId>mxnet-parent</artifactId>
+              </project>
+            </configuration>
+          </execution>
+        </executions>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -209,14 +223,13 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.5.5</version>
+        <version>3.1.0</version>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <version>2.19</version>
         <configuration>
-          <skipTests>true</skipTests>
           <useSystemClassLoader>false</useSystemClassLoader>
         </configuration>
       </plugin>
@@ -231,7 +244,6 @@
         <artifactId>scalatest-maven-plugin</artifactId>
         <version>1.0</version>
         <configuration>
-          <skipTests>${skipTests}</skipTests>
           <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
           <junitxml>.</junitxml>
           <stdout>F</stdout>
@@ -256,7 +268,7 @@
       <plugin>
         <groupId>org.scalastyle</groupId>
         <artifactId>scalastyle-maven-plugin</artifactId>
-        <version>0.8.0</version>
+        <version>1.0.0</version>
         <configuration>
           <verbose>false</verbose>
           <failOnViolation>true</failOnViolation>
@@ -264,7 +276,7 @@
           <failOnWarning>false</failOnWarning>
           <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
           <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
-          <configLocation>scalastyle-config.xml</configLocation>
+          <configLocation>${rootdir}/scalastyle-config.xml</configLocation>
           <outputFile>${basedir}/target/scalastyle-output.xml</outputFile>
           <outputEncoding>UTF-8</outputEncoding>
         </configuration>
@@ -315,19 +327,17 @@
           </execution>
         </executions>
       </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
   <dependencies>
-    <dependency>
-      <groupId>org.scala-lang</groupId>
-      <artifactId>scala-library</artifactId>
-      <version>${scala.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.scala-lang</groupId>
-      <artifactId>scala-reflect</artifactId>
-      <version>${scala.version}</version>
-    </dependency>
     <dependency>
       <groupId>commons-codec</groupId>
       <artifactId>commons-codec</artifactId>
@@ -352,7 +362,7 @@
     </dependency>
     <dependency>
       <groupId>org.scalatest</groupId>
-      <artifactId>scalatest_${scala.binary.version}</artifactId>
+      <artifactId>scalatest_2.11</artifactId>
       <version>3.0.4</version>
       <scope>test</scope>
     </dependency>
@@ -363,13 +373,25 @@
     </dependency>
     <dependency>
       <groupId>org.scalacheck</groupId>
-      <artifactId>scalacheck_${scala.binary.version}</artifactId>
+      <artifactId>scalacheck_2.11</artifactId>
       <version>1.13.5</version>
       <scope>test</scope>
     </dependency>
+
+    <!-- Following libraries are required by running javah, they should be excluded from .jar -->
+    <dependency>
+      <groupId>org.scala-lang</groupId>
+      <artifactId>scala-library</artifactId>
+      <version>${scala.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.scala-lang</groupId>
+      <artifactId>scala-reflect</artifactId>
+      <version>${scala.version}</version>
+    </dependency>
     <dependency>
       <groupId>org.scala-lang.modules</groupId>
-      <artifactId>scala-parser-combinators_${scala.binary.version}</artifactId>
+      <artifactId>scala-parser-combinators_2.11</artifactId>
       <version>1.0.4</version>
     </dependency>
     <dependency>
diff --git a/scala-package/spark/bin/run-mnist-example.sh b/scala-package/spark/bin/run-mnist-example.sh
index 4ebd6c61d56..4f747f2c91a 100755
--- a/scala-package/spark/bin/run-mnist-example.sh
+++ b/scala-package/spark/bin/run-mnist-example.sh
@@ -27,9 +27,9 @@ OS=""
 
 if [ "$(uname)" == "Darwin" ]; then
 	# Do something under Mac OS X platform
-  OS='osx-x86_64-cpu'
+  OS='osx-x86_64'
 elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
-  OS='linux-x86_64-cpu'
+  OS='linux-x86_64'
 fi
 
 LIB_DIR=${SPARK_MODULE_DIR}/target/classes/lib
diff --git a/scala-package/spark/pom.xml b/scala-package/spark/pom.xml
index 2db3bee8c78..f2737e9334f 100644
--- a/scala-package/spark/pom.xml
+++ b/scala-package/spark/pom.xml
@@ -5,47 +5,28 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-parent_2.11</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <artifactId>mxnet-parent</artifactId>
+    <version>INTERNAL</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
-  <artifactId>mxnet-spark_2.11</artifactId>
+  <artifactId>mxnet-spark</artifactId>
   <name>MXNet Scala Package - Spark ML</name>
 
   <properties>
     <spark.version>1.6.3</spark.version>
   </properties>
-  <profiles>
-    <profile>
-      <id>osx-x86_64-cpu</id>
-      <properties>
-        <platform>osx-x86_64-cpu</platform>
-      </properties>
-    </profile>
-    <profile>
-      <id>linux-x86_64-cpu</id>
-      <properties>
-        <platform>linux-x86_64-cpu</platform>
-      </properties>
-    </profile>
-    <profile>
-      <id>linux-x86_64-gpu</id>
-      <properties>
-        <platform>linux-x86_64-gpu</platform>
-      </properties>
-    </profile>
-  </profiles>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.mxnet</groupId>
-      <artifactId>mxnet-core_${scala.binary.version}</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
+      <artifactId>mxnet-core</artifactId>
+      <version>INTERNAL</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.spark</groupId>
-      <artifactId>spark-mllib_${scala.binary.version}</artifactId>
+      <artifactId>spark-mllib_2.11</artifactId>
       <version>${spark.version}</version>
     </dependency>
     <dependency>
diff --git a/tools/license_header.py b/tools/license_header.py
index 10ba8b909e7..9c64b5fd167 100755
--- a/tools/license_header.py
+++ b/tools/license_header.py
@@ -60,24 +60,26 @@
 _LICENSE_PATTERNS = ['Licensed to the Apache Software Foundation']
 
 # the folders or files that will be ignored
-_WHITE_LIST = ['R-package/',
+_WHITE_LIST = ['3rdparty',
                'docker/Dockerfiles',
-               '3rdparty',
-               'src/operator/mkl/',
-               'src/operator/special_functions-inl.h',
-               'src/operator/nn/pool.h',
-               'src/operator/contrib/psroi_pooling-inl.h',
-               'src/operator/contrib/nn/deformable_im2col.h',
-               'src/operator/contrib/nn/deformable_im2col.cuh',
-               'src/operator/nn/im2col.h',
-               'src/operator/nn/im2col.cuh',
-               'example/ssd/dataset/pycocotools/coco.py',
-               'example/rcnn/rcnn/cython/setup.py',
+               'example/image-classification/predict-cpp/image-classification-predict.cc',
                'example/rcnn/rcnn/cython/nms_kernel.cu',
+               'example/rcnn/rcnn/cython/setup.py',
+               'example/ssd/dataset/pycocotools/coco.py',
+               'julia/REQUIRE',
                'prepare_mkl.sh',
-               'example/image-classification/predict-cpp/image-classification-predict.cc',
+               'R-package/',
+               'scala-package/init-native/src/main/native/org_apache_mxnet_init_native_c_api.h',
+               'scala-package/native/src/main/native/org_apache_mxnet_native_c_api.h',
                'src/operator/contrib/ctc_include/',
-               'julia/REQUIRE'
+               'src/operator/contrib/nn/deformable_im2col.cuh',
+               'src/operator/contrib/nn/deformable_im2col.h',
+               'src/operator/contrib/psroi_pooling-inl.h',
+               'src/operator/mkl/',
+               'src/operator/nn/im2col.cuh',
+               'src/operator/nn/im2col.h',
+               'src/operator/nn/pool.h',
+               'src/operator/special_functions-inl.h'
                ]
 
 # language extensions and the according commment mark


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services