You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jesse McLaughlin (JIRA)" <ji...@codehaus.org> on 2006/04/16 19:30:48 UTC
[jira] Created: (MCOMPILER-32) compilation failure using source,
target == 1.5 on mac os x
compilation failure using source, target == 1.5 on mac os x
-----------------------------------------------------------
Key: MCOMPILER-32
URL: http://jira.codehaus.org/browse/MCOMPILER-32
Project: Maven 2.x Compiler Plugin
Type: Bug
Environment: mac os x 10.4.6
jdk 1.5.0_05
Reporter: Jesse McLaughlin
Getting the following compilation failure when trying to compile 1.5 sources on mac os x. Default system jdk is 1.4.2 but shell is pointed to jdk 1.5. Seems like forked compiler is reverting to 1.4 javac.
> mvn -e package
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Test Project
[INFO] task-segment: [package]
[INFO] ----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 3 source files to /Users/jess/Devel/workspace/test-project/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Failure executing javac, but could not parse the error:
javac: invalid target release: 1.5
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-help Print a synopsis of standard options
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:505)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Sun Apr 16 11:53:17 CDT 2006
[INFO] Final Memory: 3M/7M
[INFO] ------------------------------------------------------------------------
> java -version
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-84)
Java HotSpot(TM) Client VM (build 1.5.0_05-51, mixed mode, sharing)
> cat pom.xml
<!-- snip -->
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
<!-- snip -->
--
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] Commented: (MCOMPILER-32) compilation failure using source,
target == 1.5 on mac os x
Posted by "Milos Kleint (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MCOMPILER-32?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215808#action_215808 ]
Milos Kleint commented on MCOMPILER-32:
---------------------------------------
I think I've seen something similar with app being run via shell and directly as .app via Finder. maybe the javac executed from maven build is forked but not wrapped in shell?
> compilation failure using source, target == 1.5 on mac os x
> -----------------------------------------------------------
>
> Key: MCOMPILER-32
> URL: http://jira.codehaus.org/browse/MCOMPILER-32
> Project: Maven 2.x Compiler Plugin
> Issue Type: Bug
> Environment: mac os x 10.4.6
> jdk 1.5.0_05
> Reporter: Jesse McLaughlin
>
> Getting the following compilation failure when trying to compile 1.5 sources on mac os x. Default system jdk is 1.4.2 but shell is pointed to jdk 1.5. Seems like forked compiler is reverting to 1.4 javac.
> > mvn -e package
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] ----------------------------------------------------------------------------
> [INFO] Building Test Project
> [INFO] task-segment: [package]
> [INFO] ----------------------------------------------------------------------------
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> Compiling 3 source files to /Users/jess/Devel/workspace/test-project/target/classes
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Compilation failure
> Failure executing javac, but could not parse the error:
> javac: invalid target release: 1.5
> Usage: javac <options> <source files>
> where possible options include:
> -g Generate all debugging info
> -g:none Generate no debugging info
> -g:{lines,vars,source} Generate only some debugging info
> -nowarn Generate no warnings
> -verbose Output messages about what the compiler is doing
> -deprecation Output source locations where deprecated APIs are used
> -classpath <path> Specify where to find user class files
> -sourcepath <path> Specify where to find input source files
> -bootclasspath <path> Override location of bootstrap class files
> -extdirs <dirs> Override location of installed extensions
> -d <directory> Specify where to place generated class files
> -encoding <encoding> Specify character encoding used by source files
> -source <release> Provide source compatibility with specified release
> -target <release> Generate class files for specific VM version
> -help Print a synopsis of standard options
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.BuildFailureException: Compilation failure
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
> at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:505)
> at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> ... 16 more
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Sun Apr 16 11:53:17 CDT 2006
> [INFO] Final Memory: 3M/7M
> [INFO] ------------------------------------------------------------------------
> > java -version
> java version "1.5.0_05"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-84)
> Java HotSpot(TM) Client VM (build 1.5.0_05-51, mixed mode, sharing)
> > cat pom.xml
> <!-- snip -->
> <plugins>
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> </plugins>
> <!-- snip -->
>
--
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] Commented: (MCOMPILER-32) compilation failure using source,
target == 1.5 on mac os x
Posted by "Jesse McLaughlin (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MCOMPILER-32?page=comments#action_63650 ]
Jesse McLaughlin commented on MCOMPILER-32:
-------------------------------------------
Here are the results, as run from the same shell I am running the 'mvn package' command from:
> echo $JAVA_HOME
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
> javac -version
javac 1.5.0_05
javac: no source files
Usage: javac <options> <source files>
...etc...
Seems like my shell is definitely using jdk 1.5, but when compiling with maven, it uses something less...?
> compilation failure using source, target == 1.5 on mac os x
> -----------------------------------------------------------
>
> Key: MCOMPILER-32
> URL: http://jira.codehaus.org/browse/MCOMPILER-32
> Project: Maven 2.x Compiler Plugin
> Type: Bug
> Environment: mac os x 10.4.6
> jdk 1.5.0_05
> Reporter: Jesse McLaughlin
>
>
> Getting the following compilation failure when trying to compile 1.5 sources on mac os x. Default system jdk is 1.4.2 but shell is pointed to jdk 1.5. Seems like forked compiler is reverting to 1.4 javac.
> > mvn -e package
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] ----------------------------------------------------------------------------
> [INFO] Building Test Project
> [INFO] task-segment: [package]
> [INFO] ----------------------------------------------------------------------------
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> Compiling 3 source files to /Users/jess/Devel/workspace/test-project/target/classes
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Compilation failure
> Failure executing javac, but could not parse the error:
> javac: invalid target release: 1.5
> Usage: javac <options> <source files>
> where possible options include:
> -g Generate all debugging info
> -g:none Generate no debugging info
> -g:{lines,vars,source} Generate only some debugging info
> -nowarn Generate no warnings
> -verbose Output messages about what the compiler is doing
> -deprecation Output source locations where deprecated APIs are used
> -classpath <path> Specify where to find user class files
> -sourcepath <path> Specify where to find input source files
> -bootclasspath <path> Override location of bootstrap class files
> -extdirs <dirs> Override location of installed extensions
> -d <directory> Specify where to place generated class files
> -encoding <encoding> Specify character encoding used by source files
> -source <release> Provide source compatibility with specified release
> -target <release> Generate class files for specific VM version
> -help Print a synopsis of standard options
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.BuildFailureException: Compilation failure
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
> at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:505)
> at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> ... 16 more
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Sun Apr 16 11:53:17 CDT 2006
> [INFO] Final Memory: 3M/7M
> [INFO] ------------------------------------------------------------------------
> > java -version
> java version "1.5.0_05"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-84)
> Java HotSpot(TM) Client VM (build 1.5.0_05-51, mixed mode, sharing)
> > cat pom.xml
> <!-- snip -->
> <plugins>
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> </plugins>
> <!-- snip -->
>
--
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] Commented: (MCOMPILER-32) compilation failure using source,
target == 1.5 on mac os x
Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MCOMPILER-32?page=comments#action_63649 ]
Carlos Sanchez commented on MCOMPILER-32:
-----------------------------------------
Where points JAVA_HOME ? and what's the result of javac -version?
> compilation failure using source, target == 1.5 on mac os x
> -----------------------------------------------------------
>
> Key: MCOMPILER-32
> URL: http://jira.codehaus.org/browse/MCOMPILER-32
> Project: Maven 2.x Compiler Plugin
> Type: Bug
> Environment: mac os x 10.4.6
> jdk 1.5.0_05
> Reporter: Jesse McLaughlin
>
>
> Getting the following compilation failure when trying to compile 1.5 sources on mac os x. Default system jdk is 1.4.2 but shell is pointed to jdk 1.5. Seems like forked compiler is reverting to 1.4 javac.
> > mvn -e package
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] ----------------------------------------------------------------------------
> [INFO] Building Test Project
> [INFO] task-segment: [package]
> [INFO] ----------------------------------------------------------------------------
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> Compiling 3 source files to /Users/jess/Devel/workspace/test-project/target/classes
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Compilation failure
> Failure executing javac, but could not parse the error:
> javac: invalid target release: 1.5
> Usage: javac <options> <source files>
> where possible options include:
> -g Generate all debugging info
> -g:none Generate no debugging info
> -g:{lines,vars,source} Generate only some debugging info
> -nowarn Generate no warnings
> -verbose Output messages about what the compiler is doing
> -deprecation Output source locations where deprecated APIs are used
> -classpath <path> Specify where to find user class files
> -sourcepath <path> Specify where to find input source files
> -bootclasspath <path> Override location of bootstrap class files
> -extdirs <dirs> Override location of installed extensions
> -d <directory> Specify where to place generated class files
> -encoding <encoding> Specify character encoding used by source files
> -source <release> Provide source compatibility with specified release
> -target <release> Generate class files for specific VM version
> -help Print a synopsis of standard options
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.BuildFailureException: Compilation failure
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
> at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:505)
> at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> ... 16 more
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Sun Apr 16 11:53:17 CDT 2006
> [INFO] Final Memory: 3M/7M
> [INFO] ------------------------------------------------------------------------
> > java -version
> java version "1.5.0_05"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-84)
> Java HotSpot(TM) Client VM (build 1.5.0_05-51, mixed mode, sharing)
> > cat pom.xml
> <!-- snip -->
> <plugins>
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> </plugins>
> <!-- snip -->
>
--
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