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 2018/12/17 22:08:05 UTC

[GitHub] gigasquid commented on a change in pull request #13626: Re-organize Scala maven build

gigasquid commented on a change in pull request #13626: Re-organize Scala maven build
URL: https://github.com/apache/incubator-mxnet/pull/13626#discussion_r242324289
 
 

 ##########
 File path: scala-package/init/pom.xml
 ##########
 @@ -5,65 +5,60 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.mxnet</groupId>
-    <artifactId>mxnet-parent_2.11</artifactId>
+    <artifactId>mxnet-parent</artifactId>
     <version>1.5.0-SNAPSHOT</version>
-<!--  <relativePath>../pom.xml</relativePath>-->
+    <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>
+              <successCodes>0</successCodes>
 
 Review comment:
   Removing this successCodes line enables my local computer to do `mvn install`. I researched here https://www.mojohaus.org/exec-maven-plugin/exec-mojo.html#successCodes and I don't think it is needed in this case `Exit codes to be resolved as successful execution for non-compliant applications (applications not returning 0 for success).`

----------------------------------------------------------------
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