enebo / Purugin

Ruby Minecraft Plugin support on top of bukkit
237 stars 32 forks source link

Can't build Purugin - many "not supported in -source 1.3" errors #36

Closed duncan-bayne closed 11 years ago

duncan-bayne commented 11 years ago

I'm trying to build Purugin from source, and it's failing to compile with the following errors:

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.purugin:purugin:jar:0.1
-bukkit-1.4.2-R0.1-SNAPSHOT                                                                               
[WARNING] 'version' contains an expression but should be a constant. @ org.purugin:purugin:0.1-bukkit-${buk
kit.version}-SNAPSHOT, /home/duncan/Purugin/pom.xml, line 7, column 12                                    
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Purugin 0.1-bukkit-1.4.2-R0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ purugin ---
[INFO] Deleting file set: /home/duncan/Purugin/target (included: [**], excluded: [])
[INFO] 
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ purugin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 42 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ purugin ---
[INFO] Compiling 2 source files to /home/duncan/Purugin/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.280s
[INFO] Finished at: Sun Dec 02 19:55:56 EST 2012
[INFO] Final Memory: 6M/117M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compil
e) on project purugin: Compilation failure: Compilation failure:                                          
[ERROR] /home/duncan/Purugin/src/main/java/org/purugin/RubyPluginLoader.java:[31,5] error: annotations are 
not supported in -source 1.3                                                                              
[ERROR] 
[ERROR] (use -source 5 or higher to enable annotations)
[ERROR] /home/duncan/Purugin/src/main/java/org/purugin/RubyPluginLoader.java:[65,14] error: generics are no
t supported in -source 1.3                                                                                
[ERROR] 
[ERROR] (use -source 5 or higher to enable generics)
[ERROR] /home/duncan/Purugin/src/main/java/org/purugin/PuruginPlugin.java:[23,5] error: annotations are not
 supported in -source 1.3                                                                                 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

My system is as follows:

OS

Linux Mint 13 Maya, 64 bit (running on a Lenovo L-520)

Java

OpenJDK Runtime Environment (IcedTea7 2.3.3) (7u9-2.3.3-0ubuntu1~12.04.1) OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)

Maven

Apache Maven 3.0.4 Maven home: /usr/share/maven Java version: 1.7.0_05, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-oracle-1.7.0.5/jre Default locale: en_AU, platform encoding: UTF-8 OS name: "linux", version: "3.2.0-23-generic", arch: "amd64", family: "unix"

enebo commented 11 years ago

I read something implying the default maven compiler plugin will choose source for Java 1.3 as a default which is what your error message is showing but I have never seen this. I know I have not customized my maven env so this is confusing :)

However, I just committed [master df483cf] which will fix the issue for you. It specified the source format to be Java 6. This should eliminate your issue and it is not a bad default since JRuby 1.7 and higher (which gets embedded into Purugin) requires Java 6 now. If this did not fix the problem feel free to reopen this.