You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Meng (JIRA)" <ji...@codehaus.org> on 2008/10/06 17:14:08 UTC

[jira] Created: (MCOMPILER-82) is compiler correct ? is jdk path correct? how to verify ?

is compiler correct ?  is jdk path correct?  how to verify ?
------------------------------------------------------------

                 Key: MCOMPILER-82
                 URL: http://jira.codehaus.org/browse/MCOMPILER-82
             Project: Maven 2.x Compiler Plugin
          Issue Type: Improvement
    Affects Versions: 2.0.2
         Environment: unix
            Reporter: Michael Meng
            Priority: Critical


We have the $JAVA_HOME set to /usr/jdk1.5.0_11, which is the jdk1.5.0_11 location.

In the  maven-compiler-plugin, it says -- The default compiler is javac and is used to compile Java sources


1. which javac it  points to ? is it the javac under JAVA_HOME/bin ?

2. If yes, since we use the jdk1.5 already, why we still need to define the  
         <source>1.5</source>
          <target>1.5</target>
    ?

3. Please confim that the compiler does not use the JDK that  run Maven with.

Thanks
Michael


   

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MCOMPILER-82) is compiler correct ? is jdk path correct? how to verify ?

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MCOMPILER-82?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MCOMPILER-82.
--------------------------------------

      Assignee: Benjamin Bentmann
    Resolution: Not A Bug

Please don't misuse the issue tracker for questions but rather post to the [user mailing list|http://maven.apache.org/mail-lists.html].

bq. 1. which javac it points to ? is it the javac under JAVA_HOME/bin ?
Unless you configured the plugin to use a specific JDK as described in the example [Compiling Sources Using A Different JDK|http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html], the plugin uses the javac from the JDK used to run Maven.

To verify the command line Maven uses to invoke javac, you just need to enable Maven's debug logging by passing the {{-X}} on the command line.

{quote}
2. If yes, since we use the jdk1.5 already, why we still need to define the
<source>1.5</source>
<target>1.5</target>
{quote}
Because the Maven Compiler Plugin has built-in default values for these settings, c.f the first paragraph of the [plugin index page|http://maven.apache.org/plugins/maven-compiler-plugin/].


> is compiler correct ?  is jdk path correct?  how to verify ?
> ------------------------------------------------------------
>
>                 Key: MCOMPILER-82
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-82
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0.2
>         Environment: unix
>            Reporter: Michael Meng
>            Assignee: Benjamin Bentmann
>            Priority: Critical
>
> We have the $JAVA_HOME set to /usr/jdk1.5.0_11, which is the jdk1.5.0_11 location.
> In the  maven-compiler-plugin, it says -- The default compiler is javac and is used to compile Java sources
> 1. which javac it  points to ? is it the javac under JAVA_HOME/bin ?
> 2. If yes, since we use the jdk1.5 already, why we still need to define the  
>          <source>1.5</source>
>           <target>1.5</target>
>     ?
> 3. Please confim that the compiler does not use the JDK that  run Maven with.
> Thanks
> Michael
>    

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira