Setting compiler version to Java5 in maven2


/ Published in: Other
Save to your folder(s)

This is used to set the compiler version to Java5 in maven2. We can put this in pom.xml, in the profile section.

If we activate this profile, all the projects we build will follow Java5 compilation


Copy this code and paste it in your HTML
  1. <profile>
  2. <id>java5</id>
  3. <properties>
  4. <build-home>D:/Build-Loc/build-cougar</build-home>
  5. <maven.compiler.compilerVersion>5</maven.compiler.compilerVersion>
  6. <maven.compiler.executable>pathto/bin/javac</maven.compiler.executable>
  7. <maven.compiler.source>5</maven.compiler.source>
  8. <maven.compiler.target>5</maven.compiler.target>
  9. </properties>
  10. </profile>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.