Hello there,

I have a question regarding how to pass extra arguments(such as cflags) 
from maven release plugin to native-maven-plugin. We use codehaus 
native-plugin to build jni, I want to pass the cflags during release phase. 
However I see that I am unable to pass any of the arguments through release 
plugin. Any experience or pointers would help
this is mvn command which we call through a makefile similar to 
https://github.com/apache/incubator-mxnet/blob/48d60908a1fa42364a829ac90133d28dd0998219/Makefile#L579
```
scalareleasedryrun:
(cd $(ROOTDIR)/scala-package; \
mvn -X release:prepare -DdryRun=true -DautoVersionSubmodules=true \
-P$(SCALA_PKG_PROFILE),$(SCALA_VERSION_PROFILE) \
-Darguments=-DskipTests -Dcxx="$(CXX)" \
-Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)" \
-Dlddeps="$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a")
```
The parent pom file is here
https://github.com/apache/incubator-mxnet/blob/master/scala-package/pom.xml
and the pom file to compile native code is here 
https://github.com/apache/incubator-mxnet/blob/master/scala-package/init-native/osx-x86_64/pom.xml#L59

I see that cflags variable used in the native pom.xml is coming as null
```
[INFO] [INFO] --- native-maven-plugin:1.0-alpha-9:compile (default-compile) 
@ libmxnet-init-scala-osx-x86_64 ---
[INFO] [DEBUG] Configuring mojo 
org.codehaus.mojo:native-maven-plugin:1.0-alpha-9:compile from plugin realm 
ClassRealm[extension>org.codehaus.mojo:native-maven-plugin:1.0-alpha-9, 
parent: sun.misc.Launcher$AppClassLoader@42a57993]
[INFO] [DEBUG] Configuring mojo 
'org.codehaus.mojo:native-maven-plugin:1.0-alpha-9:compile' with basic 
configurator -->
[INFO] [DEBUG]   (f) compilerEndOptions = [-I../../../include, null]
[INFO] [DEBUG]   (f) compilerOutputDirectory = 
/Users/wamy/nswamy/deepengine/workspace/incubator-mxnet/scala-package/init-native/osx-x86_64/target/objs
[INFO] [DEBUG]   (f) compilerProvider = generic-classic
[INFO] [DEBUG]   (f) compilerStartOptions = [-std=c++0x]
[INFO] [DEBUG]   (f) dependencyIncludeDirectory = 
/Users/wamy/nswamy/deepengine/workspace/incubator-mxnet/scala-package/init-native/osx-x86_64/target/native/include
[INFO] [DEBUG]   (f) javahOS = darwin
[INFO] [DEBUG]   (f) jdkIncludePath = 
/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre/../include
[INFO] [DEBUG]   (f) numberOfConcurrentCompilation = 1
[INFO] [DEBUG]   (f) project = MavenProject: 
org.apache.mxnet:libmxnet-init-scala-osx-x86_64:1.2.0-SNAPSHOT @ 
/Users/wamy/nswamy/deepengine/workspace/incubator-mxnet/scala-package/init-native/osx-x86_64/pom.xml
[INFO] [DEBUG]   (s) directory = 
/Users/wamy/nswamy/deepengine/workspace/incubator-mxnet/scala-package/init-native/src/main/native
[INFO] [DEBUG]   (s) fileNames = [org_apache_mxnet_init_native_c_api.cc]
[INFO] [DEBUG]   (f) sources = 
[org.codehaus.mojo.natives.NativeSources@1e01b195]
[INFO] [DEBUG]   (f) workingDirectory = 
/Users/wamy/nswamy/deepengine/workspace/incubator-mxnet/scala-package/init-native/osx-x86_64

```

I have already tried pass with -Darguments, create properties corresponding 
to the flags, etc., 


Appreciate pointers and advise?

-- 
You received this message because you are subscribed to the Google Groups 
"mojohaus-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojohaus-dev+unsubscr...@googlegroups.com.
To post to this group, send email to mojohaus-dev@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojohaus-dev/5d07a717-25a8-4519-83a3-3a9434f202c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to