Eclipse Maven plugin

eclipse maven plugin use java 1.7.

I need to set the default compiler version without modifying pom.xml file for each projects.

Solution:

Change ~/.m2/settings.xml. Also make sure Eclipse uses the same .xml file for settings.
1. In tag, add the following profile:
<profile>
  <id>env-dev</id>
  <properties>
    <project.sourceencoding>UTF-8</project.sourceencoding>
    <maven.compiler.source>1.7</maven></maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
  </properties>
</profile>

2. Enable the above profile:
<activeprofiles>
  <activeprofile>env-dev</activeprofile>
</activeprofiles>

Comments

Popular posts from this blog

看了几款项目管理工具

做真实的自我,是个坏主意

How to reset mysql root password for Mysql Server 5.7 on Ubuntu