Re: Not able to pass multiple arguments to javac
An improvement request is filed: http://jira.codehaus.org/browse/MCOMPILER-62 Sahoo Wayne Fay wrote: I haven't looked at the code, but based on some historical emails on this list it seemed like multiple tags were the way to go. One possible fix would be to take away the quoting of these arguments, but I'm not sure if this wouldn't create some new unintended side-effects. It certainly sounds like this is something that could stand to be improved. Wayne On 11/26/07, Nick Stolwijk <[EMAIL PROTECTED]> wrote: My first assumption was indeed wrong, because I used java 1.5 to check for the existence of those properties. Also, your description (They are not supported by javac.) set me on the wrong track. See my other mail for the how and why of this error. And indeed, in the current implementation, when you have multiple "compilerArgument" elements only one is taken. I guess it just runs setCompilerArgument multiple times. With regards, Nick Stolwijk Sahoo wrote: I doubt those message come from javac. They were printed by maven when I ran it with -X option. Tell me what is the option that is *not* supported by javac. AFAIK, all the options that I want to pass are very much supported by javac. Check out the documentation [1] of javac that comes with Sun JDK 6. More over, JDK 6 compiler allows to provide plugins to javac. In order to configure the plugin user may have to pass options that are *not* meant for javac itself, instead they are meant for the javac plugin. Such options will never be supported by maven-javac-plugin, hence compilerArgument is the only way to use them. In case of Sun JDK, any javac option starting -A is passed onto the plugin. An example is available at [2]. I actually faced all my maven issues while developing that plugin. My observation is that when multiple compilerArgument is used, only the last one is considered. Thanks, Sahoo [1] http://java.sun.com/javase/6/docs/technotes/tools/solaris/javac.html [2] http://weblogs.java.net/blog/ss141213/archive/2007/11/a_javac_plugin_1.html [EMAIL PROTECTED] wrote: The fault message you see is actually from javac itself. You're trying to add options that are not supported by javac. All javac options are "supported" by the mojo, it simply passes them to javac. Why would you want to add options to javac which are not supported by javac? With regards, Nick Stolwijk -Original Message- From: [EMAIL PROTECTED] on behalf of Sahoo Sent: Mon 11/26/2007 5:12 PM To: Maven Users List Subject: Re: Not able to pass multiple arguments to javac Yes, I knew that approach, but the options I actually want to pass are not supported by the mojo. nowarn and verbose were just used as examples; I want to pass -proc:none and -implicit. They are not supported by javac. There are many such options which are not supported by the mojo. I thought compilerArgument is the way to use them. But, it is *not* working. Thanks, Sahoo Jeff Jensen wrote: Try this approach: true 1024m true true etc... To know element names to use, use the Name found in the Optional Parameters section of this page: http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sahoo Sent: Monday, November 26, 2007 8:25 AM To: Maven Users List Subject: Re: Not able to pass multiple arguments to javac Ignore my earlier email. The suggestion actually does *not* work. When I run with -X option, it shows only the last compilerArgument. See the following output: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' --> [DEBUG] (f) basedir = /tmp/my-app [DEBUG] (f) buildDirectory = /tmp/my-app/target [DEBUG] (f) classpathElements = [/tmp/my-app/target/classes] [DEBUG] (f) compileSourceRoots = [/tmp/my-app/src/main/java] [DEBUG] (f) compilerArgument = -verbose [DEBUG] (f) compilerId = javac [DEBUG] (f) debug = true [DEBUG] (f) failOnError = true [DEBUG] (f) fork = false [DEBUG] (f) optimize = false [DEBUG] (f) outputDirectory = /tmp/my-app/target/classes [DEBUG] (f) outputFileName = my-app-1.0-SNAPSHOT [DEBUG] (f) projectArtifact = com.mycompany.app:my-app:jar:1.0-SNAPSHOT [DEBUG] (f) showDeprecation = false [DEBUG] (f) showWarnings = false [DEBUG] (f) staleMillis = 0 [DEBUG] (f) verbose = false [DEBUG] -- end configuration -- Thanks, Sahoo Sahoo wrote: Thanks, that works. Sahoo Wayne Fay wrote: Try this, Sahoo: org.apache.maven.plugins maven-compiler-plugin -nowarn -verbose On 11/22/07, Sahoo <[EMAIL PROTECTED]> wrote: As suggested in [1], I tried configuring maven-compiler-plugin like this: -nowarn
Re: Not able to pass multiple arguments to javac
I haven't looked at the code, but based on some historical emails on this list it seemed like multiple tags were the way to go. One possible fix would be to take away the quoting of these arguments, but I'm not sure if this wouldn't create some new unintended side-effects. It certainly sounds like this is something that could stand to be improved. Wayne On 11/26/07, Nick Stolwijk <[EMAIL PROTECTED]> wrote: > My first assumption was indeed wrong, because I used java 1.5 to check > for the existence of those properties. Also, your description (They are > not supported by javac.) set me on the wrong track. See my other mail > for the how and why of this error. > > And indeed, in the current implementation, when you have multiple > "compilerArgument" elements only one is taken. I guess it just runs > setCompilerArgument multiple times. > > With regards, > > Nick Stolwijk > > Sahoo wrote: > > I doubt those message come from javac. They were printed by maven when > > I ran it with -X option. Tell me what is the option that is *not* > > supported by javac. AFAIK, all the options that I want to pass are > > very much supported by javac. Check out the documentation [1] of javac > > that comes with Sun JDK 6. > > > > More over, JDK 6 compiler allows to provide plugins to javac. In order > > to configure the plugin user may have to pass options that are *not* > > meant for javac itself, instead they are meant for the javac plugin. > > Such options will never be supported by maven-javac-plugin, hence > > compilerArgument is the only way to use them. In case of Sun JDK, any > > javac option starting -A is passed onto the plugin. An example is > > available at [2]. I actually faced all my maven issues while > > developing that plugin. > > > > My observation is that when multiple compilerArgument is used, only > > the last one is considered. > > > > Thanks, > > Sahoo > > > > [1] http://java.sun.com/javase/6/docs/technotes/tools/solaris/javac.html > > [2] > > > http://weblogs.java.net/blog/ss141213/archive/2007/11/a_javac_plugin_1.html > > > > [EMAIL PROTECTED] wrote: > >> The fault message you see is actually from javac itself. You're > >> trying to add options that are not supported by javac. All javac > >> options are "supported" by the mojo, it simply passes them to javac. > >> > >> Why would you want to add options to javac which are not supported by > >> javac? > >> > >> With regards, > >> > >> Nick Stolwijk > >> > >> > >> -Original Message- > >> From: [EMAIL PROTECTED] on behalf of Sahoo > >> Sent: Mon 11/26/2007 5:12 PM > >> To: Maven Users List > >> Subject: Re: Not able to pass multiple arguments to javac > >> > >> Yes, I knew that approach, but the options I actually want to pass > >> are not supported by the mojo. nowarn and verbose were just used as > >> examples; I want to pass -proc:none and -implicit. They are not > >> supported by javac. There are many such options which are not > >> supported by the mojo. I thought compilerArgument is the way to use > >> them. But, it is *not* working. > >> > >> Thanks, > >> Sahoo > >> > >> Jeff Jensen wrote: > >> > >>> Try this approach: > >>> > >>> > >>> true > >>> 1024m > >>> true > >>> true > >>> etc... > >>> > >>> > >>> To know element names to use, use the Name found in the Optional > >>> Parameters > >>> section of this page: > >>> > >>> http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html > >>> > >>> > >>> > >>>> -Original Message- > >>>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > >>>> Behalf Of > >>>> > >>> Sahoo > >>> > >>>> Sent: Monday, November 26, 2007 8:25 AM > >>>> To: Maven Users List > >>>> Subject: Re: Not able to pass multiple arguments to javac > >>>> > >>>> Ignore my earlier email. The suggestion actually does *not* work. > >>>> When I > >>>> run with -X option, it shows only the last compilerArgument. See the > >>>> following output: > >>>> > >>>> [DEBUG] Configu
Re: Not able to pass multiple arguments to javac
My first assumption was indeed wrong, because I used java 1.5 to check for the existence of those properties. Also, your description (They are not supported by javac.) set me on the wrong track. See my other mail for the how and why of this error. And indeed, in the current implementation, when you have multiple "compilerArgument" elements only one is taken. I guess it just runs setCompilerArgument multiple times. With regards, Nick Stolwijk Sahoo wrote: I doubt those message come from javac. They were printed by maven when I ran it with -X option. Tell me what is the option that is *not* supported by javac. AFAIK, all the options that I want to pass are very much supported by javac. Check out the documentation [1] of javac that comes with Sun JDK 6. More over, JDK 6 compiler allows to provide plugins to javac. In order to configure the plugin user may have to pass options that are *not* meant for javac itself, instead they are meant for the javac plugin. Such options will never be supported by maven-javac-plugin, hence compilerArgument is the only way to use them. In case of Sun JDK, any javac option starting -A is passed onto the plugin. An example is available at [2]. I actually faced all my maven issues while developing that plugin. My observation is that when multiple compilerArgument is used, only the last one is considered. Thanks, Sahoo [1] http://java.sun.com/javase/6/docs/technotes/tools/solaris/javac.html [2] http://weblogs.java.net/blog/ss141213/archive/2007/11/a_javac_plugin_1.html [EMAIL PROTECTED] wrote: The fault message you see is actually from javac itself. You're trying to add options that are not supported by javac. All javac options are "supported" by the mojo, it simply passes them to javac. Why would you want to add options to javac which are not supported by javac? With regards, Nick Stolwijk -Original Message- From: [EMAIL PROTECTED] on behalf of Sahoo Sent: Mon 11/26/2007 5:12 PM To: Maven Users List Subject: Re: Not able to pass multiple arguments to javac Yes, I knew that approach, but the options I actually want to pass are not supported by the mojo. nowarn and verbose were just used as examples; I want to pass -proc:none and -implicit. They are not supported by javac. There are many such options which are not supported by the mojo. I thought compilerArgument is the way to use them. But, it is *not* working. Thanks, Sahoo Jeff Jensen wrote: Try this approach: true 1024m true true etc... To know element names to use, use the Name found in the Optional Parameters section of this page: http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sahoo Sent: Monday, November 26, 2007 8:25 AM To: Maven Users List Subject: Re: Not able to pass multiple arguments to javac Ignore my earlier email. The suggestion actually does *not* work. When I run with -X option, it shows only the last compilerArgument. See the following output: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' --> [DEBUG] (f) basedir = /tmp/my-app [DEBUG] (f) buildDirectory = /tmp/my-app/target [DEBUG] (f) classpathElements = [/tmp/my-app/target/classes] [DEBUG] (f) compileSourceRoots = [/tmp/my-app/src/main/java] [DEBUG] (f) compilerArgument = -verbose [DEBUG] (f) compilerId = javac [DEBUG] (f) debug = true [DEBUG] (f) failOnError = true [DEBUG] (f) fork = false [DEBUG] (f) optimize = false [DEBUG] (f) outputDirectory = /tmp/my-app/target/classes [DEBUG] (f) outputFileName = my-app-1.0-SNAPSHOT [DEBUG] (f) projectArtifact = com.mycompany.app:my-app:jar:1.0-SNAPSHOT [DEBUG] (f) showDeprecation = false [DEBUG] (f) showWarnings = false [DEBUG] (f) staleMillis = 0 [DEBUG] (f) verbose = false [DEBUG] -- end configuration -- Thanks, Sahoo Sahoo wrote: Thanks, that works. Sahoo Wayne Fay wrote: Try this, Sahoo: org.apache.maven.plugins maven-compiler-plugin -nowarn -verbose On 11/22/07, Sahoo <[EMAIL PROTECTED]> wrote: As suggested in [1], I tried configuring maven-compiler-plugin like this: -nowarn -verbose But it causes compilation failure. Details given below: Failure executing javac, but could not parse the error: javac: invalid flag: -nowarn -verbose How can I pass multiple arguments to javac? Thanks, Sahoo [1] http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass- compiler-arguments.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For a
Re: Not able to pass multiple arguments to javac
I doubt those message come from javac. They were printed by maven when I ran it with -X option. Tell me what is the option that is *not* supported by javac. AFAIK, all the options that I want to pass are very much supported by javac. Check out the documentation [1] of javac that comes with Sun JDK 6. More over, JDK 6 compiler allows to provide plugins to javac. In order to configure the plugin user may have to pass options that are *not* meant for javac itself, instead they are meant for the javac plugin. Such options will never be supported by maven-javac-plugin, hence compilerArgument is the only way to use them. In case of Sun JDK, any javac option starting -A is passed onto the plugin. An example is available at [2]. I actually faced all my maven issues while developing that plugin. My observation is that when multiple compilerArgument is used, only the last one is considered. Thanks, Sahoo [1] http://java.sun.com/javase/6/docs/technotes/tools/solaris/javac.html [2] http://weblogs.java.net/blog/ss141213/archive/2007/11/a_javac_plugin_1.html [EMAIL PROTECTED] wrote: The fault message you see is actually from javac itself. You're trying to add options that are not supported by javac. All javac options are "supported" by the mojo, it simply passes them to javac. Why would you want to add options to javac which are not supported by javac? With regards, Nick Stolwijk -Original Message- From: [EMAIL PROTECTED] on behalf of Sahoo Sent: Mon 11/26/2007 5:12 PM To: Maven Users List Subject: Re: Not able to pass multiple arguments to javac Yes, I knew that approach, but the options I actually want to pass are not supported by the mojo. nowarn and verbose were just used as examples; I want to pass -proc:none and -implicit. They are not supported by javac. There are many such options which are not supported by the mojo. I thought compilerArgument is the way to use them. But, it is *not* working. Thanks, Sahoo Jeff Jensen wrote: Try this approach: true 1024m true true etc... To know element names to use, use the Name found in the Optional Parameters section of this page: http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sahoo Sent: Monday, November 26, 2007 8:25 AM To: Maven Users List Subject: Re: Not able to pass multiple arguments to javac Ignore my earlier email. The suggestion actually does *not* work. When I run with -X option, it shows only the last compilerArgument. See the following output: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' --> [DEBUG] (f) basedir = /tmp/my-app [DEBUG] (f) buildDirectory = /tmp/my-app/target [DEBUG] (f) classpathElements = [/tmp/my-app/target/classes] [DEBUG] (f) compileSourceRoots = [/tmp/my-app/src/main/java] [DEBUG] (f) compilerArgument = -verbose [DEBUG] (f) compilerId = javac [DEBUG] (f) debug = true [DEBUG] (f) failOnError = true [DEBUG] (f) fork = false [DEBUG] (f) optimize = false [DEBUG] (f) outputDirectory = /tmp/my-app/target/classes [DEBUG] (f) outputFileName = my-app-1.0-SNAPSHOT [DEBUG] (f) projectArtifact = com.mycompany.app:my-app:jar:1.0-SNAPSHOT [DEBUG] (f) showDeprecation = false [DEBUG] (f) showWarnings = false [DEBUG] (f) staleMillis = 0 [DEBUG] (f) verbose = false [DEBUG] -- end configuration -- Thanks, Sahoo Sahoo wrote: Thanks, that works. Sahoo Wayne Fay wrote: Try this, Sahoo: org.apache.maven.plugins maven-compiler-plugin -nowarn -verbose On 11/22/07, Sahoo <[EMAIL PROTECTED]> wrote: As suggested in [1], I tried configuring maven-compiler-plugin like this: -nowarn -verbose But it causes compilation failure. Details given below: Failure executing javac, but could not parse the error: javac: invalid flag: -nowarn -verbose How can I pass multiple arguments to javac? Thanks, Sahoo [1] http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass- compiler-arguments.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For a
RE: Not able to pass multiple arguments to javac
I've found the problem. Plexus (which runs the compiler and commandline) is quoting each argument. So for this configuration: org.apache.maven.plugins maven-compiler-plugin 1.6 1.6 ${java.home}/lib/rt.jar -implicit:none -proc:none true mvn clean compile -X gives the following output: [DEBUG] Command line options: [DEBUG] -d /home/nick/workspace/buildserver-test-project/trunk/target/classes -classpath /home/nick/workspace/buildserver-test-project/trunk/target/classes: /home/nick/workspace/buildserver-test-project/trunk/src/main/java/nl/iprofs/sandbox/buildservertest/App.java -g -nowarn -target 1.6 -source 1.6 -bootclasspath /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar -verbose -implicit:none -proc:none [INFO] Compiling 1 source file to /home/nick/workspace/buildserver-test-project/trunk/target/classes While it is actually executing: /usr/lib/jvm/java-6-sun-1.6.0.00/bin/javac -d /home/nick/workspace/buildserver-test-project/trunk/target/classes -classpath /home/nick/workspace/buildserver-test-project/trunk/target/classes: /home/nick/workspace/buildserver-test-project/trunk/src/main/java/nl/iprofs/sandbox/buildservertest/App.java -g -nowarn -target 1.6 -source 1.6 -bootclasspath /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar -verbose "-implicit:none -proc:none" (Much more quotes, but just for the idea) If I execute this myself, javac indeed gives the error as described. I guess, this should be a feature request for the maven-compiler-plugin, to indeed accept multiple compilerArgument options. Maybe something like this: org.apache.maven.plugins maven-compiler-plugin 1.6 1.6 ${java.home}/lib/rt.jar -implicit:none -prox:none true Hth, Nick Stolwijk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Mon 11/26/2007 5:34 PM To: Maven Users List Subject: RE: Not able to pass multiple arguments to javac The fault message you see is actually from javac itself. You're trying to add options that are not supported by javac. All javac options are "supported" by the mojo, it simply passes them to javac. Why would you want to add options to javac which are not supported by javac? With regards, Nick Stolwijk -Original Message- From: [EMAIL PROTECTED] on behalf of Sahoo Sent: Mon 11/26/2007 5:12 PM To: Maven Users List Subject: Re: Not able to pass multiple arguments to javac Yes, I knew that approach, but the options I actually want to pass are not supported by the mojo. nowarn and verbose were just used as examples; I want to pass -proc:none and -implicit. They are not supported by javac. There are many such options which are not supported by the mojo. I thought compilerArgument is the way to use them. But, it is *not* working. Thanks, Sahoo Jeff Jensen wrote: > Try this approach: > > > true > 1024m > true > true > etc... > > > To know element names to use, use the Name found in the Optional Parameters > section of this page: > http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html > > > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of >> > Sahoo > >> Sent: Monday, November 26, 2007 8:25 AM >> To: Maven Users List >> Subject: Re: Not able to pass multiple arguments to javac >> >> Ignore my earlier email. The suggestion actually does *not* work. When I >> run with -X option, it shows only the last compilerArgument. See the >> following output: >> >> [DEBUG] Configuring mojo >> 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' --> >> [DEBUG] (f) basedir = /tmp/my-app >> [DEBUG] (f) buildDirectory = /tmp/my-app/target >> [DEBUG] (f) classpathElements = [/tmp/my-app/target/classes] >> [DEBUG] (f) compileSourceRoots = [/tmp/my-app/src/main/java] >> [DEBUG] (f) compilerArgument = -verbose >> [DEBUG] (f) compilerId = javac >> [DEBUG] (f) debug = true >> [DEBUG] (f) failOnError = true >> [DEBUG] (f) fork = false >> [DEBUG] (f) optimize = false >> [DEBUG] (f) outputDirectory = /tmp/my-app/target/classes >> [DEBUG] (f) outputFileName = my-app-1.0-SNAPSHOT >> [DEBUG] (f) projectArtifact = com.mycompany.app:my-app:jar:1.0-SNAPSHOT >> [DEBUG] (f) showDeprecation = false >> [DEBUG] (f) showWarnings = false >> [DEBUG] (f) staleMillis = 0 >> [DEBUG] (f) verbose = false >&g
RE: Not able to pass multiple arguments to javac
The fault message you see is actually from javac itself. You're trying to add options that are not supported by javac. All javac options are "supported" by the mojo, it simply passes them to javac. Why would you want to add options to javac which are not supported by javac? With regards, Nick Stolwijk -Original Message- From: [EMAIL PROTECTED] on behalf of Sahoo Sent: Mon 11/26/2007 5:12 PM To: Maven Users List Subject: Re: Not able to pass multiple arguments to javac Yes, I knew that approach, but the options I actually want to pass are not supported by the mojo. nowarn and verbose were just used as examples; I want to pass -proc:none and -implicit. They are not supported by javac. There are many such options which are not supported by the mojo. I thought compilerArgument is the way to use them. But, it is *not* working. Thanks, Sahoo Jeff Jensen wrote: > Try this approach: > > > true > 1024m > true > true > etc... > > > To know element names to use, use the Name found in the Optional Parameters > section of this page: > http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html > > > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of >> > Sahoo > >> Sent: Monday, November 26, 2007 8:25 AM >> To: Maven Users List >> Subject: Re: Not able to pass multiple arguments to javac >> >> Ignore my earlier email. The suggestion actually does *not* work. When I >> run with -X option, it shows only the last compilerArgument. See the >> following output: >> >> [DEBUG] Configuring mojo >> 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' --> >> [DEBUG] (f) basedir = /tmp/my-app >> [DEBUG] (f) buildDirectory = /tmp/my-app/target >> [DEBUG] (f) classpathElements = [/tmp/my-app/target/classes] >> [DEBUG] (f) compileSourceRoots = [/tmp/my-app/src/main/java] >> [DEBUG] (f) compilerArgument = -verbose >> [DEBUG] (f) compilerId = javac >> [DEBUG] (f) debug = true >> [DEBUG] (f) failOnError = true >> [DEBUG] (f) fork = false >> [DEBUG] (f) optimize = false >> [DEBUG] (f) outputDirectory = /tmp/my-app/target/classes >> [DEBUG] (f) outputFileName = my-app-1.0-SNAPSHOT >> [DEBUG] (f) projectArtifact = com.mycompany.app:my-app:jar:1.0-SNAPSHOT >> [DEBUG] (f) showDeprecation = false >> [DEBUG] (f) showWarnings = false >> [DEBUG] (f) staleMillis = 0 >> [DEBUG] (f) verbose = false >> [DEBUG] -- end configuration -- >> >> Thanks, >> Sahoo >> >> Sahoo wrote: >> >>> Thanks, that works. >>> >>> Sahoo >>> >>> Wayne Fay wrote: >>> >>>> Try this, Sahoo: >>>> >>>> >>>>org.apache.maven.plugins >>>>maven-compiler-plugin >>>> >>>>-nowarn >>>>-verbose >>>> >>>> >>>> >>>> On 11/22/07, Sahoo <[EMAIL PROTECTED]> wrote: >>>> >>>> >>>>> As suggested in [1], I tried configuring maven-compiler-plugin like >>>>> this: >>>>> >>>>> -nowarn -verbose >>>>> >>>>> But it causes compilation failure. Details given below: >>>>> >>>>> Failure executing javac, but could not parse the error: >>>>> javac: invalid flag: -nowarn -verbose >>>>> >>>>> How can I pass multiple arguments to javac? >>>>> >>>>> Thanks, >>>>> Sahoo >>>>> [1] >>>>> http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass- >>>>> >> compiler-arguments.html >> >>>>> >>>>> - >>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>>> >>>>> >>>>> >>>>> >>>> - >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Not able to pass multiple arguments to javac
Yes, I knew that approach, but the options I actually want to pass are not supported by the mojo. nowarn and verbose were just used as examples; I want to pass -proc:none and -implicit. They are not supported by javac. There are many such options which are not supported by the mojo. I thought compilerArgument is the way to use them. But, it is *not* working. Thanks, Sahoo Jeff Jensen wrote: Try this approach: true 1024m true true etc... To know element names to use, use the Name found in the Optional Parameters section of this page: http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sahoo Sent: Monday, November 26, 2007 8:25 AM To: Maven Users List Subject: Re: Not able to pass multiple arguments to javac Ignore my earlier email. The suggestion actually does *not* work. When I run with -X option, it shows only the last compilerArgument. See the following output: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' --> [DEBUG] (f) basedir = /tmp/my-app [DEBUG] (f) buildDirectory = /tmp/my-app/target [DEBUG] (f) classpathElements = [/tmp/my-app/target/classes] [DEBUG] (f) compileSourceRoots = [/tmp/my-app/src/main/java] [DEBUG] (f) compilerArgument = -verbose [DEBUG] (f) compilerId = javac [DEBUG] (f) debug = true [DEBUG] (f) failOnError = true [DEBUG] (f) fork = false [DEBUG] (f) optimize = false [DEBUG] (f) outputDirectory = /tmp/my-app/target/classes [DEBUG] (f) outputFileName = my-app-1.0-SNAPSHOT [DEBUG] (f) projectArtifact = com.mycompany.app:my-app:jar:1.0-SNAPSHOT [DEBUG] (f) showDeprecation = false [DEBUG] (f) showWarnings = false [DEBUG] (f) staleMillis = 0 [DEBUG] (f) verbose = false [DEBUG] -- end configuration -- Thanks, Sahoo Sahoo wrote: Thanks, that works. Sahoo Wayne Fay wrote: Try this, Sahoo: org.apache.maven.plugins maven-compiler-plugin -nowarn -verbose On 11/22/07, Sahoo <[EMAIL PROTECTED]> wrote: As suggested in [1], I tried configuring maven-compiler-plugin like this: -nowarn -verbose But it causes compilation failure. Details given below: Failure executing javac, but could not parse the error: javac: invalid flag: -nowarn -verbose How can I pass multiple arguments to javac? Thanks, Sahoo [1] http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass- compiler-arguments.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Not able to pass multiple arguments to javac
According to the web page [1], this should be: org.apache.maven.plugins maven-compiler-plugin ${java.home}\lib\rt.jar So can you try that? Hth, Nick Stolwijk [1] http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html -Original Message- From: Jeff Jensen [mailto:[EMAIL PROTECTED] Sent: Mon 11/26/2007 3:32 PM To: 'Maven Users List' Subject: RE: Not able to pass multiple arguments to javac Try this approach: true 1024m true true etc... To know element names to use, use the Name found in the Optional Parameters section of this page: http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sahoo > Sent: Monday, November 26, 2007 8:25 AM > To: Maven Users List > Subject: Re: Not able to pass multiple arguments to javac > > Ignore my earlier email. The suggestion actually does *not* work. When I > run with -X option, it shows only the last compilerArgument. See the > following output: > > [DEBUG] Configuring mojo > 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' --> > [DEBUG] (f) basedir = /tmp/my-app > [DEBUG] (f) buildDirectory = /tmp/my-app/target > [DEBUG] (f) classpathElements = [/tmp/my-app/target/classes] > [DEBUG] (f) compileSourceRoots = [/tmp/my-app/src/main/java] > [DEBUG] (f) compilerArgument = -verbose > [DEBUG] (f) compilerId = javac > [DEBUG] (f) debug = true > [DEBUG] (f) failOnError = true > [DEBUG] (f) fork = false > [DEBUG] (f) optimize = false > [DEBUG] (f) outputDirectory = /tmp/my-app/target/classes > [DEBUG] (f) outputFileName = my-app-1.0-SNAPSHOT > [DEBUG] (f) projectArtifact = com.mycompany.app:my-app:jar:1.0-SNAPSHOT > [DEBUG] (f) showDeprecation = false > [DEBUG] (f) showWarnings = false > [DEBUG] (f) staleMillis = 0 > [DEBUG] (f) verbose = false > [DEBUG] -- end configuration -- > > Thanks, > Sahoo > > Sahoo wrote: > > Thanks, that works. > > > > Sahoo > > > > Wayne Fay wrote: > >> Try this, Sahoo: > >> > >> > >>org.apache.maven.plugins > >>maven-compiler-plugin > >> > >>-nowarn > >>-verbose > >> > >> > >> > >> On 11/22/07, Sahoo <[EMAIL PROTECTED]> wrote: > >> > >>> As suggested in [1], I tried configuring maven-compiler-plugin like > >>> this: > >>> > >>> -nowarn -verbose > >>> > >>> But it causes compilation failure. Details given below: > >>> > >>> Failure executing javac, but could not parse the error: > >>> javac: invalid flag: -nowarn -verbose > >>> > >>> How can I pass multiple arguments to javac? > >>> > >>> Thanks, > >>> Sahoo > >>> [1] > >>> http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass- > compiler-arguments.html > >>> > >>> > >>> > >>> - > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >>> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Not able to pass multiple arguments to javac
Try this approach: true 1024m true true etc... To know element names to use, use the Name found in the Optional Parameters section of this page: http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sahoo > Sent: Monday, November 26, 2007 8:25 AM > To: Maven Users List > Subject: Re: Not able to pass multiple arguments to javac > > Ignore my earlier email. The suggestion actually does *not* work. When I > run with -X option, it shows only the last compilerArgument. See the > following output: > > [DEBUG] Configuring mojo > 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' --> > [DEBUG] (f) basedir = /tmp/my-app > [DEBUG] (f) buildDirectory = /tmp/my-app/target > [DEBUG] (f) classpathElements = [/tmp/my-app/target/classes] > [DEBUG] (f) compileSourceRoots = [/tmp/my-app/src/main/java] > [DEBUG] (f) compilerArgument = -verbose > [DEBUG] (f) compilerId = javac > [DEBUG] (f) debug = true > [DEBUG] (f) failOnError = true > [DEBUG] (f) fork = false > [DEBUG] (f) optimize = false > [DEBUG] (f) outputDirectory = /tmp/my-app/target/classes > [DEBUG] (f) outputFileName = my-app-1.0-SNAPSHOT > [DEBUG] (f) projectArtifact = com.mycompany.app:my-app:jar:1.0-SNAPSHOT > [DEBUG] (f) showDeprecation = false > [DEBUG] (f) showWarnings = false > [DEBUG] (f) staleMillis = 0 > [DEBUG] (f) verbose = false > [DEBUG] -- end configuration -- > > Thanks, > Sahoo > > Sahoo wrote: > > Thanks, that works. > > > > Sahoo > > > > Wayne Fay wrote: > >> Try this, Sahoo: > >> > >> > >>org.apache.maven.plugins > >>maven-compiler-plugin > >> > >>-nowarn > >>-verbose > >> > >> > >> > >> On 11/22/07, Sahoo <[EMAIL PROTECTED]> wrote: > >> > >>> As suggested in [1], I tried configuring maven-compiler-plugin like > >>> this: > >>> > >>> -nowarn -verbose > >>> > >>> But it causes compilation failure. Details given below: > >>> > >>> Failure executing javac, but could not parse the error: > >>> javac: invalid flag: -nowarn -verbose > >>> > >>> How can I pass multiple arguments to javac? > >>> > >>> Thanks, > >>> Sahoo > >>> [1] > >>> http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass- > compiler-arguments.html > >>> > >>> > >>> > >>> - > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >>> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Not able to pass multiple arguments to javac
Ignore my earlier email. The suggestion actually does *not* work. When I run with -X option, it shows only the last compilerArgument. See the following output: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' --> [DEBUG] (f) basedir = /tmp/my-app [DEBUG] (f) buildDirectory = /tmp/my-app/target [DEBUG] (f) classpathElements = [/tmp/my-app/target/classes] [DEBUG] (f) compileSourceRoots = [/tmp/my-app/src/main/java] [DEBUG] (f) compilerArgument = -verbose [DEBUG] (f) compilerId = javac [DEBUG] (f) debug = true [DEBUG] (f) failOnError = true [DEBUG] (f) fork = false [DEBUG] (f) optimize = false [DEBUG] (f) outputDirectory = /tmp/my-app/target/classes [DEBUG] (f) outputFileName = my-app-1.0-SNAPSHOT [DEBUG] (f) projectArtifact = com.mycompany.app:my-app:jar:1.0-SNAPSHOT [DEBUG] (f) showDeprecation = false [DEBUG] (f) showWarnings = false [DEBUG] (f) staleMillis = 0 [DEBUG] (f) verbose = false [DEBUG] -- end configuration -- Thanks, Sahoo Sahoo wrote: Thanks, that works. Sahoo Wayne Fay wrote: Try this, Sahoo: org.apache.maven.plugins maven-compiler-plugin -nowarn -verbose On 11/22/07, Sahoo <[EMAIL PROTECTED]> wrote: As suggested in [1], I tried configuring maven-compiler-plugin like this: -nowarn -verbose But it causes compilation failure. Details given below: Failure executing javac, but could not parse the error: javac: invalid flag: -nowarn -verbose How can I pass multiple arguments to javac? Thanks, Sahoo [1] http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Not able to pass multiple arguments to javac
Thanks, that works. Sahoo Wayne Fay wrote: Try this, Sahoo: org.apache.maven.plugins maven-compiler-plugin -nowarn -verbose On 11/22/07, Sahoo <[EMAIL PROTECTED]> wrote: As suggested in [1], I tried configuring maven-compiler-plugin like this: -nowarn -verbose But it causes compilation failure. Details given below: Failure executing javac, but could not parse the error: javac: invalid flag: -nowarn -verbose How can I pass multiple arguments to javac? Thanks, Sahoo [1] http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Not able to pass multiple arguments to javac
Try this, Sahoo: org.apache.maven.plugins maven-compiler-plugin -nowarn -verbose On 11/22/07, Sahoo <[EMAIL PROTECTED]> wrote: > As suggested in [1], I tried configuring maven-compiler-plugin like this: > > -nowarn -verbose > > But it causes compilation failure. Details given below: > > Failure executing javac, but could not parse the error: > javac: invalid flag: -nowarn -verbose > > How can I pass multiple arguments to javac? > > Thanks, > Sahoo > [1] > http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]