How to write Junit with Java 1.7 while running base code with 1.6 -


i use java 7 in tests , java 6 code. how achieve this?

you can set source , target in execution phase testcompile of maven-compiler-plugin. try this

<plugin>     <groupid>org.apache.maven.plugins</groupid>     <artifactid>maven-compiler-plugin</artifactid>     <executions>        <execution>            <id>testcompilewithjdk7</id>            <phase>test-compile</phase>            <configuration>               <source>1.7</source>               <target>1.7</target>                          </configuration>         </execution>     </executions> </plugin> 

Comments

Popular posts from this blog

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c++ - CryptStringToBinary API behavior -