google-code-export / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
2 stars 1 forks source link

Guice 1.0 in maven repository has been compiled with Java 6 #402

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've just switched my project to using the new `com.google.inject` version of 
guice 1.0.  
Unfortunately, it's been compiled with Java 6, rather than Java 5, so I had to 
upgrade my project 
too.

In my case I don't think that this matters much.  However, I thought you should 
be aware of it. :)

Original issue reported on code.google.com by dom.happ...@gmail.com on 12 Jul 2009 at 7:08

GoogleCodeExporter commented 9 years ago
The maven-enforcer-plugin [1] can be used in the pom to ensure that the project 
isn't
accidentally built on a newer or older jvm. E.g.:

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>1.0-beta-1</version>
            <configuration>
               <rules>
                  <requireJavaVersion>
                     <version>[1.5,1.6)</version>
                  </requireJavaVersion>
                  <requireMavenVersion>
                     <version>[2.1.0,2.2)</version>
                  </requireMavenVersion>
               </rules>
            </configuration>
            <executions>
               <execution>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>

[1] http://maven.apache.org/plugins/maven-enforcer-plugin

Original comment by estebis...@gmail.com on 10 Aug 2009 at 3:11

GoogleCodeExporter commented 9 years ago
@estebistec: It could if guice was using maven to build.  However, the POMs are 
just informative, for uploading 
to central.  This would have to be taken care of in the ant scripts instead.

Original comment by dom.happ...@gmail.com on 10 Aug 2009 at 4:15

GoogleCodeExporter commented 9 years ago
Guice 3.0 will be properly built with Java 1.5.

Original comment by sberlin on 22 Oct 2010 at 3:49