Hi Robert, Thanks for your response. After a lot of trial-error, I figured to just what said here: https://github.com/nswamy/incubator-mxnet/blob/v1.2.0/Makefile#L599
-Naveen On Fri, May 18, 2018 at 12:27 PM, Robert Scholte <[email protected]> wrote: > Hi, > > this is the important part of the commandline that tricked you: > -Darguments=-DskipTests > > so -DskipTests is the only argument being passed. If you want to add more, > you need to quote them, e.g > > -Darguments="-DskipTests -Dkey=value" > > I noticed -Dcxx="$(CXX)" already has quotes, so you need to escape the > those. > > thanks, > Robert > > > On Thu, 17 May 2018 23:20:59 +0200, Naveen Swamy <[email protected]> > wrote: > > Hello there, >> >> I have a question regarding maven release 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/48d60908a1fa4 >> 2364a829ac90133d28dd0998219/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)" \ >> -Drelease.cflags="$(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/scal >> a-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/scal >> a-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/scal >> a-package/init-native/osx-x86_64/pom.xml >> [INFO] [DEBUG] (s) directory = >> /Users/wamy/nswamy/deepengine/workspace/incubator-mxnet/scal >> a-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/scal >> a-package/init-native/osx-x86_64 >> >> ``` >> >> I have already tried pass with -Darguments, create properties >> corresponding >> to the flags, etc., >> >> >> Appreciate pointers and advise? >> >> -Naveen >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
